Creating and Saving a Model with the ADS SDK

Create a model with ADS and save it directly to the model catalog.

When you train a model in a notebook session, you can use the ADS SDK to save model artifacts to the model catalog. ADS creates the model artifact for you. It captures all the relevant metadata such as its provenance, and pushes a new model artifact to the model catalog.

ADS provides the prepare_generic_model() function to help you convert any type of model into an ADSModel object. ADS helps you in preparing a model artifact by generating standardized code that you change to represent a use case. In particular, the score.py and runtime.yaml files. After you change the files, you save the resulting ADSModel object and the model metadata ADS generates to the model catalog.

We recommend that you create and save models to the model catalog programmatically instead, either using ADS or the OCI Python SDK.

Important

  • We recommend that you create and save models to the model catalog programmatically instead, either using ADS or the OCI Python SDK.

  • You can use ADS to create large models. Large models have artifacts limitations of up to 400 GB.