snowflake-ml-python 1.9.0__py3-none-any.whl → 1.9.2__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/ml/_internal/env_utils.py +44 -3
- snowflake/ml/_internal/platform_capabilities.py +52 -2
- snowflake/ml/_internal/type_utils.py +1 -1
- snowflake/ml/_internal/utils/mixins.py +54 -42
- snowflake/ml/_internal/utils/service_logger.py +105 -3
- snowflake/ml/data/_internal/arrow_ingestor.py +15 -2
- snowflake/ml/data/data_connector.py +13 -2
- snowflake/ml/data/data_ingestor.py +8 -0
- snowflake/ml/data/torch_utils.py +1 -1
- snowflake/ml/dataset/dataset.py +2 -1
- snowflake/ml/dataset/dataset_reader.py +14 -4
- snowflake/ml/experiment/__init__.py +3 -0
- snowflake/ml/experiment/_client/experiment_tracking_sql_client.py +98 -0
- snowflake/ml/experiment/_entities/__init__.py +4 -0
- snowflake/ml/experiment/_entities/experiment.py +10 -0
- snowflake/ml/experiment/_entities/run.py +62 -0
- snowflake/ml/experiment/_entities/run_metadata.py +68 -0
- snowflake/ml/experiment/_experiment_info.py +63 -0
- snowflake/ml/experiment/callback.py +121 -0
- snowflake/ml/experiment/experiment_tracking.py +319 -0
- snowflake/ml/jobs/_utils/constants.py +15 -4
- snowflake/ml/jobs/_utils/payload_utils.py +156 -54
- snowflake/ml/jobs/_utils/query_helper.py +16 -5
- snowflake/ml/jobs/_utils/scripts/constants.py +0 -22
- snowflake/ml/jobs/_utils/scripts/mljob_launcher.py +130 -23
- snowflake/ml/jobs/_utils/spec_utils.py +23 -8
- snowflake/ml/jobs/_utils/stage_utils.py +30 -14
- snowflake/ml/jobs/_utils/types.py +64 -4
- snowflake/ml/jobs/job.py +70 -75
- snowflake/ml/jobs/manager.py +59 -31
- snowflake/ml/lineage/lineage_node.py +2 -2
- snowflake/ml/model/_client/model/model_version_impl.py +16 -4
- snowflake/ml/model/_client/ops/service_ops.py +336 -137
- snowflake/ml/model/_client/service/model_deployment_spec.py +1 -1
- snowflake/ml/model/_client/service/model_deployment_spec_schema.py +1 -1
- snowflake/ml/model/_client/sql/service.py +1 -38
- snowflake/ml/model/_model_composer/model_composer.py +6 -1
- snowflake/ml/model/_model_composer/model_manifest/model_manifest.py +17 -3
- snowflake/ml/model/_model_composer/model_manifest/model_manifest_schema.py +1 -0
- snowflake/ml/model/_packager/model_handlers/huggingface_pipeline.py +41 -2
- snowflake/ml/model/_packager/model_handlers/sklearn.py +9 -5
- snowflake/ml/model/_packager/model_runtime/_snowml_inference_alternative_requirements.py +3 -1
- snowflake/ml/model/_packager/model_runtime/model_runtime.py +3 -3
- snowflake/ml/model/_signatures/pandas_handler.py +3 -0
- snowflake/ml/model/_signatures/utils.py +4 -0
- snowflake/ml/model/event_handler.py +117 -0
- snowflake/ml/model/model_signature.py +11 -9
- snowflake/ml/model/models/huggingface_pipeline.py +170 -1
- snowflake/ml/modeling/framework/base.py +1 -1
- snowflake/ml/modeling/metrics/classification.py +14 -14
- snowflake/ml/modeling/metrics/correlation.py +19 -8
- snowflake/ml/modeling/metrics/ranking.py +6 -6
- snowflake/ml/modeling/metrics/regression.py +9 -9
- snowflake/ml/monitoring/explain_visualize.py +12 -5
- snowflake/ml/registry/_manager/model_manager.py +32 -15
- snowflake/ml/registry/registry.py +48 -80
- snowflake/ml/version.py +1 -1
- {snowflake_ml_python-1.9.0.dist-info → snowflake_ml_python-1.9.2.dist-info}/METADATA +107 -5
- {snowflake_ml_python-1.9.0.dist-info → snowflake_ml_python-1.9.2.dist-info}/RECORD +62 -52
- {snowflake_ml_python-1.9.0.dist-info → snowflake_ml_python-1.9.2.dist-info}/WHEEL +0 -0
- {snowflake_ml_python-1.9.0.dist-info → snowflake_ml_python-1.9.2.dist-info}/licenses/LICENSE.txt +0 -0
- {snowflake_ml_python-1.9.0.dist-info → snowflake_ml_python-1.9.2.dist-info}/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ from typing import TYPE_CHECKING, Literal, Optional, Union
|
|
|
4
4
|
|
|
5
5
|
from snowflake import snowpark
|
|
6
6
|
from snowflake.ml._internal import telemetry
|
|
7
|
-
from snowflake.ml._internal.utils import identifier
|
|
7
|
+
from snowflake.ml._internal.utils import identifier, mixins
|
|
8
8
|
|
|
9
9
|
if TYPE_CHECKING:
|
|
10
10
|
from snowflake.ml import dataset
|
|
@@ -15,7 +15,7 @@ _PROJECT = "LINEAGE"
|
|
|
15
15
|
DOMAIN_LINEAGE_REGISTRY: dict[str, type["LineageNode"]] = {}
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
class LineageNode:
|
|
18
|
+
class LineageNode(mixins.SerializableSessionMixin):
|
|
19
19
|
"""
|
|
20
20
|
Represents a node in a lineage graph and serves as the base class for all machine learning objects.
|
|
21
21
|
"""
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import enum
|
|
2
|
+
import logging
|
|
2
3
|
import pathlib
|
|
3
4
|
import tempfile
|
|
4
5
|
import warnings
|
|
@@ -10,7 +11,7 @@ from snowflake import snowpark
|
|
|
10
11
|
from snowflake.ml._internal import telemetry
|
|
11
12
|
from snowflake.ml._internal.utils import sql_identifier
|
|
12
13
|
from snowflake.ml.lineage import lineage_node
|
|
13
|
-
from snowflake.ml.model import type_hints
|
|
14
|
+
from snowflake.ml.model import task, type_hints
|
|
14
15
|
from snowflake.ml.model._client.ops import metadata_ops, model_ops, service_ops
|
|
15
16
|
from snowflake.ml.model._model_composer import model_composer
|
|
16
17
|
from snowflake.ml.model._model_composer.model_manifest import model_manifest_schema
|
|
@@ -401,7 +402,7 @@ class ModelVersion(lineage_node.LineageNode):
|
|
|
401
402
|
project=_TELEMETRY_PROJECT,
|
|
402
403
|
subproject=_TELEMETRY_SUBPROJECT,
|
|
403
404
|
)
|
|
404
|
-
def get_model_task(self) ->
|
|
405
|
+
def get_model_task(self) -> task.Task:
|
|
405
406
|
statement_params = telemetry.get_statement_params(
|
|
406
407
|
project=_TELEMETRY_PROJECT,
|
|
407
408
|
subproject=_TELEMETRY_SUBPROJECT,
|
|
@@ -607,8 +608,8 @@ class ModelVersion(lineage_node.LineageNode):
|
|
|
607
608
|
self,
|
|
608
609
|
*,
|
|
609
610
|
force: bool = False,
|
|
610
|
-
options: Optional[
|
|
611
|
-
) ->
|
|
611
|
+
options: Optional[type_hints.ModelLoadOption] = None,
|
|
612
|
+
) -> type_hints.SupportedModelType:
|
|
612
613
|
"""Load the underlying original Python object back from a model.
|
|
613
614
|
This operation requires to have the exact the same environment as the one when logging the model, otherwise,
|
|
614
615
|
the model might be not functional or some other problems might occur.
|
|
@@ -889,6 +890,17 @@ class ModelVersion(lineage_node.LineageNode):
|
|
|
889
890
|
project=_TELEMETRY_PROJECT,
|
|
890
891
|
subproject=_TELEMETRY_SUBPROJECT,
|
|
891
892
|
)
|
|
893
|
+
|
|
894
|
+
# Check root logger level and emit warning if needed
|
|
895
|
+
root_logger = logging.getLogger()
|
|
896
|
+
if root_logger.level in (logging.WARNING, logging.ERROR):
|
|
897
|
+
warnings.warn(
|
|
898
|
+
"Suppressing service logs. Set the log level to INFO if you would like "
|
|
899
|
+
"verbose service logs (e.g., logging.getLogger().setLevel(logging.INFO)).",
|
|
900
|
+
UserWarning,
|
|
901
|
+
stacklevel=2,
|
|
902
|
+
)
|
|
903
|
+
|
|
892
904
|
if build_external_access_integration is not None:
|
|
893
905
|
msg = (
|
|
894
906
|
"`build_external_access_integration` is deprecated. "
|