snowflake-ml-python 1.7.2__py3-none-any.whl → 1.7.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- snowflake/cortex/__init__.py +16 -8
- snowflake/cortex/_classify_text.py +12 -1
- snowflake/cortex/_complete.py +101 -13
- snowflake/cortex/_embed_text_1024.py +9 -2
- snowflake/cortex/_embed_text_768.py +9 -2
- snowflake/cortex/_extract_answer.py +9 -2
- snowflake/cortex/_sentiment.py +9 -2
- snowflake/cortex/_summarize.py +9 -2
- snowflake/cortex/_translate.py +9 -2
- snowflake/ml/_internal/env_utils.py +7 -52
- snowflake/ml/_internal/platform_capabilities.py +87 -0
- snowflake/ml/_internal/utils/identifier.py +4 -2
- snowflake/ml/data/__init__.py +3 -0
- snowflake/ml/data/_internal/arrow_ingestor.py +4 -4
- snowflake/ml/data/data_connector.py +53 -11
- snowflake/ml/data/data_ingestor.py +2 -1
- snowflake/ml/data/torch_utils.py +18 -5
- snowflake/ml/dataset/dataset.py +0 -1
- snowflake/ml/feature_store/examples/example_helper.py +2 -1
- snowflake/ml/fileset/fileset.py +24 -18
- snowflake/ml/jobs/__init__.py +21 -0
- snowflake/ml/jobs/_utils/constants.py +51 -0
- snowflake/ml/jobs/_utils/payload_utils.py +352 -0
- snowflake/ml/jobs/_utils/spec_utils.py +298 -0
- snowflake/ml/jobs/_utils/types.py +39 -0
- snowflake/ml/jobs/decorators.py +91 -0
- snowflake/ml/jobs/job.py +113 -0
- snowflake/ml/jobs/manager.py +298 -0
- snowflake/ml/model/_client/model/model_version_impl.py +5 -3
- snowflake/ml/model/_client/ops/model_ops.py +13 -8
- snowflake/ml/model/_client/ops/service_ops.py +1 -11
- snowflake/ml/model/_client/sql/model_version.py +11 -0
- snowflake/ml/model/_client/sql/service.py +13 -6
- snowflake/ml/model/_model_composer/model_composer.py +8 -3
- snowflake/ml/model/_model_composer/model_manifest/model_manifest.py +20 -1
- snowflake/ml/model/_model_composer/model_manifest/model_manifest_schema.py +1 -0
- snowflake/ml/model/_model_composer/model_method/constants.py +1 -0
- snowflake/ml/model/_model_composer/model_method/function_generator.py +2 -0
- snowflake/ml/model/_model_composer/model_method/infer_function.py_template +1 -1
- snowflake/ml/model/_model_composer/model_method/infer_partitioned.py_template +1 -1
- snowflake/ml/model/_model_composer/model_method/infer_table_function.py_template +1 -1
- snowflake/ml/model/_model_composer/model_method/model_method.py +9 -1
- snowflake/ml/model/_model_composer/model_user_file/model_user_file.py +27 -0
- snowflake/ml/model/_packager/model_handlers/_utils.py +39 -5
- snowflake/ml/model/_packager/model_handlers/catboost.py +3 -3
- snowflake/ml/model/_packager/model_handlers/custom.py +1 -2
- snowflake/ml/model/_packager/model_handlers/huggingface_pipeline.py +6 -1
- snowflake/ml/model/_packager/model_handlers/lightgbm.py +5 -3
- snowflake/ml/model/_packager/model_handlers/sentence_transformers.py +55 -20
- snowflake/ml/model/_packager/model_handlers/sklearn.py +9 -10
- snowflake/ml/model/_packager/model_handlers/snowmlmodel.py +66 -28
- snowflake/ml/model/_packager/model_handlers/tensorflow.py +70 -17
- snowflake/ml/model/_packager/model_handlers/xgboost.py +3 -3
- snowflake/ml/model/_packager/model_meta/model_meta.py +3 -0
- snowflake/ml/model/_packager/model_meta/model_meta_schema.py +6 -1
- snowflake/ml/model/_packager/model_runtime/_snowml_inference_alternative_requirements.py +2 -2
- snowflake/ml/model/_packager/model_task/model_task_utils.py +3 -2
- snowflake/ml/model/_signatures/base_handler.py +1 -2
- snowflake/ml/model/_signatures/builtins_handler.py +2 -2
- snowflake/ml/model/_signatures/numpy_handler.py +6 -7
- snowflake/ml/model/_signatures/pandas_handler.py +3 -3
- snowflake/ml/model/_signatures/pytorch_handler.py +2 -5
- snowflake/ml/model/_signatures/snowpark_handler.py +11 -5
- snowflake/ml/model/_signatures/tensorflow_handler.py +2 -7
- snowflake/ml/model/model_signature.py +17 -4
- snowflake/ml/model/type_hints.py +1 -0
- snowflake/ml/modeling/_internal/model_trainer_builder.py +0 -8
- snowflake/ml/modeling/_internal/model_transformer_builder.py +0 -13
- snowflake/ml/modeling/calibration/calibrated_classifier_cv.py +6 -3
- snowflake/ml/modeling/cluster/affinity_propagation.py +6 -3
- snowflake/ml/modeling/cluster/agglomerative_clustering.py +6 -3
- snowflake/ml/modeling/cluster/birch.py +6 -3
- snowflake/ml/modeling/cluster/bisecting_k_means.py +6 -3
- snowflake/ml/modeling/cluster/dbscan.py +6 -3
- snowflake/ml/modeling/cluster/feature_agglomeration.py +6 -3
- snowflake/ml/modeling/cluster/k_means.py +6 -3
- snowflake/ml/modeling/cluster/mean_shift.py +6 -3
- snowflake/ml/modeling/cluster/mini_batch_k_means.py +6 -3
- snowflake/ml/modeling/cluster/optics.py +6 -3
- snowflake/ml/modeling/cluster/spectral_biclustering.py +6 -3
- snowflake/ml/modeling/cluster/spectral_clustering.py +6 -3
- snowflake/ml/modeling/cluster/spectral_coclustering.py +6 -3
- snowflake/ml/modeling/compose/column_transformer.py +6 -3
- snowflake/ml/modeling/compose/transformed_target_regressor.py +6 -3
- snowflake/ml/modeling/covariance/elliptic_envelope.py +6 -3
- snowflake/ml/modeling/covariance/empirical_covariance.py +6 -3
- snowflake/ml/modeling/covariance/graphical_lasso.py +6 -3
- snowflake/ml/modeling/covariance/graphical_lasso_cv.py +6 -3
- snowflake/ml/modeling/covariance/ledoit_wolf.py +6 -3
- snowflake/ml/modeling/covariance/min_cov_det.py +6 -3
- snowflake/ml/modeling/covariance/oas.py +6 -3
- snowflake/ml/modeling/covariance/shrunk_covariance.py +6 -3
- snowflake/ml/modeling/decomposition/dictionary_learning.py +6 -3
- snowflake/ml/modeling/decomposition/factor_analysis.py +6 -3
- snowflake/ml/modeling/decomposition/fast_ica.py +6 -3
- snowflake/ml/modeling/decomposition/incremental_pca.py +6 -3
- snowflake/ml/modeling/decomposition/kernel_pca.py +6 -3
- snowflake/ml/modeling/decomposition/mini_batch_dictionary_learning.py +6 -3
- snowflake/ml/modeling/decomposition/mini_batch_sparse_pca.py +6 -3
- snowflake/ml/modeling/decomposition/pca.py +6 -3
- snowflake/ml/modeling/decomposition/sparse_pca.py +6 -3
- snowflake/ml/modeling/decomposition/truncated_svd.py +6 -3
- snowflake/ml/modeling/discriminant_analysis/linear_discriminant_analysis.py +6 -3
- snowflake/ml/modeling/discriminant_analysis/quadratic_discriminant_analysis.py +6 -3
- snowflake/ml/modeling/ensemble/ada_boost_classifier.py +6 -3
- snowflake/ml/modeling/ensemble/ada_boost_regressor.py +6 -3
- snowflake/ml/modeling/ensemble/bagging_classifier.py +6 -3
- snowflake/ml/modeling/ensemble/bagging_regressor.py +6 -3
- snowflake/ml/modeling/ensemble/extra_trees_classifier.py +6 -3
- snowflake/ml/modeling/ensemble/extra_trees_regressor.py +6 -3
- snowflake/ml/modeling/ensemble/gradient_boosting_classifier.py +6 -3
- snowflake/ml/modeling/ensemble/gradient_boosting_regressor.py +6 -3
- snowflake/ml/modeling/ensemble/hist_gradient_boosting_classifier.py +6 -3
- snowflake/ml/modeling/ensemble/hist_gradient_boosting_regressor.py +6 -3
- snowflake/ml/modeling/ensemble/isolation_forest.py +6 -3
- snowflake/ml/modeling/ensemble/random_forest_classifier.py +6 -3
- snowflake/ml/modeling/ensemble/random_forest_regressor.py +6 -3
- snowflake/ml/modeling/ensemble/stacking_regressor.py +6 -3
- snowflake/ml/modeling/ensemble/voting_classifier.py +6 -3
- snowflake/ml/modeling/ensemble/voting_regressor.py +6 -3
- snowflake/ml/modeling/feature_selection/generic_univariate_select.py +6 -3
- snowflake/ml/modeling/feature_selection/select_fdr.py +6 -3
- snowflake/ml/modeling/feature_selection/select_fpr.py +6 -3
- snowflake/ml/modeling/feature_selection/select_fwe.py +6 -3
- snowflake/ml/modeling/feature_selection/select_k_best.py +6 -3
- snowflake/ml/modeling/feature_selection/select_percentile.py +6 -3
- snowflake/ml/modeling/feature_selection/sequential_feature_selector.py +6 -3
- snowflake/ml/modeling/feature_selection/variance_threshold.py +6 -3
- snowflake/ml/modeling/gaussian_process/gaussian_process_classifier.py +6 -3
- snowflake/ml/modeling/gaussian_process/gaussian_process_regressor.py +6 -3
- snowflake/ml/modeling/impute/iterative_imputer.py +6 -3
- snowflake/ml/modeling/impute/knn_imputer.py +6 -3
- snowflake/ml/modeling/impute/missing_indicator.py +6 -3
- snowflake/ml/modeling/kernel_approximation/additive_chi2_sampler.py +6 -3
- snowflake/ml/modeling/kernel_approximation/nystroem.py +6 -3
- snowflake/ml/modeling/kernel_approximation/polynomial_count_sketch.py +6 -3
- snowflake/ml/modeling/kernel_approximation/rbf_sampler.py +6 -3
- snowflake/ml/modeling/kernel_approximation/skewed_chi2_sampler.py +6 -3
- snowflake/ml/modeling/kernel_ridge/kernel_ridge.py +6 -3
- snowflake/ml/modeling/lightgbm/lgbm_classifier.py +6 -3
- snowflake/ml/modeling/lightgbm/lgbm_regressor.py +6 -3
- snowflake/ml/modeling/linear_model/ard_regression.py +6 -3
- snowflake/ml/modeling/linear_model/bayesian_ridge.py +6 -3
- snowflake/ml/modeling/linear_model/elastic_net.py +6 -3
- snowflake/ml/modeling/linear_model/elastic_net_cv.py +6 -3
- snowflake/ml/modeling/linear_model/gamma_regressor.py +6 -3
- snowflake/ml/modeling/linear_model/huber_regressor.py +6 -3
- snowflake/ml/modeling/linear_model/lars.py +6 -3
- snowflake/ml/modeling/linear_model/lars_cv.py +6 -3
- snowflake/ml/modeling/linear_model/lasso.py +6 -3
- snowflake/ml/modeling/linear_model/lasso_cv.py +6 -3
- snowflake/ml/modeling/linear_model/lasso_lars.py +6 -3
- snowflake/ml/modeling/linear_model/lasso_lars_cv.py +6 -3
- snowflake/ml/modeling/linear_model/lasso_lars_ic.py +6 -3
- snowflake/ml/modeling/linear_model/linear_regression.py +6 -3
- snowflake/ml/modeling/linear_model/logistic_regression.py +6 -3
- snowflake/ml/modeling/linear_model/logistic_regression_cv.py +6 -3
- snowflake/ml/modeling/linear_model/multi_task_elastic_net.py +6 -3
- snowflake/ml/modeling/linear_model/multi_task_elastic_net_cv.py +6 -3
- snowflake/ml/modeling/linear_model/multi_task_lasso.py +6 -3
- snowflake/ml/modeling/linear_model/multi_task_lasso_cv.py +6 -3
- snowflake/ml/modeling/linear_model/orthogonal_matching_pursuit.py +6 -3
- snowflake/ml/modeling/linear_model/passive_aggressive_classifier.py +6 -3
- snowflake/ml/modeling/linear_model/passive_aggressive_regressor.py +6 -3
- snowflake/ml/modeling/linear_model/perceptron.py +6 -3
- snowflake/ml/modeling/linear_model/poisson_regressor.py +6 -3
- snowflake/ml/modeling/linear_model/ransac_regressor.py +6 -3
- snowflake/ml/modeling/linear_model/ridge.py +6 -3
- snowflake/ml/modeling/linear_model/ridge_classifier.py +6 -3
- snowflake/ml/modeling/linear_model/ridge_classifier_cv.py +6 -3
- snowflake/ml/modeling/linear_model/ridge_cv.py +6 -3
- snowflake/ml/modeling/linear_model/sgd_classifier.py +6 -3
- snowflake/ml/modeling/linear_model/sgd_one_class_svm.py +6 -3
- snowflake/ml/modeling/linear_model/sgd_regressor.py +6 -3
- snowflake/ml/modeling/linear_model/theil_sen_regressor.py +6 -3
- snowflake/ml/modeling/linear_model/tweedie_regressor.py +6 -3
- snowflake/ml/modeling/manifold/isomap.py +6 -3
- snowflake/ml/modeling/manifold/mds.py +6 -3
- snowflake/ml/modeling/manifold/spectral_embedding.py +6 -3
- snowflake/ml/modeling/manifold/tsne.py +6 -3
- snowflake/ml/modeling/mixture/bayesian_gaussian_mixture.py +6 -3
- snowflake/ml/modeling/mixture/gaussian_mixture.py +6 -3
- snowflake/ml/modeling/model_selection/grid_search_cv.py +17 -2
- snowflake/ml/modeling/model_selection/randomized_search_cv.py +17 -2
- snowflake/ml/modeling/multiclass/one_vs_one_classifier.py +6 -3
- snowflake/ml/modeling/multiclass/one_vs_rest_classifier.py +6 -3
- snowflake/ml/modeling/multiclass/output_code_classifier.py +6 -3
- snowflake/ml/modeling/naive_bayes/bernoulli_nb.py +6 -3
- snowflake/ml/modeling/naive_bayes/categorical_nb.py +6 -3
- snowflake/ml/modeling/naive_bayes/complement_nb.py +6 -3
- snowflake/ml/modeling/naive_bayes/gaussian_nb.py +6 -3
- snowflake/ml/modeling/naive_bayes/multinomial_nb.py +6 -3
- snowflake/ml/modeling/neighbors/k_neighbors_classifier.py +6 -3
- snowflake/ml/modeling/neighbors/k_neighbors_regressor.py +6 -3
- snowflake/ml/modeling/neighbors/kernel_density.py +6 -3
- snowflake/ml/modeling/neighbors/local_outlier_factor.py +6 -3
- snowflake/ml/modeling/neighbors/nearest_centroid.py +6 -3
- snowflake/ml/modeling/neighbors/nearest_neighbors.py +6 -3
- snowflake/ml/modeling/neighbors/neighborhood_components_analysis.py +6 -3
- snowflake/ml/modeling/neighbors/radius_neighbors_classifier.py +6 -3
- snowflake/ml/modeling/neighbors/radius_neighbors_regressor.py +6 -3
- snowflake/ml/modeling/neural_network/bernoulli_rbm.py +6 -3
- snowflake/ml/modeling/neural_network/mlp_classifier.py +6 -3
- snowflake/ml/modeling/neural_network/mlp_regressor.py +6 -3
- snowflake/ml/modeling/pipeline/pipeline.py +16 -178
- snowflake/ml/modeling/preprocessing/polynomial_features.py +6 -3
- snowflake/ml/modeling/semi_supervised/label_propagation.py +6 -3
- snowflake/ml/modeling/semi_supervised/label_spreading.py +6 -3
- snowflake/ml/modeling/svm/linear_svc.py +6 -3
- snowflake/ml/modeling/svm/linear_svr.py +6 -3
- snowflake/ml/modeling/svm/nu_svc.py +6 -3
- snowflake/ml/modeling/svm/nu_svr.py +6 -3
- snowflake/ml/modeling/svm/svc.py +6 -3
- snowflake/ml/modeling/svm/svr.py +6 -3
- snowflake/ml/modeling/tree/decision_tree_classifier.py +6 -3
- snowflake/ml/modeling/tree/decision_tree_regressor.py +6 -3
- snowflake/ml/modeling/tree/extra_tree_classifier.py +6 -3
- snowflake/ml/modeling/tree/extra_tree_regressor.py +6 -3
- snowflake/ml/modeling/xgboost/xgb_classifier.py +167 -91
- snowflake/ml/modeling/xgboost/xgb_regressor.py +166 -88
- snowflake/ml/modeling/xgboost/xgbrf_classifier.py +166 -88
- snowflake/ml/modeling/xgboost/xgbrf_regressor.py +166 -88
- snowflake/ml/monitoring/_client/model_monitor_sql_client.py +4 -4
- snowflake/ml/registry/_manager/model_manager.py +70 -33
- snowflake/ml/registry/registry.py +41 -22
- snowflake/ml/version.py +1 -1
- {snowflake_ml_python-1.7.2.dist-info → snowflake_ml_python-1.7.4.dist-info}/METADATA +63 -19
- {snowflake_ml_python-1.7.2.dist-info → snowflake_ml_python-1.7.4.dist-info}/RECORD +231 -226
- {snowflake_ml_python-1.7.2.dist-info → snowflake_ml_python-1.7.4.dist-info}/WHEEL +1 -1
- snowflake/ml/_internal/utils/retryable_http.py +0 -39
- snowflake/ml/fileset/parquet_parser.py +0 -170
- snowflake/ml/fileset/tf_dataset.py +0 -88
- snowflake/ml/fileset/torch_datapipe.py +0 -57
- snowflake/ml/modeling/_internal/ml_runtime_implementations/ml_runtime_handlers.py +0 -151
- snowflake/ml/modeling/_internal/ml_runtime_implementations/ml_runtime_trainer.py +0 -66
- {snowflake_ml_python-1.7.2.dist-info → snowflake_ml_python-1.7.4.dist-info}/LICENSE.txt +0 -0
- {snowflake_ml_python-1.7.2.dist-info → snowflake_ml_python-1.7.4.dist-info}/top_level.txt +0 -0
@@ -117,41 +117,49 @@ class Registry:
|
|
117
117
|
options: Optional[model_types.ModelSaveOption] = None,
|
118
118
|
) -> ModelVersion:
|
119
119
|
"""
|
120
|
-
Log a model with various parameters and metadata.
|
120
|
+
Log a model with various parameters and metadata, or a ModelVersion object.
|
121
121
|
|
122
122
|
Args:
|
123
|
-
model:
|
124
|
-
|
125
|
-
|
126
|
-
|
123
|
+
model: Supported model or ModelVersion object.
|
124
|
+
- Supported model: Model object of supported types such as Scikit-learn, XGBoost, LightGBM, Snowpark ML,
|
125
|
+
PyTorch, TorchScript, Tensorflow, Tensorflow Keras, MLFlow, HuggingFace Pipeline, Sentence Transformers,
|
126
|
+
or Custom Model.
|
127
|
+
- ModelVersion: Source ModelVersion object used to create the new ModelVersion object.
|
128
|
+
model_name: Name to identify the model. This must be a valid Snowflake SQL Identifier. Alphanumeric
|
129
|
+
characters and underscores are permitted.
|
130
|
+
See https://docs.snowflake.com/en/sql-reference/identifiers-syntax for more.
|
127
131
|
version_name: Version identifier for the model. Combination of model_name and version_name must be unique.
|
128
132
|
If not specified, a random name will be generated.
|
129
133
|
comment: Comment associated with the model version. Defaults to None.
|
130
134
|
metrics: A JSON serializable dictionary containing metrics linked to the model version. Defaults to None.
|
131
|
-
signatures: Model data signatures for inputs and outputs for various target methods. If it is None,
|
132
|
-
sample_input_data would be used to infer the signatures for those models that cannot automatically
|
133
|
-
infer the signature. Defaults to None.
|
134
|
-
sample_input_data: Sample input data to infer model signatures from.
|
135
|
-
It would also be used as background data in explanation and to capture data lineage. Defaults to None.
|
136
135
|
conda_dependencies: List of Conda package specifications. Use "[channel::]package [operator version]" syntax
|
137
136
|
to specify a dependency. It is a recommended way to specify your dependencies using conda. When channel
|
138
137
|
is not specified, Snowflake Anaconda Channel will be used. Defaults to None.
|
139
138
|
pip_requirements: List of Pip package specifications. Defaults to None.
|
140
|
-
|
141
|
-
|
139
|
+
Models with pip requirements are currently only runnable in Snowpark Container Services.
|
140
|
+
See https://docs.snowflake.com/en/developer-guide/snowflake-ml/model-registry/container for more.
|
141
|
+
Models with pip requirements specified will not be executable in Snowflake Warehouse where all
|
142
|
+
dependencies must be retrieved from Snowflake Anaconda Channel.
|
142
143
|
target_platforms: List of target platforms to run the model. The only acceptable inputs are a combination of
|
143
144
|
{"WAREHOUSE", "SNOWPARK_CONTAINER_SERVICES"}. Defaults to None.
|
144
145
|
python_version: Python version in which the model is run. Defaults to None.
|
146
|
+
signatures: Model data signatures for inputs and outputs for various target methods. If it is None,
|
147
|
+
sample_input_data would be used to infer the signatures for those models that cannot automatically
|
148
|
+
infer the signature. If not None, sample_input_data should not be specified. Defaults to None.
|
149
|
+
sample_input_data: Sample input data to infer model signatures from.
|
150
|
+
It would also be used as background data in explanation and to capture data lineage. Defaults to None.
|
145
151
|
code_paths: List of directories containing code to import. Defaults to None.
|
146
152
|
ext_modules: List of external modules to pickle with the model object.
|
147
153
|
Only supported when logging the following types of model:
|
148
154
|
Scikit-learn, Snowpark ML, PyTorch, TorchScript and Custom Model. Defaults to None.
|
149
155
|
options (Dict[str, Any], optional): Additional model saving options.
|
156
|
+
|
150
157
|
Model Saving Options include:
|
158
|
+
|
151
159
|
- embed_local_ml_library: Embed local Snowpark ML into the code directory or folder.
|
152
160
|
Override to True if the local Snowpark ML version is not available in the Snowflake Anaconda
|
153
161
|
Channel. Otherwise, defaults to False
|
154
|
-
- relax_version: Whether
|
162
|
+
- relax_version: Whether to relax the version constraints of the dependencies when running in the
|
155
163
|
Warehouse. It detects any ==x.y.z in specifiers and replaced with >=x.y, <(x+1). Defaults to True.
|
156
164
|
- function_type: Set the method function type globally. To set method function types individually see
|
157
165
|
function_type in model_options.
|
@@ -163,7 +171,10 @@ class Registry:
|
|
163
171
|
- max_batch_size: Maximum batch size that the method could accept in the Snowflake Warehouse.
|
164
172
|
Defaults to None, determined automatically by Snowflake.
|
165
173
|
- function_type: One of supported model method function types (FUNCTION or TABLE_FUNCTION).
|
174
|
+
Returns:
|
175
|
+
ModelVersion: ModelVersion object corresponding to the model just logged.
|
166
176
|
"""
|
177
|
+
|
167
178
|
...
|
168
179
|
|
169
180
|
@overload
|
@@ -214,6 +225,7 @@ class Registry:
|
|
214
225
|
python_version: Optional[str] = None,
|
215
226
|
signatures: Optional[Dict[str, model_signature.ModelSignature]] = None,
|
216
227
|
sample_input_data: Optional[model_types.SupportedDataType] = None,
|
228
|
+
user_files: Optional[Dict[str, List[str]]] = None,
|
217
229
|
code_paths: Optional[List[str]] = None,
|
218
230
|
ext_modules: Optional[List[ModuleType]] = None,
|
219
231
|
task: model_types.Task = model_types.Task.UNKNOWN,
|
@@ -228,25 +240,31 @@ class Registry:
|
|
228
240
|
PyTorch, TorchScript, Tensorflow, Tensorflow Keras, MLFlow, HuggingFace Pipeline, Sentence Transformers,
|
229
241
|
or Custom Model.
|
230
242
|
- ModelVersion: Source ModelVersion object used to create the new ModelVersion object.
|
231
|
-
model_name: Name to identify the model.
|
243
|
+
model_name: Name to identify the model. This must be a valid Snowflake SQL Identifier. Alphanumeric
|
244
|
+
characters and underscores are permitted.
|
245
|
+
See https://docs.snowflake.com/en/sql-reference/identifiers-syntax for more.
|
232
246
|
version_name: Version identifier for the model. Combination of model_name and version_name must be unique.
|
233
247
|
If not specified, a random name will be generated.
|
234
248
|
comment: Comment associated with the model version. Defaults to None.
|
235
249
|
metrics: A JSON serializable dictionary containing metrics linked to the model version. Defaults to None.
|
236
|
-
signatures: Model data signatures for inputs and outputs for various target methods. If it is None,
|
237
|
-
sample_input_data would be used to infer the signatures for those models that cannot automatically
|
238
|
-
infer the signature. If not None, sample_input_data should not be specified. Defaults to None.
|
239
|
-
sample_input_data: Sample input data to infer model signatures from.
|
240
|
-
It would also be used as background data in explanation and to capture data lineage. Defaults to None.
|
241
250
|
conda_dependencies: List of Conda package specifications. Use "[channel::]package [operator version]" syntax
|
242
251
|
to specify a dependency. It is a recommended way to specify your dependencies using conda. When channel
|
243
252
|
is not specified, Snowflake Anaconda Channel will be used. Defaults to None.
|
244
253
|
pip_requirements: List of Pip package specifications. Defaults to None.
|
245
|
-
|
246
|
-
|
254
|
+
Models with pip requirements are currently only runnable in Snowpark Container Services.
|
255
|
+
See https://docs.snowflake.com/en/developer-guide/snowflake-ml/model-registry/container for more.
|
256
|
+
Models with pip requirements specified will not be executable in Snowflake Warehouse where all
|
257
|
+
dependencies must be retrieved from Snowflake Anaconda Channel.
|
247
258
|
target_platforms: List of target platforms to run the model. The only acceptable inputs are a combination of
|
248
259
|
{"WAREHOUSE", "SNOWPARK_CONTAINER_SERVICES"}. Defaults to None.
|
249
260
|
python_version: Python version in which the model is run. Defaults to None.
|
261
|
+
signatures: Model data signatures for inputs and outputs for various target methods. If it is None,
|
262
|
+
sample_input_data would be used to infer the signatures for those models that cannot automatically
|
263
|
+
infer the signature. If not None, sample_input_data should not be specified. Defaults to None.
|
264
|
+
sample_input_data: Sample input data to infer model signatures from.
|
265
|
+
It would also be used as background data in explanation and to capture data lineage. Defaults to None.
|
266
|
+
user_files: Dictionary where the keys are subdirectories, and values are lists of local file name
|
267
|
+
strings. The local file name strings can include wildcards (? or *) for matching multiple files.
|
250
268
|
code_paths: List of directories containing code to import. Defaults to None.
|
251
269
|
ext_modules: List of external modules to pickle with the model object.
|
252
270
|
Only supported when logging the following types of model:
|
@@ -261,7 +279,7 @@ class Registry:
|
|
261
279
|
- embed_local_ml_library: Embed local Snowpark ML into the code directory or folder.
|
262
280
|
Override to True if the local Snowpark ML version is not available in the Snowflake Anaconda
|
263
281
|
Channel. Otherwise, defaults to False
|
264
|
-
- relax_version: Whether
|
282
|
+
- relax_version: Whether to relax the version constraints of the dependencies when running in the
|
265
283
|
Warehouse. It detects any ==x.y.z in specifiers and replaced with >=x.y, <(x+1). Defaults to True.
|
266
284
|
- function_type: Set the method function type globally. To set method function types individually see
|
267
285
|
function_type in model_options.
|
@@ -301,6 +319,7 @@ class Registry:
|
|
301
319
|
python_version=python_version,
|
302
320
|
signatures=signatures,
|
303
321
|
sample_input_data=sample_input_data,
|
322
|
+
user_files=user_files,
|
304
323
|
code_paths=code_paths,
|
305
324
|
ext_modules=ext_modules,
|
306
325
|
task=task,
|
snowflake/ml/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
VERSION="1.7.
|
1
|
+
VERSION="1.7.4"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: snowflake-ml-python
|
3
|
-
Version: 1.7.
|
3
|
+
Version: 1.7.4
|
4
4
|
Summary: The machine learning client library that is used for interacting with Snowflake to build machine learning solutions.
|
5
5
|
Author-email: "Snowflake, Inc" <support@snowflake.com>
|
6
6
|
License:
|
@@ -233,11 +233,11 @@ Requires-Python: <3.12,>=3.9
|
|
233
233
|
Description-Content-Type: text/markdown
|
234
234
|
License-File: LICENSE.txt
|
235
235
|
Requires-Dist: absl-py<2,>=0.15
|
236
|
-
Requires-Dist: anyio<
|
236
|
+
Requires-Dist: anyio<5,>=3.5.0
|
237
237
|
Requires-Dist: cachetools<6,>=3.1.1
|
238
238
|
Requires-Dist: cloudpickle>=2.0.0
|
239
239
|
Requires-Dist: cryptography
|
240
|
-
Requires-Dist: fsspec[http]<2024
|
240
|
+
Requires-Dist: fsspec[http]<2026,>=2024.6.1
|
241
241
|
Requires-Dist: importlib_resources<7,>=6.1.1
|
242
242
|
Requires-Dist: numpy<2,>=1.23
|
243
243
|
Requires-Dist: packaging<25,>=20.9
|
@@ -247,23 +247,24 @@ Requires-Dist: pyjwt<3,>=2.0.0
|
|
247
247
|
Requires-Dist: pytimeparse<2,>=1.1.8
|
248
248
|
Requires-Dist: pyyaml<7,>=6.0
|
249
249
|
Requires-Dist: retrying<2,>=1.3.3
|
250
|
-
Requires-Dist: s3fs<2024
|
250
|
+
Requires-Dist: s3fs<2026,>=2024.6.1
|
251
251
|
Requires-Dist: scikit-learn<1.6,>=1.4
|
252
252
|
Requires-Dist: scipy<2,>=1.9
|
253
253
|
Requires-Dist: snowflake-connector-python[pandas]<4,>=3.5.0
|
254
|
-
Requires-Dist: snowflake-snowpark-python
|
254
|
+
Requires-Dist: snowflake-snowpark-python!=1.26.0,<2,>=1.17.0
|
255
255
|
Requires-Dist: sqlparse<1,>=0.4
|
256
256
|
Requires-Dist: typing-extensions<5,>=4.1.0
|
257
257
|
Requires-Dist: xgboost<3,>=1.7.3
|
258
258
|
Provides-Extra: all
|
259
259
|
Requires-Dist: catboost<2,>=1.2.0; extra == "all"
|
260
|
+
Requires-Dist: huggingface_hub<0.26; extra == "all"
|
260
261
|
Requires-Dist: lightgbm<5,>=4.1.0; extra == "all"
|
261
|
-
Requires-Dist: mlflow<
|
262
|
+
Requires-Dist: mlflow<3,>=2.16.0; extra == "all"
|
262
263
|
Requires-Dist: peft<1,>=0.5.0; extra == "all"
|
263
264
|
Requires-Dist: sentence-transformers<3,>=2.2.2; extra == "all"
|
264
265
|
Requires-Dist: sentencepiece<1,>=0.1.95; extra == "all"
|
265
266
|
Requires-Dist: shap<1,>=0.46.0; extra == "all"
|
266
|
-
Requires-Dist: tensorflow<3,>=2.
|
267
|
+
Requires-Dist: tensorflow<3,>=2.12.0; extra == "all"
|
267
268
|
Requires-Dist: tokenizers<1,>=0.10; extra == "all"
|
268
269
|
Requires-Dist: torch<2.3.0,>=2.0.1; extra == "all"
|
269
270
|
Requires-Dist: torchdata<1,>=0.4; extra == "all"
|
@@ -275,15 +276,16 @@ Requires-Dist: lightgbm<5,>=4.1.0; extra == "lightgbm"
|
|
275
276
|
Provides-Extra: llm
|
276
277
|
Requires-Dist: peft<1,>=0.5.0; extra == "llm"
|
277
278
|
Provides-Extra: mlflow
|
278
|
-
Requires-Dist: mlflow<
|
279
|
+
Requires-Dist: mlflow<3,>=2.16.0; extra == "mlflow"
|
279
280
|
Provides-Extra: shap
|
280
281
|
Requires-Dist: shap<1,>=0.46.0; extra == "shap"
|
281
282
|
Provides-Extra: tensorflow
|
282
|
-
Requires-Dist: tensorflow<3,>=2.
|
283
|
+
Requires-Dist: tensorflow<3,>=2.12.0; extra == "tensorflow"
|
283
284
|
Provides-Extra: torch
|
284
285
|
Requires-Dist: torch<2.3.0,>=2.0.1; extra == "torch"
|
285
286
|
Requires-Dist: torchdata<1,>=0.4; extra == "torch"
|
286
287
|
Provides-Extra: transformers
|
288
|
+
Requires-Dist: huggingface_hub<0.26; extra == "transformers"
|
287
289
|
Requires-Dist: sentence-transformers<3,>=2.2.2; extra == "transformers"
|
288
290
|
Requires-Dist: sentencepiece<1,>=0.1.95; extra == "transformers"
|
289
291
|
Requires-Dist: tokenizers<1,>=0.10; extra == "transformers"
|
@@ -397,19 +399,67 @@ NOTE: Version 1.7.0 is used as example here. Please choose the the latest versio
|
|
397
399
|
|
398
400
|
# Release History
|
399
401
|
|
400
|
-
## 1.7.
|
402
|
+
## 1.7.4
|
403
|
+
|
404
|
+
- FileSet: The `snowflake.ml.fileset.FileSet` has been deprecated and will be removed in a future version.
|
405
|
+
Use [snowflake.ml.dataset.Dataset](https://docs.snowflake.com/en/developer-guide/snowflake-ml/dataset) and
|
406
|
+
[snowflake.ml.data.DataConnector](https://docs.snowflake.com/en/developer-guide/snowpark-ml/reference/latest/api/data/snowflake.ml.data.data_connector.DataConnector)
|
407
|
+
instead.
|
401
408
|
|
402
409
|
### Bug Fixes
|
403
410
|
|
404
|
-
-
|
405
|
-
|
411
|
+
- Registry: Fixed an issue that the hugging face pipeline is loaded using incorrect dtype.
|
412
|
+
- Registry: Fixed an issue that only 1 row is used when infer the model signature in the modeling model.
|
406
413
|
|
407
414
|
### Behavior Changes
|
408
415
|
|
416
|
+
- Registry: `ModelVersion.run` on a service would require redeploying the service once account opts into nested function.
|
417
|
+
|
418
|
+
### New Features
|
419
|
+
|
420
|
+
- Add new `snowflake.ml.jobs` preview API for running headless workloads on SPCS using
|
421
|
+
[Container Runtime for ML](https://docs.snowflake.com/en/developer-guide/snowflake-ml/container-runtime-ml)
|
422
|
+
- Added `guardrails` option to Cortex `complete` function, enabling
|
423
|
+
[Cortex Guard](https://docs.snowflake.com/en/user-guide/snowflake-cortex/llm-functions#cortex-guard) support
|
424
|
+
|
425
|
+
## 1.7.3 (2025-01-08)
|
426
|
+
|
427
|
+
- Added lowercase versions of Cortex functions, added deprecation warning to Capitalized versions.
|
428
|
+
- Bumped the requirements of `fsspec` and `s3fs` to `>=2024.6.1,<2026`
|
429
|
+
- Bumped the requirement of `mlflow` to `>=2.16.0, <3`
|
430
|
+
- Registry: Support 500+ features for model registry
|
431
|
+
|
432
|
+
### Bug Fixes
|
433
|
+
|
434
|
+
- Registry: Fixed a bug when providing non-range index pandas DataFrame as the input to a `ModelVersion.run`.
|
435
|
+
- Registry: Improved random model version name generation to prevent collisions.
|
436
|
+
- Registry: Fix an issue when inferring signature or running inference with Snowpark data that has a column whose type
|
437
|
+
is `ARRAY` and contains `NULL` value.
|
438
|
+
- Registry: `ModelVersion.run` now accepts fully qualified service name.
|
439
|
+
- Monitoring: Fix issue in SDK with creating monitors using fully qualified names.
|
440
|
+
- Registry: Fix error in log_model for any sklearn models with only data pre-processing including pre-processing only
|
441
|
+
pipeline models due to default explainability enablement.
|
442
|
+
|
443
|
+
### New Features
|
444
|
+
|
445
|
+
- Added `user_files` argument to `Registry.log_model` for including images or any extra file with the model.
|
446
|
+
- Registry: Added support for handling Hugging Face model configurations with auto-mapping functionality
|
447
|
+
- DataConnector: Add new `DataConnector.from_sql()` constructor
|
448
|
+
- Registry: Provided new arguments to `snowflake.ml.model.model_signature.infer_signature` method to specify rows limit
|
449
|
+
to be used when inferring the signature.
|
450
|
+
|
451
|
+
## 1.7.2 (2024-11-21)
|
452
|
+
|
453
|
+
### Bug Fixes
|
454
|
+
|
455
|
+
- Model Explainability: Fix issue that explain is enabled for scikit-learn pipeline
|
456
|
+
whose task is UNKNOWN and fails later when invoked.
|
457
|
+
|
409
458
|
### New Features
|
410
459
|
|
411
460
|
- Registry: Support asynchronous model inference service creation with the `block` option
|
412
461
|
in `ModelVersion.create_service()` set to True by default.
|
462
|
+
- Registry: Allow specify `batch_size` when inferencing using sentence-transformers model.
|
413
463
|
|
414
464
|
## 1.7.1 (2024-11-05)
|
415
465
|
|
@@ -424,8 +474,6 @@ signature inference.
|
|
424
474
|
- Dataset: Fix missing `snowflake.ml.dataset.*` module exports in wheel.
|
425
475
|
- Registry: Fix the issue that `tf_keras.Model` is not recognized as keras model when logging.
|
426
476
|
|
427
|
-
### Behavior Changes
|
428
|
-
|
429
477
|
### New Features
|
430
478
|
|
431
479
|
- Registry: Option to `enable_monitoring` set to False by default. This will gate access to preview features of Model Monitoring.
|
@@ -674,10 +722,6 @@ data from explainablity and data lineage.
|
|
674
722
|
- Modeling: Quick fix `import snowflake.ml.modeling.parameters.enable_anonymous_sproc` cannot be imported due to package
|
675
723
|
dependency error.
|
676
724
|
|
677
|
-
### Behavior Changes
|
678
|
-
|
679
|
-
### New Features
|
680
|
-
|
681
725
|
## 1.5.1 (05-22-2024)
|
682
726
|
|
683
727
|
### Bug Fixes
|