-
Notifications
You must be signed in to change notification settings - Fork 467
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
Passing pipeline parameters as yaml config #2058
Passing pipeline parameters as yaml config #2058
Conversation
@schustmi , these changes clash a bit with what you created in #1638. |
E2E template updates in |
…ers-as-yaml-and-document
…ers-as-yaml-and-document
E2E template updates in |
…ers-as-yaml-and-document
src/zenml/new/pipelines/pipeline.py
Outdated
step_name() | ||
|
||
if __name__=="__main__": | ||
pipeline_(param_name="value2") |
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.
This would also need to call with_options(config_file=...)
to showcase the actual error right?
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.
Fixed
src/zenml/new/pipelines/pipeline.py
Outdated
parameters_ = dict_utils.recursive_update(parameters_, from_file_) | ||
if parameters_: | ||
for k, v_runtime in kwargs.items(): | ||
if v_config := parameters_.get(k, None): |
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.
None
or False
might also be valid parameter values which will not get detected by this logic I think?
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.
Fixed
src/zenml/new/pipelines/pipeline.py
Outdated
if parameters_: | ||
for k, v_runtime in kwargs.items(): | ||
if v_config := parameters_.get(k, None): | ||
conflicting_parameters[k] = (v_config, v_runtime) |
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.
In the step you added an additional check if the config and runtime parameter are different, I think that also makes sense here?
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.
Fixed
src/zenml/steps/base_step.py
Outdated
for key, value in parameters.items(): | ||
if runtime_value := runtime_parameters.get(key, None): |
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.
Same as for the pipeline, None
/False
/0
/... as parameter values will probably not be included in these checks.
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.
Fixed
…ers-as-yaml-and-document
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.
Great changes and it is nice that you added the explanation to the docs as well. From what I can see all seems good 👍
Describe changes
Add ability to pass in pipeline params as yaml config:
Also added a
RuntimeError
for the cases when runtime config conflicts with YAML config (both steps and pipeline params) - @schustmi please confirm that this is acceptable or shall I revert to config-dominant silent mode.Docs: https://app.gitbook.com/o/-MCl1Hlw9oU4xibZ-ymf/s/9oLgDi1mkUbwQiTmrEit/user-guide/advanced-guide/pipelining-features/configure-steps-pipelines#parameters-for-your-steps
BREAKING CHANGES
Pre-requisites
Please ensure you have done the following:
develop
and the open PR is targetingdevelop
. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.Types of changes