snowflake-ml-python 1.10.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.
- snowflake/cortex/_complete.py +3 -2
- snowflake/ml/_internal/utils/service_logger.py +26 -1
- snowflake/ml/experiment/_client/artifact.py +76 -0
- snowflake/ml/experiment/_client/experiment_tracking_sql_client.py +64 -1
- snowflake/ml/experiment/callback/keras.py +63 -0
- snowflake/ml/experiment/callback/lightgbm.py +5 -1
- snowflake/ml/experiment/callback/xgboost.py +5 -1
- snowflake/ml/experiment/experiment_tracking.py +89 -4
- snowflake/ml/feature_store/feature_store.py +1150 -131
- snowflake/ml/feature_store/feature_view.py +122 -0
- snowflake/ml/jobs/_utils/__init__.py +0 -0
- snowflake/ml/jobs/_utils/constants.py +9 -14
- snowflake/ml/jobs/_utils/feature_flags.py +16 -0
- snowflake/ml/jobs/_utils/payload_utils.py +61 -19
- snowflake/ml/jobs/_utils/query_helper.py +5 -1
- snowflake/ml/jobs/_utils/runtime_env_utils.py +63 -0
- snowflake/ml/jobs/_utils/scripts/get_instance_ip.py +18 -7
- snowflake/ml/jobs/_utils/scripts/mljob_launcher.py +15 -7
- snowflake/ml/jobs/_utils/spec_utils.py +44 -13
- snowflake/ml/jobs/_utils/stage_utils.py +22 -9
- snowflake/ml/jobs/_utils/types.py +7 -8
- snowflake/ml/jobs/job.py +34 -18
- snowflake/ml/jobs/manager.py +107 -24
- snowflake/ml/model/__init__.py +6 -1
- snowflake/ml/model/_client/model/batch_inference_specs.py +27 -0
- snowflake/ml/model/_client/model/model_version_impl.py +225 -73
- snowflake/ml/model/_client/ops/service_ops.py +128 -174
- snowflake/ml/model/_client/service/model_deployment_spec.py +123 -64
- snowflake/ml/model/_client/service/model_deployment_spec_schema.py +25 -9
- snowflake/ml/model/_model_composer/model_composer.py +1 -70
- snowflake/ml/model/_model_composer/model_manifest/model_manifest.py +2 -43
- snowflake/ml/model/_packager/model_handlers/huggingface_pipeline.py +207 -2
- snowflake/ml/model/_packager/model_handlers/sklearn.py +3 -1
- snowflake/ml/model/_packager/model_runtime/_snowml_inference_alternative_requirements.py +3 -3
- snowflake/ml/model/_signatures/snowpark_handler.py +1 -1
- snowflake/ml/model/_signatures/utils.py +4 -2
- snowflake/ml/model/inference_engine.py +5 -0
- snowflake/ml/model/models/huggingface_pipeline.py +4 -3
- snowflake/ml/model/openai_signatures.py +57 -0
- snowflake/ml/modeling/_internal/estimator_utils.py +43 -1
- snowflake/ml/modeling/_internal/local_implementations/pandas_trainer.py +14 -3
- snowflake/ml/modeling/_internal/snowpark_implementations/snowpark_trainer.py +17 -6
- snowflake/ml/modeling/calibration/calibrated_classifier_cv.py +1 -1
- snowflake/ml/modeling/cluster/affinity_propagation.py +1 -1
- snowflake/ml/modeling/cluster/agglomerative_clustering.py +1 -1
- snowflake/ml/modeling/cluster/birch.py +1 -1
- snowflake/ml/modeling/cluster/bisecting_k_means.py +1 -1
- snowflake/ml/modeling/cluster/dbscan.py +1 -1
- snowflake/ml/modeling/cluster/feature_agglomeration.py +1 -1
- snowflake/ml/modeling/cluster/k_means.py +1 -1
- snowflake/ml/modeling/cluster/mean_shift.py +1 -1
- snowflake/ml/modeling/cluster/mini_batch_k_means.py +1 -1
- snowflake/ml/modeling/cluster/optics.py +1 -1
- snowflake/ml/modeling/cluster/spectral_biclustering.py +1 -1
- snowflake/ml/modeling/cluster/spectral_clustering.py +1 -1
- snowflake/ml/modeling/cluster/spectral_coclustering.py +1 -1
- snowflake/ml/modeling/compose/column_transformer.py +1 -1
- snowflake/ml/modeling/compose/transformed_target_regressor.py +1 -1
- snowflake/ml/modeling/covariance/elliptic_envelope.py +1 -1
- snowflake/ml/modeling/covariance/empirical_covariance.py +1 -1
- snowflake/ml/modeling/covariance/graphical_lasso.py +1 -1
- snowflake/ml/modeling/covariance/graphical_lasso_cv.py +1 -1
- snowflake/ml/modeling/covariance/ledoit_wolf.py +1 -1
- snowflake/ml/modeling/covariance/min_cov_det.py +1 -1
- snowflake/ml/modeling/covariance/oas.py +1 -1
- snowflake/ml/modeling/covariance/shrunk_covariance.py +1 -1
- snowflake/ml/modeling/decomposition/dictionary_learning.py +1 -1
- snowflake/ml/modeling/decomposition/factor_analysis.py +1 -1
- snowflake/ml/modeling/decomposition/fast_ica.py +1 -1
- snowflake/ml/modeling/decomposition/incremental_pca.py +1 -1
- snowflake/ml/modeling/decomposition/kernel_pca.py +1 -1
- snowflake/ml/modeling/decomposition/mini_batch_dictionary_learning.py +1 -1
- snowflake/ml/modeling/decomposition/mini_batch_sparse_pca.py +1 -1
- snowflake/ml/modeling/decomposition/pca.py +1 -1
- snowflake/ml/modeling/decomposition/sparse_pca.py +1 -1
- snowflake/ml/modeling/decomposition/truncated_svd.py +1 -1
- snowflake/ml/modeling/discriminant_analysis/linear_discriminant_analysis.py +1 -1
- snowflake/ml/modeling/discriminant_analysis/quadratic_discriminant_analysis.py +1 -1
- snowflake/ml/modeling/ensemble/ada_boost_classifier.py +1 -1
- snowflake/ml/modeling/ensemble/ada_boost_regressor.py +1 -1
- snowflake/ml/modeling/ensemble/bagging_classifier.py +1 -1
- snowflake/ml/modeling/ensemble/bagging_regressor.py +1 -1
- snowflake/ml/modeling/ensemble/extra_trees_classifier.py +1 -1
- snowflake/ml/modeling/ensemble/extra_trees_regressor.py +1 -1
- snowflake/ml/modeling/ensemble/gradient_boosting_classifier.py +1 -1
- snowflake/ml/modeling/ensemble/gradient_boosting_regressor.py +1 -1
- snowflake/ml/modeling/ensemble/hist_gradient_boosting_classifier.py +1 -1
- snowflake/ml/modeling/ensemble/hist_gradient_boosting_regressor.py +1 -1
- snowflake/ml/modeling/ensemble/isolation_forest.py +1 -1
- snowflake/ml/modeling/ensemble/random_forest_classifier.py +1 -1
- snowflake/ml/modeling/ensemble/random_forest_regressor.py +1 -1
- snowflake/ml/modeling/ensemble/stacking_regressor.py +1 -1
- snowflake/ml/modeling/ensemble/voting_classifier.py +1 -1
- snowflake/ml/modeling/ensemble/voting_regressor.py +1 -1
- snowflake/ml/modeling/feature_selection/generic_univariate_select.py +1 -1
- snowflake/ml/modeling/feature_selection/select_fdr.py +1 -1
- snowflake/ml/modeling/feature_selection/select_fpr.py +1 -1
- snowflake/ml/modeling/feature_selection/select_fwe.py +1 -1
- snowflake/ml/modeling/feature_selection/select_k_best.py +1 -1
- snowflake/ml/modeling/feature_selection/select_percentile.py +1 -1
- snowflake/ml/modeling/feature_selection/sequential_feature_selector.py +1 -1
- snowflake/ml/modeling/feature_selection/variance_threshold.py +1 -1
- snowflake/ml/modeling/gaussian_process/gaussian_process_classifier.py +1 -1
- snowflake/ml/modeling/gaussian_process/gaussian_process_regressor.py +1 -1
- snowflake/ml/modeling/impute/iterative_imputer.py +1 -1
- snowflake/ml/modeling/impute/knn_imputer.py +1 -1
- snowflake/ml/modeling/impute/missing_indicator.py +1 -1
- snowflake/ml/modeling/kernel_approximation/additive_chi2_sampler.py +1 -1
- snowflake/ml/modeling/kernel_approximation/nystroem.py +1 -1
- snowflake/ml/modeling/kernel_approximation/polynomial_count_sketch.py +1 -1
- snowflake/ml/modeling/kernel_approximation/rbf_sampler.py +1 -1
- snowflake/ml/modeling/kernel_approximation/skewed_chi2_sampler.py +1 -1
- snowflake/ml/modeling/kernel_ridge/kernel_ridge.py +1 -1
- snowflake/ml/modeling/lightgbm/lgbm_classifier.py +1 -1
- snowflake/ml/modeling/lightgbm/lgbm_regressor.py +1 -1
- snowflake/ml/modeling/linear_model/ard_regression.py +1 -1
- snowflake/ml/modeling/linear_model/bayesian_ridge.py +1 -1
- snowflake/ml/modeling/linear_model/elastic_net.py +1 -1
- snowflake/ml/modeling/linear_model/elastic_net_cv.py +1 -1
- snowflake/ml/modeling/linear_model/gamma_regressor.py +1 -1
- snowflake/ml/modeling/linear_model/huber_regressor.py +1 -1
- snowflake/ml/modeling/linear_model/lars.py +1 -1
- snowflake/ml/modeling/linear_model/lars_cv.py +1 -1
- snowflake/ml/modeling/linear_model/lasso.py +1 -1
- snowflake/ml/modeling/linear_model/lasso_cv.py +1 -1
- snowflake/ml/modeling/linear_model/lasso_lars.py +1 -1
- snowflake/ml/modeling/linear_model/lasso_lars_cv.py +1 -1
- snowflake/ml/modeling/linear_model/lasso_lars_ic.py +1 -1
- snowflake/ml/modeling/linear_model/linear_regression.py +1 -1
- snowflake/ml/modeling/linear_model/logistic_regression.py +1 -1
- snowflake/ml/modeling/linear_model/logistic_regression_cv.py +1 -1
- snowflake/ml/modeling/linear_model/multi_task_elastic_net.py +1 -1
- snowflake/ml/modeling/linear_model/multi_task_elastic_net_cv.py +1 -1
- snowflake/ml/modeling/linear_model/multi_task_lasso.py +1 -1
- snowflake/ml/modeling/linear_model/multi_task_lasso_cv.py +1 -1
- snowflake/ml/modeling/linear_model/orthogonal_matching_pursuit.py +1 -1
- snowflake/ml/modeling/linear_model/passive_aggressive_classifier.py +1 -1
- snowflake/ml/modeling/linear_model/passive_aggressive_regressor.py +1 -1
- snowflake/ml/modeling/linear_model/perceptron.py +1 -1
- snowflake/ml/modeling/linear_model/poisson_regressor.py +1 -1
- snowflake/ml/modeling/linear_model/ransac_regressor.py +1 -1
- snowflake/ml/modeling/linear_model/ridge.py +1 -1
- snowflake/ml/modeling/linear_model/ridge_classifier.py +1 -1
- snowflake/ml/modeling/linear_model/ridge_classifier_cv.py +1 -1
- snowflake/ml/modeling/linear_model/ridge_cv.py +1 -1
- snowflake/ml/modeling/linear_model/sgd_classifier.py +1 -1
- snowflake/ml/modeling/linear_model/sgd_one_class_svm.py +1 -1
- snowflake/ml/modeling/linear_model/sgd_regressor.py +1 -1
- snowflake/ml/modeling/linear_model/theil_sen_regressor.py +1 -1
- snowflake/ml/modeling/linear_model/tweedie_regressor.py +1 -1
- snowflake/ml/modeling/manifold/isomap.py +1 -1
- snowflake/ml/modeling/manifold/mds.py +1 -1
- snowflake/ml/modeling/manifold/spectral_embedding.py +1 -1
- snowflake/ml/modeling/manifold/tsne.py +1 -1
- snowflake/ml/modeling/mixture/bayesian_gaussian_mixture.py +1 -1
- snowflake/ml/modeling/mixture/gaussian_mixture.py +1 -1
- snowflake/ml/modeling/multiclass/one_vs_one_classifier.py +1 -1
- snowflake/ml/modeling/multiclass/one_vs_rest_classifier.py +1 -1
- snowflake/ml/modeling/multiclass/output_code_classifier.py +1 -1
- snowflake/ml/modeling/naive_bayes/bernoulli_nb.py +1 -1
- snowflake/ml/modeling/naive_bayes/categorical_nb.py +1 -1
- snowflake/ml/modeling/naive_bayes/complement_nb.py +1 -1
- snowflake/ml/modeling/naive_bayes/gaussian_nb.py +1 -1
- snowflake/ml/modeling/naive_bayes/multinomial_nb.py +1 -1
- snowflake/ml/modeling/neighbors/k_neighbors_classifier.py +1 -1
- snowflake/ml/modeling/neighbors/k_neighbors_regressor.py +1 -1
- snowflake/ml/modeling/neighbors/kernel_density.py +1 -1
- snowflake/ml/modeling/neighbors/local_outlier_factor.py +1 -1
- snowflake/ml/modeling/neighbors/nearest_centroid.py +1 -1
- snowflake/ml/modeling/neighbors/nearest_neighbors.py +1 -1
- snowflake/ml/modeling/neighbors/neighborhood_components_analysis.py +1 -1
- snowflake/ml/modeling/neighbors/radius_neighbors_classifier.py +1 -1
- snowflake/ml/modeling/neighbors/radius_neighbors_regressor.py +1 -1
- snowflake/ml/modeling/neural_network/bernoulli_rbm.py +1 -1
- snowflake/ml/modeling/neural_network/mlp_classifier.py +1 -1
- snowflake/ml/modeling/neural_network/mlp_regressor.py +1 -1
- snowflake/ml/modeling/preprocessing/polynomial_features.py +1 -1
- snowflake/ml/modeling/semi_supervised/label_propagation.py +1 -1
- snowflake/ml/modeling/semi_supervised/label_spreading.py +1 -1
- snowflake/ml/modeling/svm/linear_svc.py +1 -1
- snowflake/ml/modeling/svm/linear_svr.py +1 -1
- snowflake/ml/modeling/svm/nu_svc.py +1 -1
- snowflake/ml/modeling/svm/nu_svr.py +1 -1
- snowflake/ml/modeling/svm/svc.py +1 -1
- snowflake/ml/modeling/svm/svr.py +1 -1
- snowflake/ml/modeling/tree/decision_tree_classifier.py +1 -1
- snowflake/ml/modeling/tree/decision_tree_regressor.py +1 -1
- snowflake/ml/modeling/tree/extra_tree_classifier.py +1 -1
- snowflake/ml/modeling/tree/extra_tree_regressor.py +1 -1
- snowflake/ml/modeling/xgboost/xgb_classifier.py +1 -1
- snowflake/ml/modeling/xgboost/xgb_regressor.py +1 -1
- snowflake/ml/modeling/xgboost/xgbrf_classifier.py +1 -1
- snowflake/ml/modeling/xgboost/xgbrf_regressor.py +1 -1
- snowflake/ml/monitoring/_client/model_monitor_sql_client.py +91 -6
- snowflake/ml/monitoring/_manager/model_monitor_manager.py +3 -0
- snowflake/ml/monitoring/entities/model_monitor_config.py +3 -0
- snowflake/ml/monitoring/model_monitor.py +26 -0
- snowflake/ml/registry/_manager/model_manager.py +7 -35
- snowflake/ml/registry/_manager/model_parameter_reconciler.py +194 -5
- snowflake/ml/version.py +1 -1
- {snowflake_ml_python-1.10.0.dist-info → snowflake_ml_python-1.12.0.dist-info}/METADATA +87 -7
- {snowflake_ml_python-1.10.0.dist-info → snowflake_ml_python-1.12.0.dist-info}/RECORD +205 -197
- {snowflake_ml_python-1.10.0.dist-info → snowflake_ml_python-1.12.0.dist-info}/WHEEL +0 -0
- {snowflake_ml_python-1.10.0.dist-info → snowflake_ml_python-1.12.0.dist-info}/licenses/LICENSE.txt +0 -0
- {snowflake_ml_python-1.10.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.
|
|
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.
|
|
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.
|
|
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,14 +410,95 @@ 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.
|
|
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
|
|
|
478
|
+
* ML Job: Fix `Error: Unable to retrieve head IP address` if not all instances start within the timeout.
|
|
479
|
+
* ML Job: Fix `TypeError: SnowflakeCursor.execute() got an unexpected keyword argument '_force_qmark_paramstyle'`
|
|
480
|
+
when running inside Stored Procedures.
|
|
481
|
+
|
|
417
482
|
### Behavior Changes
|
|
418
483
|
|
|
419
484
|
### New Features
|
|
420
485
|
|
|
486
|
+
* `ModelVersion.create_service()`: Made `image_repo` argument optional. By
|
|
487
|
+
default it will use a default image repo, which is
|
|
488
|
+
being rolled out in server version 9.22+.
|
|
489
|
+
* Experiment Tracking (PrPr): Automatically log the model, metrics, and parameters while training Keras models with
|
|
490
|
+
`snowflake.ml.experiment.callback.keras.SnowflakeKerasCallback`.
|
|
491
|
+
|
|
492
|
+
## 1.10.0
|
|
493
|
+
|
|
494
|
+
### Behavior Changes
|
|
495
|
+
|
|
496
|
+
* Experiment Tracking (PrPr): The import paths for the auto-logging callbacks have changed to
|
|
497
|
+
`snowflake.ml.experiment.callback.xgboost.SnowflakeXgboostCallback` and
|
|
498
|
+
`snowflake.ml.experiment.callback.lightgbm.SnowflakeLightgbmCallback`.
|
|
499
|
+
|
|
500
|
+
### New Features
|
|
501
|
+
|
|
421
502
|
* Registry: add progress bars for `ModelVersion.create_service` and `ModelVersion.log_model`.
|
|
422
503
|
* ModelRegistry: Logs emitted during `ModelVersion.create_service` will be written to a file. The file location
|
|
423
504
|
will be shown in the console.
|
|
@@ -436,13 +517,13 @@ NOTE: Version 1.7.0 is used as example here. Please choose the the latest versio
|
|
|
436
517
|
|
|
437
518
|
```python
|
|
438
519
|
from snowflake.ml.experiment import ExperimentTracking
|
|
520
|
+
from snowflake.ml.experiment.callback import SnowflakeXgboostCallback, SnowflakeLightgbmCallback
|
|
439
521
|
|
|
440
522
|
exp = ExperimentTracking(session=sp_session, database_name="ML", schema_name="PUBLIC")
|
|
441
523
|
|
|
442
524
|
exp.set_experiment("MY_EXPERIMENT")
|
|
443
525
|
|
|
444
526
|
# XGBoost
|
|
445
|
-
from snowflake.ml.experiment.callback.xgboost import SnowflakeXgboostCallback
|
|
446
527
|
callback = SnowflakeXgboostCallback(
|
|
447
528
|
exp, log_model=True, log_metrics=True, log_params=True, model_name="model_name", model_signature=sig
|
|
448
529
|
)
|
|
@@ -451,7 +532,6 @@ with exp.start_run():
|
|
|
451
532
|
model.fit(X, y, eval_set=[(X_test, y_test)])
|
|
452
533
|
|
|
453
534
|
# LightGBM
|
|
454
|
-
from snowflake.ml.experiment.callback.lightgbm import SnowflakeLightgbmCallback
|
|
455
535
|
callback = SnowflakeLightgbmCallback(
|
|
456
536
|
exp, log_model=True, log_metrics=True, log_params=True, model_name="model_name", model_signature=sig
|
|
457
537
|
)
|