Skip to content

Commit 66197a8

Browse files
sfc-gh-anavalosSnowflake Authors
and
Snowflake Authors
authored
Project import generated by Copybara. (#158)
GitOrigin-RevId: 608fed8cb61b0f41e855c543a97c30536a401b9f Co-authored-by: Snowflake Authors <[email protected]>
1 parent 6910e96 commit 66197a8

File tree

81 files changed

+1163
-2041
lines changed

Some content is hidden

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

81 files changed

+1163
-2041
lines changed

CHANGELOG.md

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

3-
## 1.8.4
3+
## 1.8.5
4+
5+
### Bug Fixes
6+
7+
- Registry: Fixed a bug when listing and deleting container services.
8+
- Registry: Fixed explainability issue with scikit-learn pipelines, skipping explain function creation.
9+
- Explainability: bump minimum streamlit version down to 1.30
10+
- Modeling: Make XGBoost a required dependency (xgboost is not a required dependency in snowflake-ml-python 1.8.4).
11+
12+
### Breaking change
13+
14+
- ML Job: Rename argument `num_instances` to `target_instances` in job submission APIs and
15+
change type from `Optional[int]` to `int`
16+
17+
### New Features
18+
19+
- Registry: No longer checks if the snowflake-ml-python version is available in the Snowflake Conda channel when logging
20+
an SPCS-only model.
21+
- ML Job: Add `min_instances` argument to the job decorator to allow waiting for workers to be ready.
22+
23+
## 1.8.4 (2025-05-12)
424

525
### Bug Fixes
626

CONTRIBUTING.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,15 @@ bazel run --config=pre_build //bazel/requirements:sync_requirements
217217

218218
Then, your code can use the package as if it were "installed" in the Python environment.
219219

220+
### Run Bazel with different Python versions
221+
222+
Set the environment variable `BAZEL_CONDA_PYTHON_VERSION` to run bazel with a different supported python version. For example,
223+
run a test target with Python 3.10:
224+
225+
```sh
226+
BAZEL_CONDA_PYTHON_VERSION=3.10 bazel test --config=core //my/test:target
227+
```
228+
220229
### Adding a new dependencies
221230

222231
Please provide the following fields when adding a new record:
@@ -455,8 +464,7 @@ with caller's rights, set `test_callers_rights=False`. (Owner's rights store pro
455464
### Compatibility Test
456465

457466
To test if your code is compatible with previous version simply, you could work based on `CommonTestBase` in
458-
`tests/integ/snowflake/ml/test_utils/common_test_base.py`. An example of such test could be found in
459-
`tests/integ/snowflake/ml/registry/model_registry_compat_test.py`.
467+
`tests/integ/snowflake/ml/test_utils/common_test_base.py`.
460468

461469
To write a such test, you need to
462470

_typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ extend-ignore-identifiers-re = [
55

66
[default.extend-identifiers]
77
LiteralNDArrayType = "LiteralNDArrayType"
8+
NDFrame = "NDFrame"
89

910
[default.extend-words]
1011
MAPE = "MAPE"

bazel/environments/conda-env-all.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ dependencies:
3232
- networkx==2.8.4
3333
- numpy==1.26.4
3434
- packaging==24.1
35-
- pandas==1.5.3
35+
- pandas==2.1.4
3636
- protobuf==4.25.3
3737
- psutil==5.9.0
3838
- pyarrow==16.1.0
@@ -55,7 +55,7 @@ dependencies:
5555
- sentence-transformers==2.7.0
5656
- sentencepiece==0.1.99
5757
- shap==0.46.0
58-
- snowflake-connector-python==3.14.0
58+
- snowflake-connector-python==3.15.0
5959
- snowflake-snowpark-python==1.28.0
6060
- snowflake.core==1.0.2
6161
- sphinx==5.0.2

bazel/environments/conda-env-core.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies:
2727
- networkx==2.8.4
2828
- numpy==1.26.4
2929
- packaging==24.1
30-
- pandas==1.5.3
30+
- pandas==2.1.4
3131
- protobuf==4.25.3
3232
- psutil==5.9.0
3333
- pyarrow==16.1.0
@@ -47,7 +47,7 @@ dependencies:
4747
- scikit-learn==1.5.1
4848
- scipy==1.10.1
4949
- shap==0.46.0
50-
- snowflake-connector-python==3.14.0
50+
- snowflake-connector-python==3.15.0
5151
- snowflake-snowpark-python==1.28.0
5252
- snowflake.core==1.0.2
5353
- sphinx==5.0.2
@@ -60,6 +60,7 @@ dependencies:
6060
- types-toml==0.10.8.6
6161
- typing-extensions==4.11.0
6262
- werkzeug==2.2.2
63+
- xgboost==2.1.1
6364
- pip
6465
- pip:
6566
- --extra-index-url https://pypi.org/simple

bazel/environments/conda-env-keras.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dependencies:
2828
- networkx==2.8.4
2929
- numpy==1.26.4
3030
- packaging==24.1
31-
- pandas==1.5.3
31+
- pandas==2.1.4
3232
- protobuf==4.25.3
3333
- psutil==5.9.0
3434
- pyarrow==16.1.0
@@ -49,7 +49,7 @@ dependencies:
4949
- scikit-learn==1.5.1
5050
- scipy==1.10.1
5151
- shap==0.46.0
52-
- snowflake-connector-python==3.14.0
52+
- snowflake-connector-python==3.15.0
5353
- snowflake-snowpark-python==1.28.0
5454
- snowflake.core==1.0.2
5555
- sphinx==5.0.2
@@ -64,6 +64,7 @@ dependencies:
6464
- types-toml==0.10.8.6
6565
- typing-extensions==4.11.0
6666
- werkzeug==2.2.2
67+
- xgboost==2.1.1
6768
- pip
6869
- pip:
6970
- --extra-index-url https://pypi.org/simple

bazel/environments/conda-env-ml.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ dependencies:
3131
- networkx==2.8.4
3232
- numpy==1.26.4
3333
- packaging==24.1
34-
- pandas==1.5.3
34+
- pandas==2.1.4
3535
- protobuf==4.25.3
3636
- psutil==5.9.0
3737
- pyarrow==16.1.0
@@ -51,7 +51,7 @@ dependencies:
5151
- scikit-learn==1.5.1
5252
- scipy==1.10.1
5353
- shap==0.46.0
54-
- snowflake-connector-python==3.14.0
54+
- snowflake-connector-python==3.15.0
5555
- snowflake-snowpark-python==1.28.0
5656
- snowflake.core==1.0.2
5757
- sphinx==5.0.2

bazel/environments/conda-env-torch.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dependencies:
2828
- networkx==2.8.4
2929
- numpy==1.26.4
3030
- packaging==24.1
31-
- pandas==1.5.3
31+
- pandas==2.1.4
3232
- protobuf==4.25.3
3333
- psutil==5.9.0
3434
- pyarrow==16.1.0
@@ -51,7 +51,7 @@ dependencies:
5151
- sentence-transformers==2.7.0
5252
- sentencepiece==0.1.99
5353
- shap==0.46.0
54-
- snowflake-connector-python==3.14.0
54+
- snowflake-connector-python==3.15.0
5555
- snowflake-snowpark-python==1.28.0
5656
- snowflake.core==1.0.2
5757
- sphinx==5.0.2
@@ -67,6 +67,7 @@ dependencies:
6767
- types-toml==0.10.8.6
6868
- typing-extensions==4.11.0
6969
- werkzeug==2.2.2
70+
- xgboost==2.1.1
7071
- pip
7172
- pip:
7273
- --extra-index-url https://pypi.org/simple

bazel/environments/conda-optional-dependency-ml.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ dependencies:
1010
- catboost>=1.2.0, <2
1111
- lightgbm>=4.1.0, <5
1212
- mlflow>=2.16.0, <3
13-
- streamlit>=1.44.0,<2
14-
- xgboost>=1.7.3,<3
13+
- streamlit>=1.30.0,<2

bazel/environments/requirements_core.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ mypy==1.10.0
2323
networkx==2.8.4
2424
numpy==1.26.4
2525
packaging==24.1
26-
pandas==1.5.3
26+
pandas==2.1.4
2727
protobuf==4.25.3
2828
psutil==5.9.0
2929
pyarrow==16.1.0
@@ -41,7 +41,7 @@ s3fs==2024.6.1
4141
scikit-learn==1.5.1
4242
scipy==1.10.1
4343
shap==0.46.0
44-
snowflake-connector-python[pandas]==3.14.0
44+
snowflake-connector-python[pandas]==3.15.0
4545
snowflake-snowpark-python==1.28.0
4646
snowflake.core==1.0.2
4747
sphinx==5.0.2
@@ -55,3 +55,4 @@ types-requests==2.30.0.0
5555
types-toml==0.10.8.6
5656
typing-extensions==4.11.0
5757
werkzeug==2.2.2
58+
xgboost==2.1.1

bazel/environments/requirements_keras.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ mypy==1.10.0
2424
networkx==2.8.4
2525
numpy==1.26.4
2626
packaging==24.1
27-
pandas==1.5.3
27+
pandas==2.1.4
2828
protobuf==4.25.3
2929
psutil==5.9.0
3030
pyarrow==16.1.0
@@ -42,7 +42,7 @@ s3fs==2024.6.1
4242
scikit-learn==1.5.1
4343
scipy==1.10.1
4444
shap==0.46.0
45-
snowflake-connector-python[pandas]==3.14.0
45+
snowflake-connector-python[pandas]==3.15.0
4646
snowflake-snowpark-python==1.28.0
4747
snowflake.core==1.0.2
4848
sphinx==5.0.2
@@ -60,3 +60,4 @@ types-requests==2.30.0.0
6060
types-toml==0.10.8.6
6161
typing-extensions==4.11.0
6262
werkzeug==2.2.2
63+
xgboost==2.1.1

bazel/environments/requirements_ml.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ mypy==1.10.0
2727
networkx==2.8.4
2828
numpy==1.26.4
2929
packaging==24.1
30-
pandas==1.5.3
30+
pandas==2.1.4
3131
protobuf==4.25.3
3232
psutil==5.9.0
3333
pyarrow==16.1.0
@@ -45,7 +45,7 @@ s3fs==2024.6.1
4545
scikit-learn==1.5.1
4646
scipy==1.10.1
4747
shap==0.46.0
48-
snowflake-connector-python[pandas]==3.14.0
48+
snowflake-connector-python[pandas]==3.15.0
4949
snowflake-snowpark-python==1.28.0
5050
snowflake.core==1.0.2
5151
sphinx==5.0.2

bazel/environments/requirements_torch.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ mypy==1.10.0
2525
networkx==2.8.4
2626
numpy==1.26.4
2727
packaging==24.1
28-
pandas==1.5.3
28+
pandas==2.1.4
2929
protobuf==4.25.3
3030
psutil==5.9.0
3131
pyarrow==16.1.0
@@ -45,7 +45,7 @@ scipy==1.10.1
4545
sentence-transformers==2.7.0
4646
sentencepiece==0.1.99
4747
shap==0.46.0
48-
snowflake-connector-python[pandas]==3.14.0
48+
snowflake-connector-python[pandas]==3.15.0
4949
snowflake-snowpark-python==1.28.0
5050
snowflake.core==1.0.2
5151
sphinx==5.0.2
@@ -63,3 +63,4 @@ types-requests==2.30.0.0
6363
types-toml==0.10.8.6
6464
typing-extensions==4.11.0
6565
werkzeug==2.2.2
66+
xgboost==2.1.1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
OPTIONAL_DEPENDENCY_GROUPS = {
22
"keras": ["torch", "tensorflow", "keras"],
3-
"ml": ["lightgbm", "catboost", "mlflow", "altair", "xgboost", "streamlit"],
3+
"ml": ["lightgbm", "catboost", "mlflow", "altair", "streamlit"],
44
"torch": ["torch", "transformers", "mlflow"],
55
}

ci/build_and_run_tests.sh

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ BAZEL="bazel"
3939
ENV="pip"
4040
WITH_SNOWPARK=false
4141
WITH_SPCS_IMAGE=false
42-
INCLUDE_AUTOGEN_TESTS=false
4342
MODE="continuous_run"
4443
PYTHON_VERSION=3.9
4544
PYTHON_ENABLE_SCRIPT="bin/activate"
@@ -66,9 +65,6 @@ while (($#)); do
6665
--with-snowpark)
6766
WITH_SNOWPARK=true
6867
;;
69-
--include-autogen-tests)
70-
INCLUDE_AUTOGEN_TESTS=true
71-
;;
7268
--mode)
7369
shift
7470
if [[ $1 = "merge_gate" || $1 = "continuous_run" || $1 = "quarantined" || $1 = "release" ]]; then
@@ -200,19 +196,13 @@ pushd ${SNOWML_DIR}
200196
VERSION=$(grep -oE "VERSION = \"[0-9]+\\.[0-9]+\\.[0-9]+.*\"" snowflake/ml/version.py| cut -d'"' -f2)
201197
echo "Extracted Package Version from code: ${VERSION}"
202198

203-
if [ "${INCLUDE_AUTOGEN_TESTS}" = true ]; then
204-
echo "Generating and copying autogen tests."
205-
#
206-
# Generate and copy auto-gen tests.
207-
"${BAZEL}" "${BAZEL_ADDITIONAL_STARTUP_FLAGS[@]+"${BAZEL_ADDITIONAL_STARTUP_FLAGS[@]}"}" build --config=build "${BAZEL_ADDITIONAL_BUILD_FLAGS[@]+"${BAZEL_ADDITIONAL_BUILD_FLAGS[@]}"}" //tests/integ/...
199+
# Generate and copy auto-gen tests.
200+
"${BAZEL}" "${BAZEL_ADDITIONAL_STARTUP_FLAGS[@]+"${BAZEL_ADDITIONAL_STARTUP_FLAGS[@]}"}" build --config=build "${BAZEL_ADDITIONAL_BUILD_FLAGS[@]+"${BAZEL_ADDITIONAL_BUILD_FLAGS[@]}"}" //tests/integ/...
208201

209-
# Rsync cannot work well with path that has drive letter in Windows,
210-
# Thus, rsync has to use relative path instead of absolute ones.
202+
# Rsync cannot work well with path that has drive letter in Windows,
203+
# Thus, rsync has to use relative path instead of absolute ones.
211204

212-
rsync -av --exclude '*.runfiles_manifest' --exclude '*.runfiles/**' "bazel-bin/tests" .
213-
else
214-
echo "Excluding autogen tests."
215-
fi
205+
rsync -av --exclude '*.runfiles_manifest' --exclude '*.runfiles/**' "bazel-bin/tests" .
216206

217207
# Read environments from optional_dependency_groups.bzl
218208
groups=()
@@ -377,10 +367,18 @@ for i in "${!groups[@]}"; do
377367
"${_MICROMAMBA_BIN}" clean --all --force-pkgs-dirs -y
378368

379369
# Create testing env
380-
"${_MICROMAMBA_BIN}" create -y -p ./testenv -c "${WORKSPACE}/conda-bld" -c "https://repo.anaconda.com/pkgs/snowflake/" --override-channels "python=${PYTHON_VERSION}" snowflake-ml-python
370+
"${_MICROMAMBA_BIN}" create -y -p ./testenv -c "${WORKSPACE}/conda-bld" -c "https://repo.anaconda.com/pkgs/snowflake/" --override-channels "python=${PYTHON_VERSION}" snowflake-ml-python==${VERSION}
381371
if [[ "${group}" != "core" ]]; then
372+
sed -i "/^channels:/a\ - ${WORKSPACE}/conda-bld" "${WORKSPACE}/${SNOWML_DIR}/bazel/environments/conda-optional-dependency-${group}.yml"
373+
sed -i "/^dependencies:/a\ - snowflake-ml-python==${VERSION}" "${WORKSPACE}/${SNOWML_DIR}/bazel/environments/conda-optional-dependency-${group}.yml"
374+
echo "== Printing content of conda-optional-dependency-${group}.yml =="
375+
cat "${WORKSPACE}/${SNOWML_DIR}/bazel/environments/conda-optional-dependency-${group}.yml"
382376
"${_MICROMAMBA_BIN}" env update -p ./testenv -f "${WORKSPACE}/${SNOWML_DIR}/bazel/environments/conda-optional-dependency-${group}.yml"
383377
fi
378+
sed -i "/^channels:/a\ - ${WORKSPACE}/conda-bld" "${WORKSPACE}/${SNOWML_DIR}/bazel/environments/conda-env-build-test.yml"
379+
sed -i "/^dependencies:/a\ - snowflake-ml-python==${VERSION}" "${WORKSPACE}/${SNOWML_DIR}/bazel/environments/conda-env-build-test.yml"
380+
echo "== Printing content of conda-env-build-test.yml =="
381+
cat "${WORKSPACE}/${SNOWML_DIR}/bazel/environments/conda-env-build-test.yml"
384382
"${_MICROMAMBA_BIN}" env update -p ./testenv -f "${WORKSPACE}/${SNOWML_DIR}/bazel/environments/conda-env-build-test.yml"
385383
"${_MICROMAMBA_BIN}" list -p ./testenv
386384

ci/conda_recipe/meta.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ build:
1717
noarch: python
1818
package:
1919
name: snowflake-ml-python
20-
version: 1.8.4
20+
version: 1.8.5
2121
requirements:
2222
build:
2323
- python
@@ -33,7 +33,7 @@ requirements:
3333
- importlib_resources>=6.1.1, <7
3434
- numpy>=1.23,<2
3535
- packaging>=20.9,<25
36-
- pandas>=1.0.0,<3
36+
- pandas>=2.1.4,<3
3737
- pyarrow
3838
- pydantic>=2.8.2, <3
3939
- pyjwt>=2.0.0, <3
@@ -45,11 +45,12 @@ requirements:
4545
- scikit-learn<1.6
4646
- scipy>=1.9,<2
4747
- shap>=0.46.0,<1
48-
- snowflake-connector-python>=3.14.0,<4
48+
- snowflake-connector-python>=3.15.0,<4
4949
- snowflake-snowpark-python>=1.17.0,<2,!=1.26.0
5050
- snowflake.core>=1.0.2,<2
5151
- sqlparse>=0.4,<1
5252
- typing-extensions>=4.1.0,<5
53+
- xgboost>=1.7.3,<3
5354
- python>=3.9,<3.13
5455
run_constrained:
5556
- altair>=5,<6
@@ -60,12 +61,11 @@ requirements:
6061
- pytorch>=2.0.1,<3
6162
- sentence-transformers>=2.7.0,<4
6263
- sentencepiece>=0.1.95,<0.2.0
63-
- streamlit>=1.44.0,<2
64+
- streamlit>=1.30.0,<2
6465
- tensorflow>=2.17.0,<3
6566
- tokenizers>=0.15.1,<1
6667
- torchdata>=0.4,<1
6768
- transformers>=4.39.3,<5
68-
- xgboost>=1.7.3,<3
6969
source:
7070
path: ../../
7171
test:

ci/targets/exclude_from_merge_gate.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@
44
//tests/integ/snowflake/ml/registry/services:registry_sentence_transformers_model_deployment_test
55
//tests/integ/snowflake/ml/registry/services:registry_huggingface_pipeline_model_deployment_test
66
//tests/integ/snowflake/ml/registry/services:registry_sklearn_model_deployment_test
7-
//tests/integ/snowflake/ml/registry/model:registry_artifact_repository_test
8-
//tests/integ/snowflake/ml/registry/model:registry_target_platforms_test

ci/targets/quarantine/prod3.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
//tests/integ/snowflake/ml/extra_tests:xgboost_external_memory_training_test
22
//tests/integ/snowflake/ml/extra_tests:pipeline_with_ohe_and_xgbr_test
3-
//tests/integ/snowflake/ml/registry/model:registry_artifact_repository_test
4-
//tests/integ/snowflake/ml/registry/model:registry_target_platforms_test

0 commit comments

Comments
 (0)