-
Notifications
You must be signed in to change notification settings - Fork 343
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
Fix KFP code generation issues for pipeline parameters #3093
Conversation
Signed-off-by: Patrick Titzler <ptitzler@us.ibm.com>
generic_component_template = Environment( | ||
loader=PackageLoader("elyra", "templates/kubeflow/v1") | ||
).get_template("generic_component_definition_template.jinja2") | ||
template_env = Environment(loader=PackageLoader("elyra", "templates/kubeflow/v1")) |
Check warning
Code scanning / CodeQL
Jinja2 templating with autoescape=False
Signed-off-by: Patrick Titzler <ptitzler@us.ibm.com>
Signed-off-by: Patrick Titzler <ptitzler@us.ibm.com>
Linting errors and subsequent test failures are unrelated to the changes introduced by this PR. A new major version of |
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.
thumbs up LGTM
Code generation produces incorrect results (and in some scenarios fails) for some pipeline parameter scenarios. Examples below, as observed in the generated Python DSL:
"
character (YAML parser chokes)"
character for parameter typeString
False
forBool
-typed parameters is missing , e.g.Some of the problems were caused by the fact that
0
and<empty-string>
were considered to be equivalent (or not equivalent) toNone
. To avoid these issues thePipelineParameter
class now explicitly assignsNone
to parameter values and default values that are set to the empty string by the UI.Signed-off-by: Patrick Titzler ptitzler@us.ibm.com
What changes were proposed in this pull request?
How was this pull request tested?
To test create and export a KFP pipeline that utilizes pipeline parameters, covering the scenarios listed in the problem description. The generated Python DSL code should properly reflect the pipeline parameters, their values, and types.
Developer's Certificate of Origin 1.1