-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add upload_store as prepare parameter #135
add upload_store as prepare parameter #135
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks straightforward enough. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oop, actually: tests & lint is failing
pre-commit and tests are green for me (now) |
I would suggest an update to make tests compatible with newer python versions than 3.7. There seem to be slight differences in default value serialization, causing tests to fail when running on envs with python 3.11, for example. You would either need to update the expected results for the tests or make some small changes to how parameters with default values are serialized in valohai-yaml. |
FYI if you are seeing |
a6fcc50
to
1c45400
Compare
@Kenneth-Schroeder Thanks for the comments re CI! |
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: