add upload_store as prepare parameter #135
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi all,
this will add upload_store as parameter to the prepare function to make it possible to specify this yaml entry through the step's .py file.
Example:
You will need to bump the version as well and set it in valohai-cli.
Flow
Entry Point:
valohai.prepare(upload_store="...")
Global State Storage:
global_state.py
global_state.upload_store
AST Processing:
PrepareParser.process_valohai_prepare_call()
upload_store
parameter in the prepare() callast.literal_eval()
Parse Result Creation:
ParseResult
namedtupleupload_store
alongside other configuration values like step name, parameters, etc.Config Source Parsing:
parse_config_from_source()
upload_store
value for config generationConfig Generation:
generate_config()
upload_store
as a parameterStep Generation:
generate_step()
upload_store
value from generate_configStep Class Storage:
Step
classupload_store
as an instance variableSerialization:
Step.serialize()
upload_store
to YAML-styleupload-store
Final Output: YAML file
upload-store
field with hyphenated nameAddition:
Please also update the documentation for visibility of this feature or point me to the docs repo (I couldn't find a public one).
Also, please mention in the documentation how to specify parameter descriptions. This is not well documented yet either.
Example: