snowflake-ml-python 1.6.4__tar.gz → 1.7.1__tar.gz

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 (416) hide show
  1. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/CHANGELOG.md +93 -1
  2. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/PKG-INFO +104 -12
  3. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/README.md +1 -1
  4. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/pyproject.toml +6 -6
  5. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/cortex/__init__.py +4 -0
  6. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/cortex/_complete.py +107 -64
  7. snowflake_ml_python-1.7.1/snowflake/cortex/_finetune.py +273 -0
  8. snowflake_ml_python-1.7.1/snowflake/cortex/_sse_client.py +144 -0
  9. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/cortex/_util.py +30 -1
  10. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/telemetry.py +4 -2
  11. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/type_utils.py +3 -3
  12. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/utils/import_utils.py +31 -0
  13. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/utils/snowpark_dataframe_utils.py +13 -0
  14. snowflake_ml_python-1.7.1/snowflake/ml/data/__init__.py +5 -0
  15. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/data/_internal/arrow_ingestor.py +8 -0
  16. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/data/data_connector.py +1 -1
  17. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/data/torch_utils.py +33 -14
  18. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/airline_features/features/plane_features.py +5 -3
  19. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/airline_features/features/weather_features.py +7 -5
  20. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/citibike_trip_features/features/station_feature.py +4 -2
  21. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/citibike_trip_features/features/trip_feature.py +3 -1
  22. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/example_helper.py +6 -3
  23. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/new_york_taxi_features/features/location_features.py +4 -2
  24. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/new_york_taxi_features/features/trip_features.py +4 -2
  25. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/wine_quality_features/features/managed_wine_features.py +3 -1
  26. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/wine_quality_features/features/static_wine_features.py +3 -1
  27. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/feature_store.py +1 -2
  28. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/feature_view.py +5 -1
  29. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_client/model/model_version_impl.py +145 -11
  30. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_client/ops/model_ops.py +56 -16
  31. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_client/ops/service_ops.py +46 -30
  32. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_client/service/model_deployment_spec.py +19 -8
  33. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_client/service/model_deployment_spec_schema.py +3 -1
  34. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_client/sql/service.py +25 -1
  35. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_model_composer/model_composer.py +2 -0
  36. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_model_composer/model_manifest/model_manifest.py +4 -0
  37. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_model_composer/model_manifest/model_manifest_schema.py +1 -0
  38. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_model_composer/model_method/infer_function.py_template +2 -1
  39. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_model_composer/model_method/model_method.py +1 -1
  40. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_env/model_env.py +12 -0
  41. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_handlers/_utils.py +6 -2
  42. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_handlers/catboost.py +4 -7
  43. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_handlers/custom.py +5 -1
  44. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_handlers/huggingface_pipeline.py +10 -1
  45. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_handlers/lightgbm.py +5 -7
  46. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_handlers/sentence_transformers.py +8 -1
  47. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_handlers/sklearn.py +51 -7
  48. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_handlers/snowmlmodel.py +8 -66
  49. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_handlers/tensorflow.py +23 -6
  50. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_handlers/torchscript.py +14 -14
  51. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_handlers/xgboost.py +10 -40
  52. snowflake_ml_python-1.7.1/snowflake/ml/model/_packager/model_meta/_packaging_requirements.py +2 -0
  53. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_meta/model_meta_schema.py +5 -0
  54. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_packager.py +0 -11
  55. snowflake_ml_python-1.7.1/snowflake/ml/model/_packager/model_runtime/_snowml_inference_alternative_requirements.py +2 -0
  56. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_runtime/model_runtime.py +4 -9
  57. snowflake_ml_python-1.6.4/snowflake/ml/model/_packager/model_handlers/model_objective_utils.py → snowflake_ml_python-1.7.1/snowflake/ml/model/_packager/model_task/model_task_utils.py +14 -26
  58. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_signatures/core.py +63 -16
  59. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_signatures/pandas_handler.py +87 -27
  60. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_signatures/pytorch_handler.py +2 -2
  61. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_signatures/snowpark_handler.py +2 -1
  62. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_signatures/tensorflow_handler.py +2 -2
  63. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_signatures/utils.py +4 -0
  64. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/custom_model.py +47 -7
  65. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/model_signature.py +40 -9
  66. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/type_hints.py +9 -1
  67. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/_internal/estimator_utils.py +13 -0
  68. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/_internal/local_implementations/pandas_handlers.py +7 -2
  69. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/_internal/snowpark_implementations/distributed_hpo_trainer.py +16 -5
  70. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/_internal/snowpark_implementations/snowpark_handlers.py +8 -2
  71. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/_internal/snowpark_implementations/snowpark_trainer.py +9 -3
  72. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/calibration/calibrated_classifier_cv.py +1 -8
  73. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/cluster/agglomerative_clustering.py +17 -19
  74. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/cluster/dbscan.py +5 -2
  75. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/cluster/feature_agglomeration.py +7 -19
  76. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/cluster/k_means.py +14 -19
  77. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/cluster/mini_batch_k_means.py +3 -3
  78. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/cluster/optics.py +6 -6
  79. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/cluster/spectral_clustering.py +4 -3
  80. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/compose/column_transformer.py +15 -5
  81. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/compose/transformed_target_regressor.py +7 -6
  82. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/covariance/elliptic_envelope.py +1 -1
  83. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/covariance/graphical_lasso_cv.py +1 -1
  84. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/covariance/min_cov_det.py +2 -2
  85. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/covariance/oas.py +1 -1
  86. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/decomposition/kernel_pca.py +2 -2
  87. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/decomposition/mini_batch_dictionary_learning.py +5 -12
  88. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/decomposition/mini_batch_sparse_pca.py +5 -12
  89. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/decomposition/pca.py +28 -15
  90. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/discriminant_analysis/linear_discriminant_analysis.py +6 -0
  91. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/ensemble/ada_boost_classifier.py +1 -12
  92. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/ensemble/ada_boost_regressor.py +1 -11
  93. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/ensemble/bagging_classifier.py +1 -8
  94. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/ensemble/bagging_regressor.py +1 -8
  95. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/ensemble/extra_trees_classifier.py +21 -2
  96. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/ensemble/extra_trees_regressor.py +18 -2
  97. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/ensemble/gradient_boosting_classifier.py +2 -0
  98. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/ensemble/gradient_boosting_regressor.py +2 -0
  99. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/ensemble/hist_gradient_boosting_classifier.py +21 -8
  100. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/ensemble/hist_gradient_boosting_regressor.py +21 -11
  101. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/ensemble/random_forest_classifier.py +21 -2
  102. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/ensemble/random_forest_regressor.py +18 -2
  103. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/feature_selection/generic_univariate_select.py +2 -1
  104. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/feature_selection/sequential_feature_selector.py +5 -3
  105. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/kernel_ridge/kernel_ridge.py +2 -2
  106. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/lightgbm/lgbm_classifier.py +2 -4
  107. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/lightgbm/lgbm_regressor.py +2 -4
  108. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/ard_regression.py +5 -10
  109. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/bayesian_ridge.py +5 -11
  110. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/elastic_net.py +3 -0
  111. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/elastic_net_cv.py +1 -1
  112. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/lars.py +0 -10
  113. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/lars_cv.py +1 -11
  114. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/lasso_cv.py +1 -1
  115. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/lasso_lars.py +0 -10
  116. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/lasso_lars_cv.py +1 -11
  117. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/lasso_lars_ic.py +0 -10
  118. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/logistic_regression.py +28 -22
  119. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/logistic_regression_cv.py +30 -24
  120. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/multi_task_elastic_net_cv.py +1 -1
  121. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/multi_task_lasso_cv.py +1 -1
  122. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/orthogonal_matching_pursuit.py +4 -13
  123. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/passive_aggressive_classifier.py +4 -4
  124. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/passive_aggressive_regressor.py +1 -1
  125. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/perceptron.py +3 -3
  126. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/ransac_regressor.py +3 -2
  127. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/ridge_classifier_cv.py +14 -6
  128. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/ridge_cv.py +17 -11
  129. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/sgd_classifier.py +2 -2
  130. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/sgd_one_class_svm.py +5 -1
  131. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/sgd_regressor.py +12 -3
  132. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/manifold/isomap.py +1 -1
  133. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/manifold/mds.py +3 -3
  134. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/manifold/tsne.py +10 -4
  135. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/metrics/classification.py +12 -16
  136. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/metrics/ranking.py +3 -3
  137. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/metrics/regression.py +3 -3
  138. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/naive_bayes/bernoulli_nb.py +3 -3
  139. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/naive_bayes/categorical_nb.py +3 -3
  140. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/naive_bayes/complement_nb.py +3 -3
  141. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/naive_bayes/multinomial_nb.py +3 -3
  142. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/neighbors/k_neighbors_classifier.py +10 -4
  143. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/neighbors/k_neighbors_regressor.py +5 -2
  144. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/neighbors/local_outlier_factor.py +2 -2
  145. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/neighbors/nearest_centroid.py +7 -14
  146. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/neighbors/nearest_neighbors.py +1 -1
  147. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/neighbors/radius_neighbors_classifier.py +6 -1
  148. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/neighbors/radius_neighbors_regressor.py +1 -1
  149. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/neural_network/mlp_classifier.py +7 -1
  150. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/neural_network/mlp_regressor.py +3 -0
  151. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/pipeline/pipeline.py +16 -14
  152. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/preprocessing/one_hot_encoder.py +8 -4
  153. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/preprocessing/ordinal_encoder.py +9 -7
  154. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/svm/linear_svc.py +25 -16
  155. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/svm/linear_svr.py +23 -17
  156. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/svm/nu_svc.py +5 -3
  157. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/svm/nu_svr.py +3 -1
  158. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/svm/svc.py +9 -5
  159. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/svm/svr.py +3 -1
  160. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/tree/decision_tree_classifier.py +21 -2
  161. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/tree/decision_tree_regressor.py +18 -2
  162. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/tree/extra_tree_classifier.py +28 -9
  163. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/tree/extra_tree_regressor.py +18 -2
  164. snowflake_ml_python-1.7.1/snowflake/ml/monitoring/_client/model_monitor_sql_client.py +448 -0
  165. snowflake_ml_python-1.7.1/snowflake/ml/monitoring/_manager/model_monitor_manager.py +238 -0
  166. snowflake_ml_python-1.7.1/snowflake/ml/monitoring/entities/model_monitor_config.py +28 -0
  167. snowflake_ml_python-1.7.1/snowflake/ml/monitoring/model_monitor.py +37 -0
  168. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/registry/_manager/model_manager.py +15 -1
  169. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/registry/registry.py +32 -37
  170. snowflake_ml_python-1.7.1/snowflake/ml/version.py +1 -0
  171. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake_ml_python.egg-info/PKG-INFO +104 -12
  172. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake_ml_python.egg-info/SOURCES.txt +7 -6
  173. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake_ml_python.egg-info/requires.txt +8 -7
  174. snowflake_ml_python-1.6.4/snowflake/cortex/_sse_client.py +0 -81
  175. snowflake_ml_python-1.6.4/snowflake/ml/model/_packager/model_meta/_packaging_requirements.py +0 -3
  176. snowflake_ml_python-1.6.4/snowflake/ml/model/_packager/model_runtime/_snowml_inference_alternative_requirements.py +0 -10
  177. snowflake_ml_python-1.6.4/snowflake/ml/monitoring/_client/model_monitor.py +0 -126
  178. snowflake_ml_python-1.6.4/snowflake/ml/monitoring/_client/model_monitor_manager.py +0 -361
  179. snowflake_ml_python-1.6.4/snowflake/ml/monitoring/_client/monitor_sql_client.py +0 -1335
  180. snowflake_ml_python-1.6.4/snowflake/ml/monitoring/entities/model_monitor_config.py +0 -28
  181. snowflake_ml_python-1.6.4/snowflake/ml/monitoring/entities/model_monitor_interval.py +0 -46
  182. snowflake_ml_python-1.6.4/snowflake/ml/version.py +0 -1
  183. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/LICENSE.txt +0 -0
  184. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/setup.cfg +0 -0
  185. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/cortex/_classify_text.py +0 -0
  186. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/cortex/_embed_text_1024.py +0 -0
  187. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/cortex/_embed_text_768.py +0 -0
  188. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/cortex/_extract_answer.py +0 -0
  189. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/cortex/_sentiment.py +0 -0
  190. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/cortex/_summarize.py +0 -0
  191. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/cortex/_translate.py +0 -0
  192. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/env.py +0 -0
  193. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/env_utils.py +0 -0
  194. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/exceptions/dataset_error_messages.py +0 -0
  195. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/exceptions/dataset_errors.py +0 -0
  196. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/exceptions/error_codes.py +0 -0
  197. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/exceptions/error_messages.py +0 -0
  198. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/exceptions/exceptions.py +0 -0
  199. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/exceptions/fileset_error_messages.py +0 -0
  200. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/exceptions/fileset_errors.py +0 -0
  201. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/exceptions/modeling_error_messages.py +0 -0
  202. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/exceptions/sql_error_codes.py +0 -0
  203. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/file_utils.py +0 -0
  204. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/human_readable_id/adjectives.txt +0 -0
  205. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/human_readable_id/animals.txt +0 -0
  206. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/human_readable_id/hrid_generator.py +0 -0
  207. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/human_readable_id/hrid_generator_base.py +0 -0
  208. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/init_utils.py +0 -0
  209. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/lineage/lineage_utils.py +0 -0
  210. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/migrator_utils.py +0 -0
  211. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/utils/db_utils.py +0 -0
  212. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/utils/formatting.py +0 -0
  213. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/utils/identifier.py +0 -0
  214. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/utils/parallelize.py +0 -0
  215. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/utils/pkg_version_utils.py +0 -0
  216. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/utils/query_result_checker.py +0 -0
  217. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/utils/result.py +0 -0
  218. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/utils/retryable_http.py +0 -0
  219. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/utils/service_logger.py +0 -0
  220. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/utils/snowflake_env.py +0 -0
  221. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/utils/sql_identifier.py +0 -0
  222. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/utils/table_manager.py +0 -0
  223. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/_internal/utils/temp_file_utils.py +0 -0
  224. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/data/data_ingestor.py +0 -0
  225. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/data/data_source.py +0 -0
  226. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/data/ingestor_utils.py +0 -0
  227. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/dataset/__init__.py +0 -0
  228. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/dataset/dataset.py +0 -0
  229. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/dataset/dataset_factory.py +0 -0
  230. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/dataset/dataset_metadata.py +0 -0
  231. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/dataset/dataset_reader.py +0 -0
  232. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/__init__.py +0 -0
  233. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/access_manager.py +0 -0
  234. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/entity.py +0 -0
  235. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/airline_features/entities.py +0 -0
  236. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/airline_features/source.yaml +0 -0
  237. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/citibike_trip_features/entities.py +0 -0
  238. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/citibike_trip_features/source.yaml +0 -0
  239. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/new_york_taxi_features/entities.py +0 -0
  240. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/new_york_taxi_features/source.yaml +0 -0
  241. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/source_data/airline.yaml +0 -0
  242. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/source_data/citibike_trips.yaml +0 -0
  243. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/source_data/fraud_transactions.yaml +0 -0
  244. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/source_data/nyc_yellow_trips.yaml +0 -0
  245. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/source_data/winequality_red.yaml +0 -0
  246. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/wine_quality_features/entities.py +0 -0
  247. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/feature_store/examples/wine_quality_features/source.yaml +0 -0
  248. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/fileset/embedded_stage_fs.py +0 -0
  249. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/fileset/fileset.py +0 -0
  250. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/fileset/parquet_parser.py +0 -0
  251. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/fileset/sfcfs.py +0 -0
  252. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/fileset/snowfs.py +0 -0
  253. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/fileset/stage_fs.py +0 -0
  254. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/fileset/tf_dataset.py +0 -0
  255. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/fileset/torch_datapipe.py +0 -0
  256. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/lineage/__init__.py +0 -0
  257. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/lineage/lineage_node.py +0 -0
  258. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/__init__.py +0 -0
  259. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_client/model/model_impl.py +0 -0
  260. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_client/ops/metadata_ops.py +0 -0
  261. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_client/sql/_base.py +0 -0
  262. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_client/sql/model.py +0 -0
  263. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_client/sql/model_version.py +0 -0
  264. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_client/sql/stage.py +0 -0
  265. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_client/sql/tag.py +0 -0
  266. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_model_composer/model_method/function_generator.py +0 -0
  267. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_model_composer/model_method/infer_partitioned.py_template +0 -0
  268. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_model_composer/model_method/infer_table_function.py_template +0 -0
  269. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_handler.py +0 -0
  270. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_handlers/_base.py +0 -0
  271. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_handlers/mlflow.py +0 -0
  272. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_handlers/pytorch.py +0 -0
  273. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_handlers_migrator/base_migrator.py +0 -0
  274. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_meta/model_blob_meta.py +0 -0
  275. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_meta/model_meta.py +0 -0
  276. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_meta_migrator/base_migrator.py +0 -0
  277. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_meta_migrator/migrator_plans.py +0 -0
  278. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_packager/model_meta_migrator/migrator_v1.py +0 -0
  279. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_signatures/base_handler.py +0 -0
  280. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_signatures/builtins_handler.py +0 -0
  281. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/_signatures/numpy_handler.py +0 -0
  282. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/model/models/huggingface_pipeline.py +0 -0
  283. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/_internal/constants.py +0 -0
  284. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/_internal/local_implementations/pandas_trainer.py +0 -0
  285. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/_internal/ml_runtime_implementations/ml_runtime_handlers.py +0 -0
  286. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/_internal/ml_runtime_implementations/ml_runtime_trainer.py +0 -0
  287. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/_internal/model_specifications.py +0 -0
  288. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/_internal/model_trainer.py +0 -0
  289. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/_internal/model_trainer_builder.py +0 -0
  290. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/_internal/model_transformer_builder.py +0 -0
  291. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/_internal/snowpark_implementations/distributed_search_udf_file.py +0 -0
  292. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/_internal/snowpark_implementations/xgboost_external_memory_trainer.py +0 -0
  293. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/_internal/transformer_protocols.py +0 -0
  294. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/calibration/__init__.py +0 -0
  295. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/cluster/__init__.py +0 -0
  296. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/cluster/affinity_propagation.py +0 -0
  297. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/cluster/birch.py +0 -0
  298. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/cluster/bisecting_k_means.py +0 -0
  299. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/cluster/mean_shift.py +0 -0
  300. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/cluster/spectral_biclustering.py +0 -0
  301. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/cluster/spectral_coclustering.py +0 -0
  302. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/compose/__init__.py +0 -0
  303. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/covariance/__init__.py +0 -0
  304. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/covariance/empirical_covariance.py +0 -0
  305. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/covariance/graphical_lasso.py +0 -0
  306. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/covariance/ledoit_wolf.py +0 -0
  307. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/covariance/shrunk_covariance.py +0 -0
  308. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/decomposition/__init__.py +0 -0
  309. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/decomposition/dictionary_learning.py +0 -0
  310. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/decomposition/factor_analysis.py +0 -0
  311. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/decomposition/fast_ica.py +0 -0
  312. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/decomposition/incremental_pca.py +0 -0
  313. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/decomposition/sparse_pca.py +0 -0
  314. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/decomposition/truncated_svd.py +0 -0
  315. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/discriminant_analysis/__init__.py +0 -0
  316. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/discriminant_analysis/quadratic_discriminant_analysis.py +0 -0
  317. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/ensemble/__init__.py +0 -0
  318. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/ensemble/isolation_forest.py +0 -0
  319. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/ensemble/stacking_regressor.py +0 -0
  320. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/ensemble/voting_classifier.py +0 -0
  321. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/ensemble/voting_regressor.py +0 -0
  322. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/feature_selection/__init__.py +0 -0
  323. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/feature_selection/select_fdr.py +0 -0
  324. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/feature_selection/select_fpr.py +0 -0
  325. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/feature_selection/select_fwe.py +0 -0
  326. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/feature_selection/select_k_best.py +0 -0
  327. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/feature_selection/select_percentile.py +0 -0
  328. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/feature_selection/variance_threshold.py +0 -0
  329. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/framework/_utils.py +0 -0
  330. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/framework/base.py +0 -0
  331. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/gaussian_process/__init__.py +0 -0
  332. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/gaussian_process/gaussian_process_classifier.py +0 -0
  333. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/gaussian_process/gaussian_process_regressor.py +0 -0
  334. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/impute/__init__.py +0 -0
  335. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/impute/iterative_imputer.py +0 -0
  336. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/impute/knn_imputer.py +0 -0
  337. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/impute/missing_indicator.py +0 -0
  338. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/impute/simple_imputer.py +0 -0
  339. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/kernel_approximation/__init__.py +0 -0
  340. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/kernel_approximation/additive_chi2_sampler.py +0 -0
  341. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/kernel_approximation/nystroem.py +0 -0
  342. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/kernel_approximation/polynomial_count_sketch.py +0 -0
  343. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/kernel_approximation/rbf_sampler.py +0 -0
  344. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/kernel_approximation/skewed_chi2_sampler.py +0 -0
  345. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/kernel_ridge/__init__.py +0 -0
  346. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/lightgbm/__init__.py +0 -0
  347. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/__init__.py +0 -0
  348. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/gamma_regressor.py +0 -0
  349. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/huber_regressor.py +0 -0
  350. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/lasso.py +0 -0
  351. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/linear_regression.py +0 -0
  352. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/multi_task_elastic_net.py +0 -0
  353. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/multi_task_lasso.py +0 -0
  354. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/poisson_regressor.py +0 -0
  355. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/ridge.py +0 -0
  356. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/ridge_classifier.py +0 -0
  357. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/theil_sen_regressor.py +0 -0
  358. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/linear_model/tweedie_regressor.py +0 -0
  359. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/manifold/__init__.py +0 -0
  360. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/manifold/spectral_embedding.py +0 -0
  361. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/metrics/__init__.py +0 -0
  362. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/metrics/correlation.py +0 -0
  363. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/metrics/covariance.py +0 -0
  364. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/metrics/metrics_utils.py +0 -0
  365. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/mixture/__init__.py +0 -0
  366. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/mixture/bayesian_gaussian_mixture.py +0 -0
  367. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/mixture/gaussian_mixture.py +0 -0
  368. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/model_selection/__init__.py +0 -0
  369. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/model_selection/grid_search_cv.py +0 -0
  370. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/model_selection/randomized_search_cv.py +0 -0
  371. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/multiclass/__init__.py +0 -0
  372. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/multiclass/one_vs_one_classifier.py +0 -0
  373. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/multiclass/one_vs_rest_classifier.py +0 -0
  374. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/multiclass/output_code_classifier.py +0 -0
  375. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/naive_bayes/__init__.py +0 -0
  376. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/naive_bayes/gaussian_nb.py +0 -0
  377. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/neighbors/__init__.py +0 -0
  378. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/neighbors/kernel_density.py +0 -0
  379. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/neighbors/neighborhood_components_analysis.py +0 -0
  380. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/neural_network/__init__.py +0 -0
  381. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/neural_network/bernoulli_rbm.py +0 -0
  382. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/parameters/disable_distributed_hpo.py +0 -0
  383. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/parameters/disable_model_tracer.py +0 -0
  384. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/parameters/enable_anonymous_sproc.py +0 -0
  385. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/pipeline/__init__.py +0 -0
  386. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/preprocessing/__init__.py +0 -0
  387. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/preprocessing/binarizer.py +0 -0
  388. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/preprocessing/k_bins_discretizer.py +0 -0
  389. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/preprocessing/label_encoder.py +0 -0
  390. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/preprocessing/max_abs_scaler.py +0 -0
  391. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/preprocessing/min_max_scaler.py +0 -0
  392. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/preprocessing/normalizer.py +0 -0
  393. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/preprocessing/polynomial_features.py +0 -0
  394. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/preprocessing/robust_scaler.py +0 -0
  395. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/preprocessing/standard_scaler.py +0 -0
  396. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/semi_supervised/__init__.py +0 -0
  397. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/semi_supervised/label_propagation.py +0 -0
  398. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/semi_supervised/label_spreading.py +0 -0
  399. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/svm/__init__.py +0 -0
  400. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/tree/__init__.py +0 -0
  401. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/xgboost/__init__.py +0 -0
  402. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/xgboost/xgb_classifier.py +0 -0
  403. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/xgboost/xgb_regressor.py +0 -0
  404. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/xgboost/xgbrf_classifier.py +0 -0
  405. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/modeling/xgboost/xgbrf_regressor.py +0 -0
  406. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/monitoring/_client/queries/record_count.ssql +0 -0
  407. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/monitoring/_client/queries/rmse.ssql +0 -0
  408. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/monitoring/entities/output_score_type.py +0 -0
  409. {snowflake_ml_python-1.6.4/snowflake/ml/monitoring/_client → snowflake_ml_python-1.7.1/snowflake/ml/monitoring}/model_monitor_version.py +0 -0
  410. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/monitoring/shap.py +0 -0
  411. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/registry/__init__.py +0 -0
  412. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/utils/connection_params.py +0 -0
  413. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/utils/sparse.py +0 -0
  414. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake/ml/utils/sql_client.py +0 -0
  415. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake_ml_python.egg-info/dependency_links.txt +0 -0
  416. {snowflake_ml_python-1.6.4 → snowflake_ml_python-1.7.1}/snowflake_ml_python.egg-info/top_level.txt +0 -0
