Skip to content

Releases: snowflakedb/snowflake-ml-python

1.46.0

Choose a tag to compare

@snowflake-connectors-app snowflake-connectors-app released this 07 Jul 19:23
f0c5cdd

1.46.0

New Features

Bug Fixes

Behavior Changes

  • Registry: For Snowpark ML Pipeline models with explainability enabled, explanations now cover only the columns the
    final estimator was actually trained on (its input_cols). Untransformed passthrough columns (e.g. raw string
    columns left in place by an encoder using new output_cols, or the label column) are no longer included in the
    explain output. This also fixes a failure where such passthrough columns could reach the SHAP explainer and raise an
    error during log_model(..., enable_explainability=True).

Deprecations

1.45.0

Choose a tag to compare

@snowflake-connectors-app snowflake-connectors-app released this 01 Jul 22:36
7b4d223

1.45.0

New Features

  • Feature Store: FeatureView now supports an initialization_warehouse that is used for the initial build and any
    subsequent reinitializations of the backing dynamic table (a full scan of the source data), while warehouse
    continues to drive the lighter incremental refreshes. This mirrors the dynamic table INITIALIZATION_WAREHOUSE
    knob, lets you pair a larger warehouse for initialization with a smaller one for steady-state refresh, and is also
    used for the one-time backfill of streaming feature views. It can be set at registration, changed via
    update_feature_view(initialization_warehouse=...), and is surfaced by list_feature_views(verbose=True).
draft_fv = FeatureView(
    name="F_TRIP",
    entities=[entity],
    feature_df=feature_df,
    refresh_freq="1d",
    warehouse="SMALL_WH",            # incremental refreshes
    initialization_warehouse="LARGE_WH",  # initial build / reinitialization
)
fv = fs.register_feature_view(draft_fv, version="1.0")
  • Registry: LLM models deployed with the OpenAI chat signatures now support structured outputs
    through an optional response_format param matching the OpenAI Chat Completions API
    ({"type": "json_schema", "json_schema": {"name": "...", "schema": {...}}}), letting callers
    constrain model output to a JSON Schema.
from pydantic import BaseModel
import pandas as pd

class CityCountry(BaseModel):
    city: str
    country: str

response_format = {
    "type": "json_schema",
    "json_schema": {
        "name": "city_country",
        "schema": CityCountry.model_json_schema(),
    },
}

x_df = pd.DataFrame.from_records(
    [
        {
            "messages": [
                {
                    "role": "user",
                    "content": [
                        {"type": "text", "text": "What is the capital of France?"},
                    ],
                },
            ],
        }
    ]
)

mv.run(
    X=x_df,
    params={"response_format": response_format},
    service_name=...,
)

Bug Fixes

Behavior Changes

Deprecations

1.44.0

Choose a tag to compare

@snowflake-connectors-app snowflake-connectors-app released this 23 Jun 19:58
60b8a44

1.44.0

New Features

Bug Fixes

Behavior Changes

Deprecations

1.43.0

Choose a tag to compare

@snowflake-connectors-app snowflake-connectors-app released this 16 Jun 23:07
2210f85

1.43.0

New Features

  • Registry: inference_engine_options["engine"] now accepts case-insensitive strings in addition to
    InferenceEngine enum members. Supported values are "vllm" and "python_generic" (for example,
    "vLLM", "VLLM", and "PYTHON_GENERIC" are all accepted). This applies to ModelVersion.create_service()
    and ModelVersion.run_batch().
from snowflake.ml.registry import Registry

registry = Registry(session)
mv = registry.get_model("my_model").version("v1")

mv.create_service(
    service_name="my_vllm_service",
    service_compute_pool="GPU_COMPUTE_POOL",
    gpu_requests="1",
    inference_engine_options={
        "engine": "vLLM",
        "engine_args_override": ["--max-model-len=4096"],
    },
)

job = mv.run_batch(
    compute_pool="GPU_COMPUTE_POOL",
    X=input_df,
    output_spec=output_spec,
    inference_engine_options={
        "engine": "python_generic",
    },
)

Bug Fixes

  • Registry: Fixed explain() failing with type mismatch errors when passing a Snowpark DataFrame.
    Snowpark DataFrame columns are now explicitly cast to match model signature types before SQL
    generation. Table functions (used by explain) enforce stricter type coercion than scalar functions
    (used by predict), so columns that were implicitly coerced for predict would be rejected by
    explain.

Behavior Changes

  • Registry: SentenceTransformers models no longer hard-code a default inference batch size of 32.
    When batch_size is not specified at log_model time and is not overridden at inference, the
    sentence-transformers library default is used. To pin a specific size, pass batch_size via
    log_model(..., options={"batch_size": N}) or as an inference-time parameter. All
    SentenceTransformers models logged with this release require a client/serving runtime on version
    1.43.0 or later (regardless of whether batch_size was specified).

Deprecations

1.42.0

Choose a tag to compare

@snowflake-connectors-app snowflake-connectors-app released this 11 Jun 11:46
d0365dc

1.42.0

