-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
V2 Output Artifact Classes and Vertex Pipelines #6818
Comments
Can you try using this approach to set artifact path?
cc @chensun for the rest of questions. |
Hi, I tried this way, it does not throw an error and the pipeline succeeds, however the URI is not updated when I view the Artifacts/Metadata of the run in Vertex AI Console post-completion. Maybe it is more of a Vertex Problem. |
Hi, I have found a way that works. In the end we used kfp sdk to generate a yaml file based on a
with this change to the yaml, we can now successfully update the artifacts metadata dictionary, and uri through I am still unsure why the component.yaml format specified in the Kubeflow documentation does not work - I think this may be a bug with Vertex Pipelines. |
Thanks for this @ml6-liam . I've had similar issues of not being able to save metadata with Artifacts while using containerized components. I tried what you posted above and am able to save metadata successfully now. I would agree this seems like a bug. |
@ml6-liam, glad you were able to figure it out.
This isn't a bug but a new feature in v2. To support this feature we need to control the container entrypoint with So if you had the legacy yaml component without this piece of code being injected in the container entrypoint, the functionality would be missing as expected. Admit that we're currently short on documentation, our team is prioritizing documentation improvement in Q1 2022. |
Also, you might want to take a look at: #6417 (comment) |
I am trying to create a vertex pipeline using the kfp SDK v2, I'm not sure if this is a vertex issue or a kfp issue, so forgive me if this is the wrong place for this query.
I have a reusable component in my pipeline from which I want to return a Dataset Artifact.
in the component.yaml I have the output specified:
and as well in the command of the yaml:
Then in the function implementing the components logic, I declare a function parameter for the output like so:
output_model_configuration_output: Output[Dataset]
in the Artifact types class (declared here: https://github.com/kubeflow/pipelines/blob/master/sdk/python/kfp/v2/components/types/artifact_types.py) I can see there is a method for setting the path of the Artifact with
output_artifact.path('Path/to/fil')
, but when I implement this method in my code (output_model_configuration_output.path(f"{output_path}model_configuration.parquet")
), I am met with an error:TypeError: 'NoneType' object is not callable
I tried writing the URI To the artifact object's uri variable directly like so:
output_model_configuration_output.uri = f"{output_path}model_configuration.parquet"
This didn't throw an error, but the URI Value of the artifact object displayed in the vertex pipeline was not updated in the UI when the pipeline completed.
In addition, I tried adding some metadata to the artifact in this manner:
output_model_configuration_output.metadata['num_rows'] = float(len(model_configuration))
But I don't see this metadata reflected in the Vertex Pipeline UI When the pipeline run finishes, similar to the updated URI.
Let me know if there is anymore information I can provide, or if their is a more appropriate channel for this query.
The text was updated successfully, but these errors were encountered: