Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ max_line_length=120
; T2xx: Use print https://github.com/jbkahn/flake8-print

extend-ignore=E203
exclude=build,setup,tool,.tox,connector_python3,parameters.py
exclude=build,setup,tool,.tox,connector_python3,parameters.py,check_feature_tags.py
per-file-ignores =
tests/*: T2
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
---
exclude: ^(.*egg.info.*|.*/parameters.py$|.*\.py_template|.*/experimental/.*|.*/fixtures/.*|docs/source/_themes/.*|.*\.patch)
repos:
- repo: local
hooks:
- id: check-py-test-feature-tags
name: Check py_test feature area tags
description: Ensure all py_test targets have feature area tags
entry: python bazel/check_feature_tags.py --precommit
language: system
files: BUILD\.bazel$
stages:
- pre-commit
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.1
hooks:
Expand Down
9 changes: 9 additions & 0 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
- id: check-py-test-feature-tags
name: Check py_test feature area tags
description: Ensure all py_test targets have feature area tags
entry: python bazel/check_feature_tags.py --precommit
language: system
files: BUILD\.bazel$
stages:
- commit
39 changes: 38 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,43 @@
# Release History

## 1.9.1
## 1.9.2

### Bug Fixes

- DataConnector: Fix `self._session` related errors inside Container Runtime.
- Registry: Fix a bug when trying to pass `None` to array (`pd.dtype('O')`) in signature and pandas data handler.

### New Features

- Experiment Tracking (PrPr): Automatically log the model, metrics, and parameters while training
XGBoost and LightGBM models.

```python
from snowflake.ml.experiment import ExperimentTracking
from snowflake.ml.experiment.callback import SnowflakeXgboostCallback, SnowflakeLightgbmCallback

exp = ExperimentTracking(session=sp_session, database_name="ML", schema_name="PUBLIC")

exp.set_experiment("MY_EXPERIMENT")

# XGBoost
callback = SnowflakeXgboostCallback(
exp, log_model=True, log_metrics=True, log_params=True, model_name="model_name", model_signature=sig
)
model = XGBClassifier(callbacks=[callback])
with exp.start_run():
model.fit(X, y, eval_set=[(X_test, y_test)])

# LightGBM
callback = SnowflakeLightgbmCallback(
exp, log_model=True, log_metrics=True, log_params=True, model_name="model_name", model_signature=sig
)
model = LGBMClassifier()
with exp.start_run():
model.fit(X, y, eval_set=[(X_test, y_test)], callbacks=[callback])
```

## 1.9.1 (07-18-2025)

### Bug Fixes

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

For example, to run all autogenerated tests locally:

Expand Down
11 changes: 10 additions & 1 deletion bazel/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@rules_python//python:defs.bzl", native_py_test = "py_test")
load("@rules_python//python:defs.bzl", "py_binary", native_py_test = "py_test")

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

Expand All @@ -12,13 +12,22 @@ native_py_test(
data = ["repo_paths.bzl"],
python_version = "PY3",
srcs_version = "PY3",
tags = ["feature:model_registry"],
)

sh_binary(
name = "test_wrapper",
srcs = ["test_wrapper.sh"],
)

py_binary(
name = "check_feature_tags",
srcs = ["check_feature_tags.py"],
main = "check_feature_tags.py",
python_version = "PY3",
srcs_version = "PY3",
)

# Package group for common targets in the repo.
package_group(
name = "snowml_public_common",
Expand Down
Loading