Skip to content

Commit 2bd6eac

Browse files
sfc-gh-anavalosSnowflake Authorssfc-gh-thoyt
authored
Release snowflake-ml-python 1.9.2 (#169)
* Project import generated by Copybara. GitOrigin-RevId: d3f67dc92e09a79fa35b2fbe1329f9ed238847af * Amend changelog (#168) --------- Co-authored-by: Snowflake Authors <[email protected]> Co-authored-by: Tyler Hoyt <[email protected]>
1 parent e7f04a0 commit 2bd6eac

File tree

145 files changed

+2769
-659
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+2769
-659
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ max_line_length=120
2525
; T2xx: Use print https://github.com/jbkahn/flake8-print
2626

2727
extend-ignore=E203
28-
exclude=build,setup,tool,.tox,connector_python3,parameters.py
28+
exclude=build,setup,tool,.tox,connector_python3,parameters.py,check_feature_tags.py
2929
per-file-ignores =
3030
tests/*: T2

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
---
22
exclude: ^(.*egg.info.*|.*/parameters.py$|.*\.py_template|.*/experimental/.*|.*/fixtures/.*|docs/source/_themes/.*|.*\.patch)
33
repos:
4+
- repo: local
5+
hooks:
6+
- id: check-py-test-feature-tags
7+
name: Check py_test feature area tags
8+
description: Ensure all py_test targets have feature area tags
9+
entry: python bazel/check_feature_tags.py --precommit
10+
language: system
11+
files: BUILD\.bazel$
12+
stages:
13+
- pre-commit
414
- repo: https://github.com/asottile/pyupgrade
515
rev: v2.31.1
616
hooks:

.pre-commit-hooks.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
- id: check-py-test-feature-tags
3+
name: Check py_test feature area tags
4+
description: Ensure all py_test targets have feature area tags
5+
entry: python bazel/check_feature_tags.py --precommit
6+
language: system
7+
files: BUILD\.bazel$
8+
stages:
9+
- commit

CHANGELOG.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,43 @@
11
# Release History
22

3-
## 1.9.1
3+
## 1.9.2
4+
5+
### Bug Fixes
6+
7+
- DataConnector: Fix `self._session` related errors inside Container Runtime.
8+
- Registry: Fix a bug when trying to pass `None` to array (`pd.dtype('O')`) in signature and pandas data handler.
9+
10+
### New Features
11+
12+
- Experiment Tracking (PrPr): Automatically log the model, metrics, and parameters while training
13+
XGBoost and LightGBM models.
14+
15+
```python
16+
from snowflake.ml.experiment import ExperimentTracking
17+
from snowflake.ml.experiment.callback import SnowflakeXgboostCallback, SnowflakeLightgbmCallback
18+
19+
exp = ExperimentTracking(session=sp_session, database_name="ML", schema_name="PUBLIC")
20+
21+
exp.set_experiment("MY_EXPERIMENT")
22+
23+
# XGBoost
24+
callback = SnowflakeXgboostCallback(
25+
exp, log_model=True, log_metrics=True, log_params=True, model_name="model_name", model_signature=sig
26+
)
27+
model = XGBClassifier(callbacks=[callback])
28+
with exp.start_run():
29+
model.fit(X, y, eval_set=[(X_test, y_test)])
30+
31+
# LightGBM
32+
callback = SnowflakeLightgbmCallback(
33+
exp, log_model=True, log_metrics=True, log_params=True, model_name="model_name", model_signature=sig
34+
)
35+
model = LGBMClassifier()
36+
with exp.start_run():
37+
model.fit(X, y, eval_set=[(X_test, y_test)], callbacks=[callback])
38+
```
39+
40+
## 1.9.1 (07-18-2025)
441

542
### Bug Fixes
643

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ TIP: If a test fails, there will be a log file, which is executable. You do not
156156
Integration tests are configured to run against an existing Snowflake account. To run tests locally, make sure that you
157157
have configured a SnowSQL `config` file in `<HOME_DIR>/.snowsql/config` (see Snowflake
158158
[documentation](https://docs.snowflake.com/en/user-guide/snowsql-config) for configuration options).
159+
Since MFA is enabled, please use a PAT as the password in `config`. You can generate a PAT in Snowsight
160+
under Settings -> Authentication -> Programmatic access tokens
159161

160162
For example, to run all autogenerated tests locally:
161163

bazel/BUILD.bazel

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_python//python:defs.bzl", native_py_test = "py_test")
1+
load("@rules_python//python:defs.bzl", "py_binary", native_py_test = "py_test")
22

33
package(default_visibility = ["//visibility:public"])
44

@@ -12,13 +12,22 @@ native_py_test(
1212
data = ["repo_paths.bzl"],
1313
python_version = "PY3",
1414
srcs_version = "PY3",
15+
tags = ["feature:model_registry"],
1516
)
1617

1718
sh_binary(
1819
name = "test_wrapper",
1920
srcs = ["test_wrapper.sh"],
2021
)
2122

23+
py_binary(
24+
name = "check_feature_tags",
25+
srcs = ["check_feature_tags.py"],
26+
main = "check_feature_tags.py",
27+
python_version = "PY3",
28+
srcs_version = "PY3",
29+
)
30+
2231
# Package group for common targets in the repo.
2332
package_group(
2433
name = "snowml_public_common",

0 commit comments

Comments
 (0)