3

Vertex AI offers a very interesting Model Registry that allows you to store all trained models and track all their versions.

However, I don't manage to create new versions of the same model using the Python SDK. In particular, I have a Vertex AI Pipeline that performs: 1) data preprocessing, 2) feature engineering, 3) feature store creation, and in the end, 4) train a model with AutoML Tabular.

The code of the Pipeline component dedicated to the point 4 is:

 automl_training_electric_op = gcc_aip.AutoMLTabularTrainingJobRunOp(
    project=project_bq,
    model_display_name="pred-model",
    display_name="pred-model",
    optimization_prediction_type="classification",
    optimization_objective="maximize-au-prc",
    budget_milli_node_hours=1000,
    dataset=comp5a.outputs["dataset"],
    target_column="fault",
    location=location
)

In the Google documentation I didn't find anything that could help me in creating new versions of the "pred-model", in fact, any time I run the pipeline, Vertex AI creates a new model with the same name.

I would like that at each training, AutoML creates a new version of the same model. E.g., v1, v2, v3.

Here, the current situation, in which the same model is replicated and not versioned: enter image description here

Andrea Cola
  • 127
  • 1
  • 8
  • Are you perhaps referencing this documentation? https://cloud.google.com/vertex-ai/docs/model-registry/versioning#new-model-version – Nestor Ceniza Jr Sep 02 '22 at 05:35

1 Answers1

1

AutoMLTabularTrainingJobRunOp was last updated Feb 2, 2022. Meanwhile, support for model versioning was added to the Vertex Python SDK on June 28, 2022. So the issue is that AutoMLTabularTrainingJobRunOp needs to be updated to align with what the SDK currently offers, which likely requires a GitHub Issue to be filed.

In the meantime, you can use the Python SDK which does support specifying a version. This can be wrapped in a function-based component to be used in a KFP pipeline.

Update (2022-10-05): The component in the latest release now supports the new parameters related to model versioning: link

Michael Hu
  • 96
  • 3
  • I read the link to the GitHub repository. I found a reference to "parent_model" but AutoMLTabularTrainingJobRunOp does not support the model versioning. So basically, at the moment there is not a solution for my problem. In the end, I have to wait that Google updates the SDK to support the versioning. Is it right? – Andrea Cola Sep 02 '22 at 18:53
  • Yes, that's right. – Michael Hu Sep 06 '22 at 16:46