2.0.0
2.0.0
Release candidate for the snowflake-ml-python 2.0 major release. This is a breaking
release that removes deprecated APIs and slims down the default install footprint.
New Features
- Feature Store: added
alter_online_service(size=...), which changes the size of an existing Online Service. The
call returns as soon as the request is recorded; the change runs in the background and can take hours on a large
Online Service, which keeps serving online reads and stream ingestion throughout. Poll
get_online_service_status()untilstatusisRUNNINGat the requested size.
Bug Fixes
- Feature Store:
delete_feature_viewnow drops the online feature table before the
offline dynamic table or view, so a dependent FeatureGroup (error 099940) does not
leave an orphaned offline object.
Behavior Changes
- Registry: Models logged from a Snowflake Container Runtime notebook without an explicit
target_platformsnow default to both Warehouse and Snowpark Container Services instead of
Snowpark Container Services only. Warehouse is no longer dropped from the default target
platforms. - Dependencies:
scikit-learn,xgboost, andshapare no longer required dependencies of
snowflake-ml-python. They are now optional extras. Install them with
pip install snowflake-ml-python[scikit-learn],[xgboost],[shap], or[all]when using
the corresponding functionality. Extras are independent:[xgboost]and[lightgbm]install
only those libraries, notscikit-learn. Native XGBoost or LightGBM models (for example
logging to the Model Registry) only need[xgboost]or[lightgbm].
snowflake.ml.modelingestimators always requirescikit-learn, so the XGBoost and LightGBM
wrappers needpip install "snowflake-ml-python[xgboost,scikit-learn]"or
"snowflake-ml-python[lightgbm,scikit-learn]". - Feature Store: Added an optional
feature_storeextra. Installsnowflake-ml-python[feature_store]
to pull inhttpx, which is required for online feature serving reads.httpxis not installed by
the defaultsnowflake-ml-pythoninstall. Conda users still need to installhttpxseparately
(for exampleconda install httpx) to use the online Feature Store. - Modeling: Importing a
snowflake.ml.modelingsubpackage (for example
snowflake.ml.modeling.linear_model,snowflake.ml.modeling.xgboost,
snowflake.ml.modeling.lightgbm, orsnowflake.ml.modeling.preprocessing) without the optional
dependencies it needs now raises an actionableImportErrorthat names only the missing
package(s), instead of a confusing missing-attribute error.
scikit-learnandxgboostare attributed to the 2.0 dependency change;lightgbmwas
already an optional extra before 2.0.
Deprecations
- Modeling: The
snowflake.ml.modelingestimators and preprocessing transformers are deprecated and
will be removed in a future release. Importing asnowflake.ml.modelingsubpackage now emits a
DeprecationWarning. Train models with the native scikit-learn, XGBoost, or LightGBM estimators
and log them to the Snowflake Model Registry (snowflake.ml.registry) instead.
Breaking Changes
- Generic: Require python >= 3.10. Python 3.9 is no longer supported.
- Removed the deprecated
snowflake.ml.utils.connection_params.SnowflakeLoginOptionspublic API
(deprecated since 1.8.5). - Registry:
ModelVersion.run_batchnow runs onEXECUTE INFERENCE JOB SERVICE. The single
job_specargument is replaced by theresources_spec,inference_spec, andimage_build_spec
blocks, and input may be supplied as either a DataFrame (X) or an existing stage path
(input_stage_location).output_spec.stage_locationis treated as a base: results are written
under a per-job subdirectory,<stage_location>/<job_name>/.output_spec.base_stage_location,
job_spec.job_name_prefix, andjob_spec.blockno longer exist. - Registry: Removed the
snowflake.ml.model.batchmodule. Usesnowflake.ml.model.batch_inference,
which exportsBatchInferenceTaskalongside the input, output, resources, inference, and image
build spec classes. - Feature Store: Feature views created before 1.42.0 that use the
last_distinct_nor
first_distinct_naggregation function can no longer be read offline.generate_dataset,
generate_training_set,retrieve_feature_values, andread_feature_viewnow raise a
ValueErrorfor such feature views. Re-create the feature view to restore offline reads. - Dependencies:
snowflake-snowpark-pythonmust now be>=1.37.0. Earlier releases import
pkg_resources, whichsetuptoolsremoved in 82.0.0, so they fail to import in environments
with a currentsetuptools.