-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Compiler
compiles invalid yaml when text is too long to be in one line
#2495
Comments
I'm not sure the problem is in the annotation. Let me know of the result. |
@Ark-kun I can manually remove or edit those lines then I trigger the pipeline through api successfully, but the main thing being if i have to manually edit those, ideally, |
Can you elaborate on why you think the different styles of YAML string encodings are not equivalent? |
Can you please post the whole problematic YAML? |
compiling the following .py file
and compiles into this, if you upload this into a new pipeline, it'll throw the above error when trying to run the pipeline
if i use the kfp's
|
@IronPan Is it possible that the Go's YAML parser is parsing YAML strings wrong? There should be no difference between the YAML's 4 text styles. Can you please check the parsing of the posted two pipelines? |
For anyone stumbling over this in the future (like me): This also happens if you create an environment variable with a non-string value, e.g.: from kfp import dsl
from kubernetes.client.models import V1EnvVar
op: dsl.ContainerOp = ... # some container op
# This will compile just fine, but when starting a run the following error will be raised:
op.add_env_variable(V1EnvVar(name="SOMETHING", value=1))
# Compile a pipeline with this op, upload it and try to run it...
|
@RunOrVeith I feel I have seen this error from time to time (type conflicts), but it's not really related to this issue here, if you could provide an example with another issue, I am happy to help looking into it. |
@l1990790120 I opened a new issue describing the problem in #3286 |
@l1990790120 |
What happened:
When running
dsl-compile ...
on a simple pipeline definition, it generates invalid pipeline yaml file as the followingWhen using the api to run the pipeline, it returns the following -
Basically the yaml file is invalid.
What did you expect to happen:
The correct form where quoted text is broken up into multiple lines should be the following -
Where it starts with
>-
and then the textWhat steps did you take:
[A clear and concise description of what the bug is.]
This is not the case when calling
.run_pipeline
since it translates yaml into json and run the pipeline with json body.Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
The text was updated successfully, but these errors were encountered: