Skip to content

JobMonitor.register_model()

Registers a trained model in the snowflake model registry. The model is registered under the specified name and version in the specified database and schema that the native app has permissions to.

This method is available only for jobs of type train or train_inference and requires a valid model_run_id. Duplicate version names for a model are not allowed.

⚠️ Note: Ensure the native app has the necessary permissions to the specified database and schema.

-- grant access to resources needed for snowflake experiment tracking
GRANT USAGE ON DATABASE <DATABASE> TO APPLICATION RELATIONALAI;
GRANT USAGE ON SCHEMA <DATABASE>.<SCHEMA> TO APPLICATION RELATIONALAI;
GRANT CREATE MODEL ON SCHEMA <DATABASE>.<SCHEMA> TO APPLICATION RELATIONALAI;
NameTypeDescriptionOptional
model_namestrName under which to register the model.No
version_namestrVersion under which to register the model.No
database_namestrDatabase where the model will be registered.No
schema_namestrSchema name in the database where the model will be registered.No
commentstrOptional comment for model registration.Yes
train_job.register_model(
model_name="new_model",
version_name="v3",
database_name="database_name",
schema_name="schema_name",
comment="Production-ready model",
)