New Features

  • Registry: Support truncate_dim for SentenceTransformers models. Truncation set at
    construction (SentenceTransformer(..., truncate_dim=N)) is captured when the model is logged
    and restored on reload. On clients with sentence-transformers 5.0.0 or later, truncate_dim
    is also exposed as a runtime parameter in the model signature.

  • Registry: log_model() now captures a representative row from sample_input_data and stores it alongside the model
    so inference code snippets shown in the model registry UI can be pre-filled with realistic values. Pass
    options={"capture_sample_input_data": False} to opt out (e.g., for sensitive data); generic placeholder values
    will be used in the snippets instead.

Bug Fixes

  • Registry: Pin transformers<5 for additional HuggingFace pipeline tasks removed in
    transformers 5.x (summarization, text2text-generation, question-answering, and
    translation_*), preventing deployment failures from missing pipeline classes.

Behavior Changes

Deprecations

1.41.0

Choose a tag to compare

@snowflake-connectors-app snowflake-connectors-app released this 27 May 13:50
810d0ac

1.41.0

New Features

  • Registry: Extended ParamSpec support to MLflow PyFunc, LightGBM, XGBoost, and CatBoost models.
    Parameters declared in the model signature can now be passed at inference time.

Bug Fixes

Behavior Changes

Deprecations

1.40.0

Choose a tag to compare

@snowflake-connectors-app snowflake-connectors-app released this 20 May 00:37
aa2c5b9

1.40.0

New Features

Bug Fixes

  • Feature Store: get_feature_view() now correctly preserves online_config for feature views whose
    names require SQL quoting (mixed case or special characters such as a space). Previously the returned
    FeatureView reported online=False even when online was enabled at registration, causing
    read_feature_view(store_type=ONLINE) to fail with "Online store is not enabled".

Behavior Changes

Deprecations

1.39.0

Choose a tag to compare

@snowflake-connectors-app snowflake-connectors-app released this 12 May 21:43
9ea4794

1.39.0

New Features

Bug Fixes

  • Feature Store: update_feature_view now correctly handles every transition between duration-based
    and CRON-based refresh_freq. Previously a CRON expression was forwarded to the Dynamic Table's
    TARGET_LAG (which Snowflake rejects), duration → cron failed because the companion Task did not
    yet exist, and cron → duration left the Task orphaned and continuing to fire on its old schedule.
    All four (old, new) transitions now correctly create, alter, or drop the Task as needed, with
    symmetric rollback on failure.

Behavior Changes

  • Feature Store: For CRON-based feature views, get_feature_view(), list_feature_views(), and
    register_feature_view() now return the original cron expression as refresh_freq instead of
    "DOWNSTREAM". The underlying Dynamic Table still uses TARGET_LAG = 'DOWNSTREAM' with a companion
    Task — this is purely a display change so the round-trip preserves what the user passed in.

  • Registry: When target_platforms includes WAREHOUSE and pip installs are needed without a user-supplied
    pip artifact repository, log_model injects snowflake.snowpark.pypi_shared_repository after
    verifying access. This applies to explicit pip_requirements and to pip-only packaging when there are
    no user conda dependencies. If pypi_shared_repository is inaccessible in the pip-only case, automatic packaging
    dependencies fall back to conda instead of forcing pip-only without an index.

Deprecations

1.38.0

Choose a tag to compare

@snowflake-connectors-app snowflake-connectors-app released this 11 May 09:04
04df496

1.38.0

New Features

Bug Fixes

Behavior Changes

  • Registry: For HuggingFace text-generation pipelines whose tokenizer defines a chat template, the
    auto-inferred signature now matches the OpenAI Chat Completions API
    (_OPENAI_CHAT_SIGNATURE_WITH_PARAMS_SPEC). Inputs are a single messages column and inference
    controls (temperature, max_completion_tokens, stop, n, stream, top_p, frequency_penalty,
    presence_penalty) move from inputs to params with default values. Predictions return the OpenAI
    response shape (id, object, created, model, choices, usage); the generated text is at
    choices[0].message.content instead of outputs[0].generated_text.

  • Registry: For HuggingFace image-text-to-text, video-text-to-text, and audio-text-to-text
    pipelines, the auto-inferred signature now uses _OPENAI_CHAT_SIGNATURE_WITH_PARAMS_SPEC instead of
    _OPENAI_CHAT_SIGNATURE_SPEC. The input column set narrows to just messages, and the inference
    controls move to params with default values; the output schema is unchanged.

Deprecations

1.37.0

Choose a tag to compare

@snowflake-connectors-app snowflake-connectors-app released this 29 Apr 18:57
916452c

1.37.0

New Features

  • Experiment Tracking: end_run now accepts an optional status argument ("FINISHED" or "FAILED") to explicitly
    set the final run status. When a run's context manager exits with an exception, the status is automatically set to
    "FAILED".

Bug Fixes

  • Registry: Fixed log_model() failing for some Snowpark ML Pipeline models with explainability when the
    full pipeline could not be converted to a native object; task inference now uses the final estimator instead.

  • Registry: run_batch() now raises a clear ValueError when a partitioned model's output signature
    includes the partition column. Previously this produced duplicate columns in the output, causing
    cryptic Ray/Arrow errors (AttributeError or KeyError) deep in the batch inference pipeline.

Behavior Changes

Deprecations