googleapis / googleapis/python-aiplatform

Allow save/load and log_model for different frameworks/flavors, such as PyTorch, Spacy, custom solution models

Open
#2,033 4 comments 2 reactions 0 assignees View on GitHub
api: vertex-ai
Dominant language
Python
Stars
905
Forks
465
Avg merge
1d 13h
Merged PRs (30d)
44

Description

Currently Vertex AI allows for [model save/load](https://cloud.google.com/vertex-ai/docs/experiments/log-models-exp-run#save-models) for particular set of frameworks, such as:
```
Union["sklearn.base.BaseEstimator", "xgb.Booster", "tf.Module"]
```
which constrains usage of the Model Registry by quite a bit. The same applies to `aiplatform.log_model()` method.

I see the constrain coming from the AutoML platform, however, it would benefit the community not to restricts Model Tracking and Registry to purely AutoML supported frameworks. As such I would like to extend my ask to allow other model frameworks registry, such as PyTorch, SpaCy, or custom solution models that do not necessarily fit any of the popular frameworks.

Extension to other frameworks would allow for more flexibility around VertexAI Tracking and Registry and not limit VAI purely to AutoML solution based tracking and registry.

Current workaround:
One can feed a dummy model, such as: `TfidfVectorizer()` in place of `model`, which becomes then:
```
aiplatform.log_model(
model=dummy_model,
uri=URI,
display_name=DISPLAY_NAME,
)
```
However, it is pretty rough for future registry or proper tracking; one needs to be aware what is saved. In my case, the key here is URI, but in terms of artifact model it won't make much sense, however, it will allow for `log_model`record and future core model retrieval from URI.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.