01-projects/certifications/snowpro-genai-c02

study model registry

2026-05-16·study-notes·source: docs.snowflake.com/en/developer-guide/snowflake-ml/model-registry
certificationsnowflakemodel-registryml-ops

Snowflake Model Registry - SnowPro Gen AI C02 study notes

Model Registry is a schema-level Snowflake object for managing ML models with version control, metadata, and SQL/Python inference.

Core API (Python)

from snowflake.ml.registry import Registry

reg = Registry(session=session, database_name="MYDB", schema_name="ML")

# Log a model (creates a new version)
mv = reg.log_model(
    model=my_sklearn_pipeline,
    model_name="customer_churn",
    version_name="v1",
    sample_input_data=X_train.head(),
    comment="baseline LR",
    metrics={"auc": 0.84},
    conda_dependencies=["scikit-learn==1.5.0"],
)

# List versions
reg.get_model("customer_churn").versions()

# Inference
mv.run(input_df, function_name="predict")

Three classes

Class Represents
Registry All models in a schema
Model A named model (collection of versions)
ModelVersion A specific version artifact

Supported model types (built-in)

Deployment targets

Target Use case Compute
Warehouse CPU inference, low/medium throughput, called from SQL or Python Standard virtual warehouse
Snowpark Container Services GPU inference, REST endpoint, custom runtime SPCS service backed by a compute pool

The same model object can be served from both targets (different deployments).

SQL inference

After logging, a model is callable from SQL:

SELECT MYDB.ML.CUSTOMER_CHURN!PREDICT(*) FROM new_customers;

The ! syntax invokes a method on a model version. Method names match what was registered (predict, predict_proba, custom methods).

Partitioned models

For very large datasets, partitioned inference runs the model across multiple warehouse partitions in parallel. Defined when you call run() with a partition_column argument. Each partition is a separate model invocation — useful for per-customer or per-region models.

Versioning behavior

RBAC

Observability (ML Observability)

Common exam framings

Pitfalls