snowflake-ml-python 1.11.0__py3-none-any.whl → 1.12.0__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.
Files changed (192) hide show
  1. snowflake/cortex/_complete.py +3 -2
  2. snowflake/ml/_internal/utils/service_logger.py +26 -1
  3. snowflake/ml/experiment/_client/artifact.py +76 -0
  4. snowflake/ml/experiment/_client/experiment_tracking_sql_client.py +64 -1
  5. snowflake/ml/experiment/experiment_tracking.py +89 -4
  6. snowflake/ml/feature_store/feature_store.py +1150 -131
  7. snowflake/ml/feature_store/feature_view.py +122 -0
  8. snowflake/ml/jobs/_utils/constants.py +8 -16
  9. snowflake/ml/jobs/_utils/feature_flags.py +16 -0
  10. snowflake/ml/jobs/_utils/payload_utils.py +19 -5
  11. snowflake/ml/jobs/_utils/scripts/get_instance_ip.py +18 -7
  12. snowflake/ml/jobs/_utils/scripts/mljob_launcher.py +12 -4
  13. snowflake/ml/jobs/_utils/spec_utils.py +4 -6
  14. snowflake/ml/jobs/_utils/types.py +2 -1
  15. snowflake/ml/jobs/job.py +33 -17
  16. snowflake/ml/jobs/manager.py +107 -12
  17. snowflake/ml/model/__init__.py +6 -1
  18. snowflake/ml/model/_client/model/batch_inference_specs.py +27 -0
  19. snowflake/ml/model/_client/model/model_version_impl.py +61 -65
  20. snowflake/ml/model/_client/ops/service_ops.py +73 -154
  21. snowflake/ml/model/_client/service/model_deployment_spec.py +20 -37
  22. snowflake/ml/model/_client/service/model_deployment_spec_schema.py +14 -4
  23. snowflake/ml/model/_packager/model_handlers/huggingface_pipeline.py +207 -2
  24. snowflake/ml/model/_packager/model_handlers/sklearn.py +3 -1
  25. snowflake/ml/model/_packager/model_runtime/_snowml_inference_alternative_requirements.py +3 -3
  26. snowflake/ml/model/_signatures/snowpark_handler.py +1 -1
  27. snowflake/ml/model/_signatures/utils.py +4 -2
  28. snowflake/ml/model/openai_signatures.py +57 -0
  29. snowflake/ml/modeling/_internal/estimator_utils.py +43 -1
  30. snowflake/ml/modeling/_internal/local_implementations/pandas_trainer.py +14 -3
  31. snowflake/ml/modeling/_internal/snowpark_implementations/snowpark_trainer.py +17 -6
  32. snowflake/ml/modeling/calibration/calibrated_classifier_cv.py +1 -1
  33. snowflake/ml/modeling/cluster/affinity_propagation.py +1 -1
  34. snowflake/ml/modeling/cluster/agglomerative_clustering.py +1 -1
  35. snowflake/ml/modeling/cluster/birch.py +1 -1
  36. snowflake/ml/modeling/cluster/bisecting_k_means.py +1 -1
  37. snowflake/ml/modeling/cluster/dbscan.py +1 -1
  38. snowflake/ml/modeling/cluster/feature_agglomeration.py +1 -1
  39. snowflake/ml/modeling/cluster/k_means.py +1 -1
  40. snowflake/ml/modeling/cluster/mean_shift.py +1 -1
  41. snowflake/ml/modeling/cluster/mini_batch_k_means.py +1 -1
  42. snowflake/ml/modeling/cluster/optics.py +1 -1
  43. snowflake/ml/modeling/cluster/spectral_biclustering.py +1 -1
  44. snowflake/ml/modeling/cluster/spectral_clustering.py +1 -1
  45. snowflake/ml/modeling/cluster/spectral_coclustering.py +1 -1
  46. snowflake/ml/modeling/compose/column_transformer.py +1 -1
  47. snowflake/ml/modeling/compose/transformed_target_regressor.py +1 -1
  48. snowflake/ml/modeling/covariance/elliptic_envelope.py +1 -1
  49. snowflake/ml/modeling/covariance/empirical_covariance.py +1 -1
  50. snowflake/ml/modeling/covariance/graphical_lasso.py +1 -1
  51. snowflake/ml/modeling/covariance/graphical_lasso_cv.py +1 -1
  52. snowflake/ml/modeling/covariance/ledoit_wolf.py +1 -1
  53. snowflake/ml/modeling/covariance/min_cov_det.py +1 -1
  54. snowflake/ml/modeling/covariance/oas.py +1 -1
  55. snowflake/ml/modeling/covariance/shrunk_covariance.py +1 -1
  56. snowflake/ml/modeling/decomposition/dictionary_learning.py +1 -1
  57. snowflake/ml/modeling/decomposition/factor_analysis.py +1 -1
  58. snowflake/ml/modeling/decomposition/fast_ica.py +1 -1
  59. snowflake/ml/modeling/decomposition/incremental_pca.py +1 -1
  60. snowflake/ml/modeling/decomposition/kernel_pca.py +1 -1
  61. snowflake/ml/modeling/decomposition/mini_batch_dictionary_learning.py +1 -1
  62. snowflake/ml/modeling/decomposition/mini_batch_sparse_pca.py +1 -1
  63. snowflake/ml/modeling/decomposition/pca.py +1 -1
  64. snowflake/ml/modeling/decomposition/sparse_pca.py +1 -1
  65. snowflake/ml/modeling/decomposition/truncated_svd.py +1 -1
  66. snowflake/ml/modeling/discriminant_analysis/linear_discriminant_analysis.py +1 -1
  67. snowflake/ml/modeling/discriminant_analysis/quadratic_discriminant_analysis.py +1 -1
  68. snowflake/ml/modeling/ensemble/ada_boost_classifier.py +1 -1
  69. snowflake/ml/modeling/ensemble/ada_boost_regressor.py +1 -1
  70. snowflake/ml/modeling/ensemble/bagging_classifier.py +1 -1
  71. snowflake/ml/modeling/ensemble/bagging_regressor.py +1 -1
  72. snowflake/ml/modeling/ensemble/extra_trees_classifier.py +1 -1
  73. snowflake/ml/modeling/ensemble/extra_trees_regressor.py +1 -1
  74. snowflake/ml/modeling/ensemble/gradient_boosting_classifier.py +1 -1
  75. snowflake/ml/modeling/ensemble/gradient_boosting_regressor.py +1 -1
  76. snowflake/ml/modeling/ensemble/hist_gradient_boosting_classifier.py +1 -1
  77. snowflake/ml/modeling/ensemble/hist_gradient_boosting_regressor.py +1 -1
  78. snowflake/ml/modeling/ensemble/isolation_forest.py +1 -1
  79. snowflake/ml/modeling/ensemble/random_forest_classifier.py +1 -1
  80. snowflake/ml/modeling/ensemble/random_forest_regressor.py +1 -1
  81. snowflake/ml/modeling/ensemble/stacking_regressor.py +1 -1
  82. snowflake/ml/modeling/ensemble/voting_classifier.py +1 -1
  83. snowflake/ml/modeling/ensemble/voting_regressor.py +1 -1
  84. snowflake/ml/modeling/feature_selection/generic_univariate_select.py +1 -1
  85. snowflake/ml/modeling/feature_selection/select_fdr.py +1 -1
  86. snowflake/ml/modeling/feature_selection/select_fpr.py +1 -1
  87. snowflake/ml/modeling/feature_selection/select_fwe.py +1 -1
  88. snowflake/ml/modeling/feature_selection/select_k_best.py +1 -1
  89. snowflake/ml/modeling/feature_selection/select_percentile.py +1 -1
  90. snowflake/ml/modeling/feature_selection/sequential_feature_selector.py +1 -1
  91. snowflake/ml/modeling/feature_selection/variance_threshold.py +1 -1
  92. snowflake/ml/modeling/gaussian_process/gaussian_process_classifier.py +1 -1
  93. snowflake/ml/modeling/gaussian_process/gaussian_process_regressor.py +1 -1
  94. snowflake/ml/modeling/impute/iterative_imputer.py +1 -1
  95. snowflake/ml/modeling/impute/knn_imputer.py +1 -1
  96. snowflake/ml/modeling/impute/missing_indicator.py +1 -1
  97. snowflake/ml/modeling/kernel_approximation/additive_chi2_sampler.py +1 -1
  98. snowflake/ml/modeling/kernel_approximation/nystroem.py +1 -1
  99. snowflake/ml/modeling/kernel_approximation/polynomial_count_sketch.py +1 -1
  100. snowflake/ml/modeling/kernel_approximation/rbf_sampler.py +1 -1
  101. snowflake/ml/modeling/kernel_approximation/skewed_chi2_sampler.py +1 -1
  102. snowflake/ml/modeling/kernel_ridge/kernel_ridge.py +1 -1
  103. snowflake/ml/modeling/lightgbm/lgbm_classifier.py +1 -1
  104. snowflake/ml/modeling/lightgbm/lgbm_regressor.py +1 -1
  105. snowflake/ml/modeling/linear_model/ard_regression.py +1 -1
  106. snowflake/ml/modeling/linear_model/bayesian_ridge.py +1 -1
  107. snowflake/ml/modeling/linear_model/elastic_net.py +1 -1
  108. snowflake/ml/modeling/linear_model/elastic_net_cv.py +1 -1
  109. snowflake/ml/modeling/linear_model/gamma_regressor.py +1 -1
  110. snowflake/ml/modeling/linear_model/huber_regressor.py +1 -1
  111. snowflake/ml/modeling/linear_model/lars.py +1 -1
  112. snowflake/ml/modeling/linear_model/lars_cv.py +1 -1
  113. snowflake/ml/modeling/linear_model/lasso.py +1 -1
  114. snowflake/ml/modeling/linear_model/lasso_cv.py +1 -1
  115. snowflake/ml/modeling/linear_model/lasso_lars.py +1 -1
  116. snowflake/ml/modeling/linear_model/lasso_lars_cv.py +1 -1
  117. snowflake/ml/modeling/linear_model/lasso_lars_ic.py +1 -1
  118. snowflake/ml/modeling/linear_model/linear_regression.py +1 -1
  119. snowflake/ml/modeling/linear_model/logistic_regression.py +1 -1
  120. snowflake/ml/modeling/linear_model/logistic_regression_cv.py +1 -1
  121. snowflake/ml/modeling/linear_model/multi_task_elastic_net.py +1 -1
  122. snowflake/ml/modeling/linear_model/multi_task_elastic_net_cv.py +1 -1
  123. snowflake/ml/modeling/linear_model/multi_task_lasso.py +1 -1
  124. snowflake/ml/modeling/linear_model/multi_task_lasso_cv.py +1 -1
  125. snowflake/ml/modeling/linear_model/orthogonal_matching_pursuit.py +1 -1
  126. snowflake/ml/modeling/linear_model/passive_aggressive_classifier.py +1 -1
  127. snowflake/ml/modeling/linear_model/passive_aggressive_regressor.py +1 -1
  128. snowflake/ml/modeling/linear_model/perceptron.py +1 -1
  129. snowflake/ml/modeling/linear_model/poisson_regressor.py +1 -1
  130. snowflake/ml/modeling/linear_model/ransac_regressor.py +1 -1
  131. snowflake/ml/modeling/linear_model/ridge.py +1 -1
  132. snowflake/ml/modeling/linear_model/ridge_classifier.py +1 -1
  133. snowflake/ml/modeling/linear_model/ridge_classifier_cv.py +1 -1
  134. snowflake/ml/modeling/linear_model/ridge_cv.py +1 -1
  135. snowflake/ml/modeling/linear_model/sgd_classifier.py +1 -1
  136. snowflake/ml/modeling/linear_model/sgd_one_class_svm.py +1 -1
  137. snowflake/ml/modeling/linear_model/sgd_regressor.py +1 -1
  138. snowflake/ml/modeling/linear_model/theil_sen_regressor.py +1 -1
  139. snowflake/ml/modeling/linear_model/tweedie_regressor.py +1 -1
  140. snowflake/ml/modeling/manifold/isomap.py +1 -1
  141. snowflake/ml/modeling/manifold/mds.py +1 -1
  142. snowflake/ml/modeling/manifold/spectral_embedding.py +1 -1
  143. snowflake/ml/modeling/manifold/tsne.py +1 -1
  144. snowflake/ml/modeling/mixture/bayesian_gaussian_mixture.py +1 -1
  145. snowflake/ml/modeling/mixture/gaussian_mixture.py +1 -1
  146. snowflake/ml/modeling/multiclass/one_vs_one_classifier.py +1 -1
  147. snowflake/ml/modeling/multiclass/one_vs_rest_classifier.py +1 -1
  148. snowflake/ml/modeling/multiclass/output_code_classifier.py +1 -1
  149. snowflake/ml/modeling/naive_bayes/bernoulli_nb.py +1 -1
  150. snowflake/ml/modeling/naive_bayes/categorical_nb.py +1 -1
  151. snowflake/ml/modeling/naive_bayes/complement_nb.py +1 -1
  152. snowflake/ml/modeling/naive_bayes/gaussian_nb.py +1 -1
  153. snowflake/ml/modeling/naive_bayes/multinomial_nb.py +1 -1
  154. snowflake/ml/modeling/neighbors/k_neighbors_classifier.py +1 -1
  155. snowflake/ml/modeling/neighbors/k_neighbors_regressor.py +1 -1
  156. snowflake/ml/modeling/neighbors/kernel_density.py +1 -1
  157. snowflake/ml/modeling/neighbors/local_outlier_factor.py +1 -1
  158. snowflake/ml/modeling/neighbors/nearest_centroid.py +1 -1
  159. snowflake/ml/modeling/neighbors/nearest_neighbors.py +1 -1
  160. snowflake/ml/modeling/neighbors/neighborhood_components_analysis.py +1 -1
  161. snowflake/ml/modeling/neighbors/radius_neighbors_classifier.py +1 -1
  162. snowflake/ml/modeling/neighbors/radius_neighbors_regressor.py +1 -1
  163. snowflake/ml/modeling/neural_network/bernoulli_rbm.py +1 -1
  164. snowflake/ml/modeling/neural_network/mlp_classifier.py +1 -1
  165. snowflake/ml/modeling/neural_network/mlp_regressor.py +1 -1
  166. snowflake/ml/modeling/preprocessing/polynomial_features.py +1 -1
  167. snowflake/ml/modeling/semi_supervised/label_propagation.py +1 -1
  168. snowflake/ml/modeling/semi_supervised/label_spreading.py +1 -1
  169. snowflake/ml/modeling/svm/linear_svc.py +1 -1
  170. snowflake/ml/modeling/svm/linear_svr.py +1 -1
  171. snowflake/ml/modeling/svm/nu_svc.py +1 -1
  172. snowflake/ml/modeling/svm/nu_svr.py +1 -1
  173. snowflake/ml/modeling/svm/svc.py +1 -1
  174. snowflake/ml/modeling/svm/svr.py +1 -1
  175. snowflake/ml/modeling/tree/decision_tree_classifier.py +1 -1
  176. snowflake/ml/modeling/tree/decision_tree_regressor.py +1 -1
  177. snowflake/ml/modeling/tree/extra_tree_classifier.py +1 -1
  178. snowflake/ml/modeling/tree/extra_tree_regressor.py +1 -1
  179. snowflake/ml/modeling/xgboost/xgb_classifier.py +1 -1
  180. snowflake/ml/modeling/xgboost/xgb_regressor.py +1 -1
  181. snowflake/ml/modeling/xgboost/xgbrf_classifier.py +1 -1
  182. snowflake/ml/modeling/xgboost/xgbrf_regressor.py +1 -1
  183. snowflake/ml/monitoring/_client/model_monitor_sql_client.py +91 -6
  184. snowflake/ml/monitoring/_manager/model_monitor_manager.py +3 -0
  185. snowflake/ml/monitoring/entities/model_monitor_config.py +3 -0
  186. snowflake/ml/monitoring/model_monitor.py +26 -0
  187. snowflake/ml/version.py +1 -1
  188. {snowflake_ml_python-1.11.0.dist-info → snowflake_ml_python-1.12.0.dist-info}/METADATA +66 -5
  189. {snowflake_ml_python-1.11.0.dist-info → snowflake_ml_python-1.12.0.dist-info}/RECORD +192 -188
  190. {snowflake_ml_python-1.11.0.dist-info → snowflake_ml_python-1.12.0.dist-info}/WHEEL +0 -0
  191. {snowflake_ml_python-1.11.0.dist-info → snowflake_ml_python-1.12.0.dist-info}/licenses/LICENSE.txt +0 -0
  192. {snowflake_ml_python-1.11.0.dist-info → snowflake_ml_python-1.12.0.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: snowflake-ml-python
3
- Version: 1.11.0
3
+ Version: 1.12.0
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:
@@ -244,17 +244,17 @@ Requires-Dist: numpy<3,>=1.23
244
244
  Requires-Dist: packaging<25,>=20.9
245
245
  Requires-Dist: pandas<3,>=2.1.4
246
246
  Requires-Dist: platformdirs<5
247
- Requires-Dist: pyarrow
247
+ Requires-Dist: pyarrow<19.0.0
248
248
  Requires-Dist: pydantic<3,>=2.8.2
249
249
  Requires-Dist: pyjwt<3,>=2.0.0
250
250
  Requires-Dist: pytimeparse<2,>=1.1.8
251
251
  Requires-Dist: pyyaml<7,>=6.0
252
252
  Requires-Dist: retrying<2,>=1.3.3
253
253
  Requires-Dist: s3fs<2026,>=2024.6.1
254
- Requires-Dist: scikit-learn<1.6
254
+ Requires-Dist: scikit-learn<1.7
255
255
  Requires-Dist: scipy<2,>=1.9
256
256
  Requires-Dist: shap<1,>=0.46.0
257
- Requires-Dist: snowflake-connector-python[pandas]<4,>=3.15.0
257
+ Requires-Dist: snowflake-connector-python[pandas]<4,>=3.16.0
258
258
  Requires-Dist: snowflake-snowpark-python!=1.26.0,<2,>=1.17.0
259
259
  Requires-Dist: snowflake.core<2,>=1.0.2
260
260
  Requires-Dist: sqlparse<1,>=0.4
@@ -410,7 +410,68 @@ NOTE: Version 1.7.0 is used as example here. Please choose the the latest versio
410
410
 
411
411
  # Release History
412
412
 
413
- ## 1.11.0
413
+ ## 1.12.0
414
+
415
+ ### Bug Fixes
416
+
417
+ * Registry: Fixed an issue where the string representation of dictionary-type output columns was being incorrectly
418
+ created during structured output deserialization. Now, the original data type is properly preserved.
419
+
420
+ ### Behavior Changes
421
+
422
+ ### New Features
423
+
424
+ * Registry: Add OpenAI chat completion compatible signature option for `text-generation` models.
425
+
426
+ ```python
427
+ from snowflake.ml.model import openai_signatures
428
+ import pandas as pd
429
+
430
+ mv = snowflake_registry.log_model(
431
+ model=generator,
432
+ model_name=...,
433
+ ...,
434
+ signatures=openai_signatures.OPENAI_CHAT_SIGNATURE,
435
+ )
436
+
437
+ # create a pd.DataFrame with openai.client.chat.completions arguments like below:
438
+ x_df = pd.DataFrame.from_records(
439
+ [
440
+ {
441
+ "messages": [
442
+ {"role": "system", "content": "Complete the sentence."},
443
+ {
444
+ "role": "user",
445
+ "content": "A descendant of the Lost City of Atlantis, who swam to Earth while saying, ",
446
+ },
447
+ ],
448
+ "max_completion_tokens": 250,
449
+ "temperature": 0.9,
450
+ "stop": None,
451
+ "n": 3,
452
+ "stream": False,
453
+ "top_p": 1.0,
454
+ "frequency_penalty": 0.1,
455
+ "presence_penalty": 0.2,
456
+ }
457
+ ],
458
+ )
459
+
460
+ # OpenAI Chat Completion compatible output
461
+ output_df = mv.run(X=x_df)
462
+ ```
463
+
464
+ * Model Monitoring: Added support for segment columns to enable filtered analysis.
465
+ * Added `segment_columns` parameter to `ModelMonitorSourceConfig` to specify columns for segmenting monitoring data
466
+ * Segment columns must be of STRING type and exist in the source table
467
+ * Added methods to dynamically manage segments:
468
+ * `add_segment_column()`: Add a new segment column to an existing monitor
469
+ * `drop_segment_column()`: Remove a segment column from an existing monitor
470
+ * Experiment Tracking (PrPr): Support for logging artifacts (files and directories) with `log_artifact`
471
+ * Experiment Tracking (PrPr): Support for listing artifacts in a run with `list_artifacts`
472
+ * Experiment Tracking (PrPr): Support for downloading artifacts in a run with `download_artifacts`
473
+
474
+ ## 1.11.0 (08-12-2025)
414
475
 
415
476
  ### Bug Fixes
416
477