@@ -1,6 +1,95 @@
1
1
  # Release History
2
2
 
3
- ## 1.6.4
3
+ ## 1.7.1
4
+
5
+ ### Bug Fixes
6
+
7
+ - Registry: Null value is now allowed in the dataframe used in model signature inference. Null values will be ignored
8
+ and others will be used to infer the signature.
9
+ - Registry: Pandas Extension DTypes (`pandas.StringDType()`, `pandas.BooleanDType()`, etc.) are now supported in model
10
+ signature inference.
11
+ - Registry: Null value is now allowed in the dataframe used to predict.
12
+ - Data: Fix missing `snowflake.ml.data.*` module exports in wheel
13
+ - Dataset: Fix missing `snowflake.ml.dataset.*` module exports in wheel.
14
+ - Registry: Fix the issue that `tf_keras.Model` is not recognized as keras model when logging.
15
+
16
+ ### Behavior Changes
17
+
18
+ ### New Features
19
+
20
+ - Registry: Option to `enable_monitoring` set to False by default. This will gate access to preview features of Model Monitoring.
21
+ - Model Monitoring: `show_model_monitors` Registry method. This feature is still in Private Preview.
22
+ - Registry: Support `pd.Series` in input and output data.
23
+ - Model Monitoring: `add_monitor` Registry method. This feature is still in Private Preview.
24
+ - Model Monitoring: `resume` and `suspend` ModelMonitor. This feature is still in Private Preview.
25
+ - Model Monitoring: `get_monitor` Registry method. This feature is still in Private Preview.
26
+ - Model Monitoring: `delete_monitor` Registry method. This feature is still in Private Preview.
27
+
28
+ ## 1.7.0 (10-22-2024)
29
+
30
+ ### Behavior Change
31
+
32
+ - Generic: Require python >= 3.9.
33
+ - Data Connector: Update `to_torch_dataset` and `to_torch_datapipe` to add a dimension for scalar data.
34
+ This allows for more seamless integration with PyTorch `DataLoader`, which creates batches by stacking inputs of each batch.
35
+
36
+ Examples:
37
+
38
+ ```python
39
+ ds = connector.to_torch_dataset(shuffle=False, batch_size=3)
40
+ ```
41
+
42
+ - Input: "col1": [10, 11, 12]
43
+ - Previous batch: array([10., 11., 12.]) with shape (3,)
44
+ - New batch: array([[10.], [11.], [12.]]) with shape (3, 1)
45
+
46
+ - Input: "col2": [[0, 100], [1, 110], [2, 200]]
47
+ - Previous batch: array([[ 0, 100], [ 1, 110], [ 2, 200]]) with shape (3,2)
48
+ - New batch: No change
49
+
50
+ - Model Registry: External access integrations are optional when creating a model inference service in
51
+ Snowflake >= 8.40.0.
52
+ - Model Registry: Deprecate `build_external_access_integration` with `build_external_access_integrations` in
53
+ `ModelVersion.create_service()`.
54
+
55
+ ### Bug Fixes
56
+
57
+ - Registry: Updated `log_model` API to accept both signature and sample_input_data parameters.
58
+ - Feature Store: ExampleHelper uses fully qualified path for table name. change weather features aggregation from 1d to 1h.
59
+ - Data Connector: Return numpy array with appropriate object type instead of list for multi-dimensional
60
+ data from `to_torch_dataset` and `to_torch_datapipe`
61
+ - Model explainability: Incompatibility between SHAP 0.42.1 and XGB 2.1.1 resolved by using latest SHAP 0.46.0.
62
+
63
+ ### New Features
64
+
65
+ - Registry: Provide pass keyworded variable length of arguments to class ModelContext. Example usage:
66
+
67
+ ```python
68
+ mc = custom_model.ModelContext(
69
+ config = 'local_model_dir/config.json',
70
+ m1 = model1
71
+ )
72
+
73
+ class ExamplePipelineModel(custom_model.CustomModel):
74
+ def __init__(self, context: custom_model.ModelContext) -> None:
75
+ super().__init__(context)
76
+ v = open(self.context['config']).read()
77
+ self.bias = json.loads(v)['bias']
78
+
79
+ @custom_model.inference_api
80
+ def predict(self, input: pd.DataFrame) -> pd.DataFrame:
81
+ model_output = self.context['m1'].predict(input)
82
+ return pd.DataFrame({'output': model_output + self.bias})
83
+ ```
84
+
85
+ - Model Development: Upgrade scikit-learn in UDTF backend for log_loss metric. As a result, `eps` argument is now ignored.
86
+ - Data Connector: Add the option of passing a `None` sized batch to `to_torch_dataset` for better
87
+ interoperability with PyTorch DataLoader.
88
+ - Model Registry: Support [pandas.CategoricalDtype](https://pandas.pydata.org/docs/reference/api/pandas.CategoricalDtype.html#pandas-categoricaldtype)
89
+ - Registry: It is now possible to pass `signatures` and `sample_input_data` at the same time to capture background
90
+ data from explainablity and data lineage.
91
+
92
+ ## 1.6.4 (2024-10-17)
4
93
 
5
94
  ### Bug Fixes
6
95
 
@@ -18,6 +107,9 @@
18
107
  - Registry: Fix a bug that `ModelVersion.run` is called in a nested way.
19
108
  - Registry: Fix an issue that leads to `log_model` failure when local package version contains parts other than
20
109
  base version.
110
+ - Fix issue where `sample_weights` were not being applied to search estimators.
111
+ - Model explainability: Fix bug which creates explain as a function instead of table function when enabling by default.
112
+ - Model explainability: Update lightgbm binary classification to return non-json values, from customer feedback.
21
113
 
22
114
  ### New Features
23
115
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: snowflake-ml-python
3
- Version: 1.6.4
3
+ Version: 1.7.1
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:
@@ -220,7 +220,6 @@ Classifier: Intended Audience :: Information Technology
220
220
  Classifier: Intended Audience :: System Administrators
221
221
  Classifier: License :: OSI Approved :: Apache Software License
222
222
  Classifier: Operating System :: OS Independent
223
- Classifier: Programming Language :: Python :: 3.8
224
223
  Classifier: Programming Language :: Python :: 3.9
225
224
  Classifier: Programming Language :: Python :: 3.10
226
225
  Classifier: Programming Language :: Python :: 3.11
@@ -230,38 +229,39 @@ Classifier: Topic :: Software Development :: Libraries
230
229
  Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
231
230
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
232
231
  Classifier: Topic :: Scientific/Engineering :: Information Analysis
233
- Requires-Python: <3.12,>=3.8
232
+ Requires-Python: <3.12,>=3.9
234
233
  Description-Content-Type: text/markdown
235
234
  License-File: LICENSE.txt
236
235
  Requires-Dist: absl-py<2,>=0.15
237
236
  Requires-Dist: anyio<4,>=3.5.0
238
237
  Requires-Dist: cachetools<6,>=3.1.1
239
238
  Requires-Dist: cloudpickle>=2.0.0
239
+ Requires-Dist: cryptography
240
240
  Requires-Dist: fsspec[http]<2024,>=2022.11
241
241
  Requires-Dist: importlib_resources<7,>=6.1.1
242
242
  Requires-Dist: numpy<2,>=1.23
243
- Requires-Dist: packaging<24,>=20.9
243
+ Requires-Dist: packaging<25,>=20.9
244
244
  Requires-Dist: pandas<3,>=1.0.0
245
245
  Requires-Dist: pyarrow
246
246
  Requires-Dist: pytimeparse<2,>=1.1.8
247
247
  Requires-Dist: pyyaml<7,>=6.0
248
248
  Requires-Dist: retrying<2,>=1.3.3
249
249
  Requires-Dist: s3fs<2024,>=2022.11
250
- Requires-Dist: scikit-learn<1.6,>=1.2.1
250
+ Requires-Dist: scikit-learn<1.6,>=1.4
251
251
  Requires-Dist: scipy<2,>=1.9
252
252
  Requires-Dist: snowflake-connector-python[pandas]<4,>=3.5.0
253
253
  Requires-Dist: snowflake-snowpark-python<2,>=1.17.0
254
254
  Requires-Dist: sqlparse<1,>=0.4
255
255
  Requires-Dist: typing-extensions<5,>=4.1.0
256
- Requires-Dist: xgboost<2.1,>=1.7.3
256
+ Requires-Dist: xgboost<3,>=1.7.3
257
257
  Provides-Extra: all
258
258
  Requires-Dist: catboost<2,>=1.2.0; extra == "all"
259
- Requires-Dist: lightgbm<5,>=3.3.5; extra == "all"
259
+ Requires-Dist: lightgbm<5,>=4.1.0; extra == "all"
260
260
  Requires-Dist: mlflow<2.4,>=2.1.0; extra == "all"
261
261
  Requires-Dist: peft<1,>=0.5.0; extra == "all"
262
262
  Requires-Dist: sentence-transformers<3,>=2.2.2; extra == "all"
263
263
  Requires-Dist: sentencepiece<1,>=0.1.95; extra == "all"
264
- Requires-Dist: shap<1,>=0.42.0; extra == "all"
264
+ Requires-Dist: shap<1,>=0.46.0; extra == "all"
265
265
  Requires-Dist: tensorflow<3,>=2.10; extra == "all"
266
266
  Requires-Dist: tokenizers<1,>=0.10; extra == "all"
267
267
  Requires-Dist: torch<2.3.0,>=2.0.1; extra == "all"
@@ -270,13 +270,13 @@ Requires-Dist: transformers<5,>=4.32.1; extra == "all"
270
270
  Provides-Extra: catboost
271
271
  Requires-Dist: catboost<2,>=1.2.0; extra == "catboost"
272
272
  Provides-Extra: lightgbm
273
- Requires-Dist: lightgbm<5,>=3.3.5; extra == "lightgbm"
273
+ Requires-Dist: lightgbm<5,>=4.1.0; extra == "lightgbm"
274
274
  Provides-Extra: llm
275
275
  Requires-Dist: peft<1,>=0.5.0; extra == "llm"
276
276
  Provides-Extra: mlflow
277
277
  Requires-Dist: mlflow<2.4,>=2.1.0; extra == "mlflow"
278
278
  Provides-Extra: shap
279
- Requires-Dist: shap<1,>=0.42.0; extra == "shap"
279
+ Requires-Dist: shap<1,>=0.46.0; extra == "shap"
280
280
  Provides-Extra: tensorflow
281
281
  Requires-Dist: tensorflow<3,>=2.10; extra == "tensorflow"
282
282
  Provides-Extra: torch
@@ -336,7 +336,7 @@ If you don't have a Snowflake account yet, you can [sign up for a 30-day free tr
336
336
  Follow the [installation instructions](https://docs.snowflake.com/en/developer-guide/snowpark-ml/index#installing-snowpark-ml)
337
337
  in the Snowflake documentation.
338
338
 
339
- Python versions 3.8 to 3.11 are supported. You can use [miniconda](https://docs.conda.io/en/latest/miniconda.html) or
339
+ Python versions 3.9 to 3.11 are supported. You can use [miniconda](https://docs.conda.io/en/latest/miniconda.html) or
340
340
  [anaconda](https://www.anaconda.com/) to create a Conda environment (recommended),
341
341
  or [virtualenv](https://docs.python.org/3/tutorial/venv.html) to create a virtual environment.
342
342
 
@@ -373,7 +373,96 @@ be compatibility issues. Server-side functionality that `snowflake-ml-python` de
373
373
 
374
374
  # Release History
375
375
 
376
- ## 1.6.4
376
+ ## 1.7.1
377
+
378
+ ### Bug Fixes
379
+
380
+ - Registry: Null value is now allowed in the dataframe used in model signature inference. Null values will be ignored
381
+ and others will be used to infer the signature.
382
+ - Registry: Pandas Extension DTypes (`pandas.StringDType()`, `pandas.BooleanDType()`, etc.) are now supported in model
383
+ signature inference.
384
+ - Registry: Null value is now allowed in the dataframe used to predict.
385
+ - Data: Fix missing `snowflake.ml.data.*` module exports in wheel
386
+ - Dataset: Fix missing `snowflake.ml.dataset.*` module exports in wheel.
387
+ - Registry: Fix the issue that `tf_keras.Model` is not recognized as keras model when logging.
388
+
389
+ ### Behavior Changes
390
+
391
+ ### New Features
392
+
393
+ - Registry: Option to `enable_monitoring` set to False by default. This will gate access to preview features of Model Monitoring.
394
+ - Model Monitoring: `show_model_monitors` Registry method. This feature is still in Private Preview.
395
+ - Registry: Support `pd.Series` in input and output data.
396
+ - Model Monitoring: `add_monitor` Registry method. This feature is still in Private Preview.
397
+ - Model Monitoring: `resume` and `suspend` ModelMonitor. This feature is still in Private Preview.
398
+ - Model Monitoring: `get_monitor` Registry method. This feature is still in Private Preview.
399
+ - Model Monitoring: `delete_monitor` Registry method. This feature is still in Private Preview.
400
+
401
+ ## 1.7.0 (10-22-2024)
402
+
403
+ ### Behavior Change
404
+
405
+ - Generic: Require python >= 3.9.
406
+ - Data Connector: Update `to_torch_dataset` and `to_torch_datapipe` to add a dimension for scalar data.
407
+ This allows for more seamless integration with PyTorch `DataLoader`, which creates batches by stacking inputs of each batch.
408
+
409
+ Examples:
410
+
411
+ ```python
412
+ ds = connector.to_torch_dataset(shuffle=False, batch_size=3)
413
+ ```
414
+
415
+ - Input: "col1": [10, 11, 12]
416
+ - Previous batch: array([10., 11., 12.]) with shape (3,)
417
+ - New batch: array([[10.], [11.], [12.]]) with shape (3, 1)
418
+
419
+ - Input: "col2": [[0, 100], [1, 110], [2, 200]]
420
+ - Previous batch: array([[ 0, 100], [ 1, 110], [ 2, 200]]) with shape (3,2)
421
+ - New batch: No change
422
+
423
+ - Model Registry: External access integrations are optional when creating a model inference service in
424
+ Snowflake >= 8.40.0.
425
+ - Model Registry: Deprecate `build_external_access_integration` with `build_external_access_integrations` in
426
+ `ModelVersion.create_service()`.
427
+
428
+ ### Bug Fixes
429
+
430
+ - Registry: Updated `log_model` API to accept both signature and sample_input_data parameters.
431
+ - Feature Store: ExampleHelper uses fully qualified path for table name. change weather features aggregation from 1d to 1h.
432
+ - Data Connector: Return numpy array with appropriate object type instead of list for multi-dimensional
433
+ data from `to_torch_dataset` and `to_torch_datapipe`
434
+ - Model explainability: Incompatibility between SHAP 0.42.1 and XGB 2.1.1 resolved by using latest SHAP 0.46.0.
435
+
436
+ ### New Features
437
+
438
+ - Registry: Provide pass keyworded variable length of arguments to class ModelContext. Example usage:
439
+
440
+ ```python
441
+ mc = custom_model.ModelContext(
442
+ config = 'local_model_dir/config.json',
443
+ m1 = model1
444
+ )
445
+
446
+ class ExamplePipelineModel(custom_model.CustomModel):
447
+ def __init__(self, context: custom_model.ModelContext) -> None:
448
+ super().__init__(context)
449
+ v = open(self.context['config']).read()
450
+ self.bias = json.loads(v)['bias']
451
+
452
+ @custom_model.inference_api
453
+ def predict(self, input: pd.DataFrame) -> pd.DataFrame:
454
+ model_output = self.context['m1'].predict(input)
455
+ return pd.DataFrame({'output': model_output + self.bias})
456
+ ```
457
+
458
+ - Model Development: Upgrade scikit-learn in UDTF backend for log_loss metric. As a result, `eps` argument is now ignored.
459
+ - Data Connector: Add the option of passing a `None` sized batch to `to_torch_dataset` for better
460
+ interoperability with PyTorch DataLoader.
461
+ - Model Registry: Support [pandas.CategoricalDtype](https://pandas.pydata.org/docs/reference/api/pandas.CategoricalDtype.html#pandas-categoricaldtype)
462
+ - Registry: It is now possible to pass `signatures` and `sample_input_data` at the same time to capture background
463
+ data from explainablity and data lineage.
464
+
465
+ ## 1.6.4 (2024-10-17)
377
466
 
378
467
  ### Bug Fixes
379
468
 
@@ -391,6 +480,9 @@ be compatibility issues. Server-side functionality that `snowflake-ml-python` de
391
480
  - Registry: Fix a bug that `ModelVersion.run` is called in a nested way.
392
481
  - Registry: Fix an issue that leads to `log_model` failure when local package version contains parts other than
393
482
  base version.
483
+ - Fix issue where `sample_weights` were not being applied to search estimators.
484
+ - Model explainability: Fix bug which creates explain as a function instead of table function when enabling by default.
485
+ - Model explainability: Update lightgbm binary classification to return non-json values, from customer feedback.
394
486
 
395
487
  ### New Features
396
488
 
@@ -46,7 +46,7 @@ If you don't have a Snowflake account yet, you can [sign up for a 30-day free tr
46
46
  Follow the [installation instructions](https://docs.snowflake.com/en/developer-guide/snowpark-ml/index#installing-snowpark-ml)
47
47
  in the Snowflake documentation.
48
48
 
49
- Python versions 3.8 to 3.11 are supported. You can use [miniconda](https://docs.conda.io/en/latest/miniconda.html) or
49
+ Python versions 3.9 to 3.11 are supported. You can use [miniconda](https://docs.conda.io/en/latest/miniconda.html) or
50
50
  [anaconda](https://www.anaconda.com/) to create a Conda environment (recommended),
51
51
  or [virtualenv](https://docs.python.org/3/tutorial/venv.html) to create a virtual environment.
52
52
 
@@ -5,10 +5,10 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  name = "snowflake-ml-python"
7
7
  description = "The machine learning client library that is used for interacting with Snowflake to build machine learning solutions."
8
- classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: Other Environment", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Topic :: Database", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Scientific/Engineering :: Information Analysis",]
9
- requires-python = ">=3.8, <3.12"
8
+ classifiers = [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: Other Environment", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Topic :: Database", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Scientific/Engineering :: Information Analysis",]
9
+ requires-python = ">=3.9, <3.12"
10
10
  dynamic = [ "version", "readme",]
11
- dependencies = [ "absl-py>=0.15,<2", "anyio>=3.5.0,<4", "cachetools>=3.1.1,<6", "cloudpickle>=2.0.0", "fsspec[http]>=2022.11,<2024", "importlib_resources>=6.1.1, <7", "numpy>=1.23,<2", "packaging>=20.9,<24", "pandas>=1.0.0,<3", "pyarrow", "pytimeparse>=1.1.8,<2", "pyyaml>=6.0,<7", "retrying>=1.3.3,<2", "s3fs>=2022.11,<2024", "scikit-learn>=1.2.1,<1.6", "scipy>=1.9,<2", "snowflake-connector-python[pandas]>=3.5.0,<4", "snowflake-snowpark-python>=1.17.0,<2", "sqlparse>=0.4,<1", "typing-extensions>=4.1.0,<5", "xgboost>=1.7.3,<2.1",]
11
+ dependencies = [ "absl-py>=0.15,<2", "anyio>=3.5.0,<4", "cachetools>=3.1.1,<6", "cloudpickle>=2.0.0", "cryptography", "fsspec[http]>=2022.11,<2024", "importlib_resources>=6.1.1, <7", "numpy>=1.23,<2", "packaging>=20.9,<25", "pandas>=1.0.0,<3", "pyarrow", "pytimeparse>=1.1.8,<2", "pyyaml>=6.0,<7", "retrying>=1.3.3,<2", "s3fs>=2022.11,<2024", "scikit-learn>=1.4,<1.6", "scipy>=1.9,<2", "snowflake-connector-python[pandas]>=3.5.0,<4", "snowflake-snowpark-python>=1.17.0,<2", "sqlparse>=0.4,<1", "typing-extensions>=4.1.0,<5", "xgboost>=1.7.3,<3",]
12
12
  [[project.authors]]
13
13
  name = "Snowflake, Inc"
14
14
  email = "support@snowflake.com"
@@ -24,12 +24,12 @@ Issues = "https://github.com/snowflakedb/snowflake-ml-python/issues"
24
24
  Changelog = "https://github.com/snowflakedb/snowflake-ml-python/blob/master/CHANGELOG.md"
25
25
 
26
26
  [project.optional-dependencies]
27
- all = [ "catboost>=1.2.0, <2", "lightgbm>=3.3.5,<5", "mlflow>=2.1.0,<2.4", "peft>=0.5.0,<1", "sentence-transformers>=2.2.2,<3", "sentencepiece>=0.1.95,<1", "shap>=0.42.0,<1", "tensorflow>=2.10,<3", "tokenizers>=0.10,<1", "torch>=2.0.1,<2.3.0", "torchdata>=0.4,<1", "transformers>=4.32.1,<5",]
27
+ all = [ "catboost>=1.2.0, <2", "lightgbm>=4.1.0, <5", "mlflow>=2.1.0,<2.4", "peft>=0.5.0,<1", "sentence-transformers>=2.2.2,<3", "sentencepiece>=0.1.95,<1", "shap>=0.46.0,<1", "tensorflow>=2.10,<3", "tokenizers>=0.10,<1", "torch>=2.0.1,<2.3.0", "torchdata>=0.4,<1", "transformers>=4.32.1,<5",]
28
28
  catboost = [ "catboost>=1.2.0, <2",]
29
- lightgbm = [ "lightgbm>=3.3.5,<5",]
29
+ lightgbm = [ "lightgbm>=4.1.0, <5",]
30
30
  llm = [ "peft>=0.5.0,<1",]
31
31
  mlflow = [ "mlflow>=2.1.0,<2.4",]
32
- shap = [ "shap>=0.42.0,<1",]
32
+ shap = [ "shap>=0.46.0,<1",]
33
33
  tensorflow = [ "tensorflow>=2.10,<3",]
34
34
  torch = [ "torch>=2.0.1,<2.3.0", "torchdata>=0.4,<1",]
35
35
  transformers = [ "sentence-transformers>=2.2.2,<3", "sentencepiece>=0.1.95,<1", "tokenizers>=0.10,<1", "transformers>=4.32.1,<5",]
@@ -3,6 +3,7 @@ from snowflake.cortex._complete import Complete, CompleteOptions
3
3
  from snowflake.cortex._embed_text_768 import EmbedText768
4
4
  from snowflake.cortex._embed_text_1024 import EmbedText1024
5
5
  from snowflake.cortex._extract_answer import ExtractAnswer
6
+ from snowflake.cortex._finetune import Finetune, FinetuneJob, FinetuneStatus
6
7
  from snowflake.cortex._sentiment import Sentiment
7
8
  from snowflake.cortex._summarize import Summarize
8
9
  from snowflake.cortex._translate import Translate
@@ -14,6 +15,9 @@ __all__ = [
14
15
  "EmbedText768",
15
16
  "EmbedText1024",
16
17
  "ExtractAnswer",
18
+ "Finetune",
19
+ "FinetuneJob",
20
+ "FinetuneStatus",
17
21
  "Sentiment",
18
22
  "Summarize",
19
23
  "Translate",
@@ -1,7 +1,8 @@
1
1
  import json
2
2
  import logging
3
3
  import time
4
- from typing import Any, Callable, Iterator, List, Optional, TypedDict, Union, cast
4
+ from io import BytesIO
5
+ from typing import Any, Callable, Dict, Iterator, List, Optional, TypedDict, Union, cast
5
6
  from urllib.parse import urlunparse
6
7
 
7
8
  import requests
@@ -16,8 +17,10 @@ from snowflake.cortex._util import (
16
17
  )
17
18
  from snowflake.ml._internal import telemetry
18
19
  from snowflake.snowpark import context, functions
20
+ from snowflake.snowpark._internal.utils import is_in_stored_procedure
19
21
 
20
22
  logger = logging.getLogger(__name__)
23
+ _REST_COMPLETE_URL = "/api/v2/cortex/inference:complete"
21
24
 
22
25
 
23
26
  class ConversationMessage(TypedDict):
@@ -84,6 +87,76 @@ def retry(func: Callable[..., requests.Response]) -> Callable[..., requests.Resp
84
87
  return inner
85
88
 
86
89
 
90
+ def _make_common_request_headers() -> Dict[str, str]:
91
+ headers = {
92
+ "Content-Type": "application/json",
93
+ "Accept": "application/json, text/event-stream",
94
+ }
95
+ return headers
96
+
97
+
98
+ def _make_request_body(
99
+ model: str,
100
+ prompt: Union[str, List[ConversationMessage]],
101
+ options: Optional[CompleteOptions] = None,
102
+ ) -> Dict[str, Any]:
103
+ data = {
104
+ "model": model,
105
+ "stream": True,
106
+ }
107
+ if isinstance(prompt, List):
108
+ data["messages"] = prompt
109
+ else:
110
+ data["messages"] = [{"content": prompt}]
111
+
112
+ if options:
113
+ if "max_tokens" in options:
114
+ data["max_tokens"] = options["max_tokens"]
115
+ data["max_output_tokens"] = options["max_tokens"]
116
+ if "temperature" in options:
117
+ data["temperature"] = options["temperature"]
118
+ if "top_p" in options:
119
+ data["top_p"] = options["top_p"]
120
+ return data
121
+
122
+
123
+ # XP endpoint returns a dict response which needs to be converted to a format which can
124
+ # be consumed by the SSEClient. This method does that.
125
+ def _xp_dict_to_response(raw_resp: Dict[str, Any]) -> requests.Response:
126
+ response = requests.Response()
127
+ response.status_code = int(raw_resp["status"])
128
+ response.headers = raw_resp["headers"]
129
+
130
+ data = raw_resp["content"]
131
+ data = json.loads(data)
132
+ # Convert the dictionary to a string format that resembles the SSE event format
133
+ # For example, if the dict is {'event': 'message', 'data': 'your data'}, it should be formatted like this:
134
+ sse_format_data = ""
135
+ for event in data:
136
+ event_type = event.get("event", "message")
137
+ event_data = event.get("data", "")
138
+ event_data = json.dumps(event_data)
139
+ sse_format_data += f"event: {event_type}\ndata: {event_data}\n\n" # Add each event with new lines
140
+
141
+ response.raw = BytesIO(sse_format_data.encode("utf-8"))
142
+ return response
143
+
144
+
145
+ @retry
146
+ def _call_complete_xp(
147
+ model: str,
148
+ prompt: Union[str, List[ConversationMessage]],
149
+ options: Optional[CompleteOptions] = None,
150
+ deadline: Optional[float] = None,
151
+ ) -> requests.Response:
152
+ headers = _make_common_request_headers()
153
+ body = _make_request_body(model, prompt, options)
154
+ import _snowflake
155
+
156
+ raw_resp = _snowflake.send_snow_api_request("POST", _REST_COMPLETE_URL, {}, headers, body, {}, deadline)
157
+ return _xp_dict_to_response(raw_resp)
158
+
159
+
87
160
  @retry
88
161
  def _call_complete_rest(
89
162
  model: str,
@@ -110,36 +183,16 @@ def _call_complete_rest(
110
183
  scheme = "https"
111
184
  if hasattr(session.connection, "scheme"):
112
185
  scheme = session.connection.scheme
113
- url = urlunparse((scheme, session.connection.host, "api/v2/cortex/inference:complete", "", "", ""))
186
+ url = urlunparse((scheme, session.connection.host, _REST_COMPLETE_URL, "", "", ""))
114
187
 
115
- headers = {
116
- "Content-Type": "application/json",
117
- "Authorization": f'Snowflake Token="{session.connection.rest.token}"',
118
- "Accept": "application/json, text/event-stream",
119
- }
120
-
121
- data = {
122
- "model": model,
123
- "stream": True,
124
- }
125
- if isinstance(prompt, List):
126
- data["messages"] = prompt
127
- else:
128
- data["messages"] = [{"content": prompt}]
129
-
130
- if options:
131
- if "max_tokens" in options:
132
- data["max_tokens"] = options["max_tokens"]
133
- data["max_output_tokens"] = options["max_tokens"]
134
- if "temperature" in options:
135
- data["temperature"] = options["temperature"]
136
- if "top_p" in options:
137
- data["top_p"] = options["top_p"]
188
+ headers = _make_common_request_headers()
189
+ headers["Authorization"] = f'Snowflake Token="{session.connection.rest.token}"'
138
190
 
191
+ body = _make_request_body(model, prompt, options)
139
192
  logger.debug(f"making POST request to {url} (model={model})")
140
193
  return requests.post(
141
194
  url,
142
- json=data,
195
+ json=body,
143
196
  headers=headers,
144
197
  stream=True,
145
198
  )
@@ -164,49 +217,24 @@ def _complete_call_sql_function_snowpark(
164
217
  return cast(snowpark.Column, functions.builtin(function)(*args))
165
218
 
166
219
 
167
- def _complete_call_sql_function_immediate(
168
- function: str,
220
+ def _complete_non_streaming_immediate(
169
221
  model: str,
170
222
  prompt: Union[str, List[ConversationMessage]],
171
223
  options: Optional[CompleteOptions],
172
- session: Optional[snowpark.Session],
224
+ session: Optional[snowpark.Session] = None,
225
+ deadline: Optional[float] = None,
173
226
  ) -> str:
174
- session = session or context.get_active_session()
175
- if session is None:
176
- raise SnowflakeAuthenticationException(
177
- """Session required. Provide the session through a session=... argument or ensure an active session is
178
- available in your environment."""
179
- )
227
+ response = _complete_rest(model=model, prompt=prompt, options=options, session=session, deadline=deadline)
228
+ return "".join(response)
180
229
 
181
- # https://docs.snowflake.com/en/sql-reference/functions/complete-snowflake-cortex
182
- if options is not None or not isinstance(prompt, str):
183
- if isinstance(prompt, List):
184
- prompt_arg = prompt
185
- else:
186
- prompt_arg = [{"role": "user", "content": prompt}]
187
- options = options or {}
188
- lit_args = [
189
- functions.lit(model),
190
- functions.lit(prompt_arg),
191
- functions.lit(options),
192
- ]
193
- else:
194
- lit_args = [
195
- functions.lit(model),
196
- functions.lit(prompt),
197
- ]
198
-
199
- empty_df = session.create_dataframe([snowpark.Row()])
200
- df = empty_df.select(functions.builtin(function)(*lit_args))
201
- return cast(str, df.collect()[0][0])
202
230
 
203
-
204
- def _complete_sql_impl(
231
+ def _complete_non_streaming_impl(
205
232
  function: str,
206
233
  model: Union[str, snowpark.Column],
207
234
  prompt: Union[str, List[ConversationMessage], snowpark.Column],
208
235
  options: Optional[Union[CompleteOptions, snowpark.Column]],
209
- session: Optional[snowpark.Session],
236
+ session: Optional[snowpark.Session] = None,
237
+ deadline: Optional[float] = None,
210
238
  ) -> Union[str, snowpark.Column]:
211
239
  if isinstance(prompt, snowpark.Column):
212
240
  if options is not None:
@@ -217,7 +245,24 @@ def _complete_sql_impl(
217
245
  raise ValueError("'model' cannot be a snowpark.Column when 'prompt' is a string.")
218
246
  if isinstance(options, snowpark.Column):
219
247
  raise ValueError("'options' cannot be a snowpark.Column when 'prompt' is a string.")
220
- return _complete_call_sql_function_immediate(function, model, prompt, options, session)
248
+ return _complete_non_streaming_immediate(
249
+ model=model, prompt=prompt, options=options, session=session, deadline=deadline
250
+ )
251
+
252
+
253
+ def _complete_rest(
254
+ model: str,
255
+ prompt: Union[str, List[ConversationMessage]],
256
+ options: Optional[CompleteOptions] = None,
257
+ session: Optional[snowpark.Session] = None,
258
+ deadline: Optional[float] = None,
259
+ ) -> Iterator[str]:
260
+ if is_in_stored_procedure(): # type: ignore[no-untyped-call]
261
+ response = _call_complete_xp(model=model, prompt=prompt, options=options, deadline=deadline)
262
+ else:
263
+ response = _call_complete_rest(model=model, prompt=prompt, options=options, session=session, deadline=deadline)
264
+ assert response.status_code >= 200 and response.status_code < 300
265
+ return _return_stream_response(response, deadline)
221
266
 
222
267
 
223
268
  def _complete_impl(
@@ -239,10 +284,8 @@ def _complete_impl(
239
284
  raise ValueError("in REST mode, 'model' must be a string")
240
285
  if not isinstance(prompt, str) and not isinstance(prompt, List):
241
286
  raise ValueError("in REST mode, 'prompt' must be a string or a list of ConversationMessage")
242
- response = _call_complete_rest(model, prompt, options, session=session, deadline=deadline)
243
- assert response.status_code >= 200 and response.status_code < 300
244
- return _return_stream_response(response, deadline)
245
- return _complete_sql_impl(function, model, prompt, options, session)
287
+ return _complete_rest(model=model, prompt=prompt, options=options, session=session, deadline=deadline)
288
+ return _complete_non_streaming_impl(function, model, prompt, options, session, deadline)
246
289
 
247
290
 
248
291
  @telemetry.send_api_usage_telemetry(