pipelines
pipelines copied to clipboard
[feature] Allow GCP ModelUploadOp to upload a model version
Feature Area
/area components
What feature would you like to see?
The ability to upload a Vertex Model version to the model registry
What is the use case or pain point?
In the REST API for model upload, the request body has several fields including parentModel
which can be supplied if uploading a new model version.
The current version of ModelUploadOp
only supplies the model
field in the request:
upload_model_request = {
# TODO(IronPan) temporarily remove the empty fields from the spec
'model':
json_util.recursive_remove_empty(
append_unmanaged_model_artifact_into_payload(
executor_input, model_spec))
}
Is there a workaround currently?
I believe this can be done by creating a custom component that uses the gcloud
sdk and then gcloud ai model upload ... --parent-model ... --version-aliases
but I haven't tried it yet.
Love this idea? Give it a 👍.
/cc @chongyouquan
Similarly other Ops that can generate a model (CustomTrainingJobRunOp, AutoMLTrainingJobRunOp etc) should support adding new versions of a model as well.
+1
This should now be supported by the latest release, via the parent_model parameter. Please reopen if you see it's not working. https://google-cloud-pipeline-components.readthedocs.io/en/google-cloud-pipeline-components-1.0.34/google_cloud_pipeline_components.v1.model.html
Was this functionality also added to components that use the uploaded models? For example how would one reference a specific model version (with a version alias) in BatchPredictOp in python? Maybe I missed it but can't seem to find documentation on this.