snowflake-ml-python 1.21.0__py3-none-any.whl → 1.22.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/ml/_internal/utils/url.py +42 -0
- snowflake/ml/experiment/callback/__init__.py +0 -0
- snowflake/ml/jobs/_utils/constants.py +1 -0
- snowflake/ml/jobs/_utils/spec_utils.py +0 -31
- snowflake/ml/lineage/lineage_node.py +1 -1
- snowflake/ml/model/__init__.py +6 -0
- snowflake/ml/model/_client/model/batch_inference_specs.py +16 -1
- snowflake/ml/model/_client/model/model_version_impl.py +63 -0
- snowflake/ml/model/_client/ops/deployment_step.py +36 -0
- snowflake/ml/model/_client/ops/model_ops.py +61 -2
- snowflake/ml/model/_client/ops/service_ops.py +23 -48
- snowflake/ml/model/_client/service/import_model_spec_schema.py +23 -0
- snowflake/ml/model/_client/service/model_deployment_spec.py +12 -4
- snowflake/ml/model/_client/service/model_deployment_spec_schema.py +3 -0
- snowflake/ml/model/_client/sql/model_version.py +30 -6
- snowflake/ml/model/_client/sql/service.py +26 -4
- snowflake/ml/model/_model_composer/model_composer.py +1 -1
- snowflake/ml/model/_model_composer/model_manifest/model_manifest_schema.py +5 -0
- snowflake/ml/model/_model_composer/model_method/model_method.py +61 -2
- snowflake/ml/model/_packager/model_handlers/custom.py +52 -0
- snowflake/ml/model/_packager/model_handlers/xgboost.py +26 -1
- snowflake/ml/model/_packager/model_meta/model_meta.py +40 -7
- snowflake/ml/model/_packager/model_packager.py +1 -1
- snowflake/ml/model/_signatures/core.py +85 -0
- snowflake/ml/model/code_path.py +104 -0
- snowflake/ml/model/custom_model.py +55 -13
- snowflake/ml/model/model_signature.py +13 -1
- snowflake/ml/model/type_hints.py +2 -0
- snowflake/ml/registry/_manager/model_manager.py +230 -15
- snowflake/ml/registry/registry.py +4 -4
- snowflake/ml/version.py +1 -1
- {snowflake_ml_python-1.21.0.dist-info → snowflake_ml_python-1.22.0.dist-info}/METADATA +29 -1
- {snowflake_ml_python-1.21.0.dist-info → snowflake_ml_python-1.22.0.dist-info}/RECORD +36 -32
- snowflake/ml/jobs/_utils/runtime_env_utils.py +0 -63
- {snowflake_ml_python-1.21.0.dist-info → snowflake_ml_python-1.22.0.dist-info}/WHEEL +0 -0
- {snowflake_ml_python-1.21.0.dist-info → snowflake_ml_python-1.22.0.dist-info}/licenses/LICENSE.txt +0 -0
- {snowflake_ml_python-1.21.0.dist-info → snowflake_ml_python-1.22.0.dist-info}/top_level.txt +0 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import json
|
|
1
2
|
import logging
|
|
2
3
|
from types import ModuleType
|
|
3
4
|
from typing import TYPE_CHECKING, Any, Optional, Union
|
|
4
5
|
|
|
5
6
|
import pandas as pd
|
|
7
|
+
import yaml
|
|
6
8
|
|
|
7
9
|
from snowflake.ml._internal import platform_capabilities, telemetry
|
|
8
10
|
from snowflake.ml._internal.exceptions import error_codes, exceptions
|
|
@@ -11,8 +13,13 @@ from snowflake.ml._internal.utils import sql_identifier
|
|
|
11
13
|
from snowflake.ml.model import model_signature, task, type_hints
|
|
12
14
|
from snowflake.ml.model._client.model import model_impl, model_version_impl
|
|
13
15
|
from snowflake.ml.model._client.ops import metadata_ops, model_ops, service_ops
|
|
16
|
+
from snowflake.ml.model._client.service import (
|
|
17
|
+
import_model_spec_schema,
|
|
18
|
+
model_deployment_spec_schema,
|
|
19
|
+
)
|
|
14
20
|
from snowflake.ml.model._model_composer import model_composer
|
|
15
21
|
from snowflake.ml.model._packager.model_meta import model_meta
|
|
22
|
+
from snowflake.ml.model.models import huggingface
|
|
16
23
|
from snowflake.ml.registry._manager import model_parameter_reconciler
|
|
17
24
|
from snowflake.snowpark import exceptions as snowpark_exceptions, session
|
|
18
25
|
from snowflake.snowpark._internal import utils as snowpark_utils
|
|
@@ -59,7 +66,7 @@ class ModelManager:
|
|
|
59
66
|
signatures: Optional[dict[str, model_signature.ModelSignature]] = None,
|
|
60
67
|
sample_input_data: Optional[type_hints.SupportedDataType] = None,
|
|
61
68
|
user_files: Optional[dict[str, list[str]]] = None,
|
|
62
|
-
code_paths: Optional[list[
|
|
69
|
+
code_paths: Optional[list[type_hints.CodePathLike]] = None,
|
|
63
70
|
ext_modules: Optional[list[ModuleType]] = None,
|
|
64
71
|
task: type_hints.Task = task.Task.UNKNOWN,
|
|
65
72
|
experiment_info: Optional["ExperimentInfo"] = None,
|
|
@@ -170,7 +177,7 @@ class ModelManager:
|
|
|
170
177
|
signatures: Optional[dict[str, model_signature.ModelSignature]] = None,
|
|
171
178
|
sample_input_data: Optional[type_hints.SupportedDataType] = None,
|
|
172
179
|
user_files: Optional[dict[str, list[str]]] = None,
|
|
173
|
-
code_paths: Optional[list[
|
|
180
|
+
code_paths: Optional[list[type_hints.CodePathLike]] = None,
|
|
174
181
|
ext_modules: Optional[list[ModuleType]] = None,
|
|
175
182
|
task: type_hints.Task = task.Task.UNKNOWN,
|
|
176
183
|
experiment_info: Optional["ExperimentInfo"] = None,
|
|
@@ -180,6 +187,31 @@ class ModelManager:
|
|
|
180
187
|
database_name_id, schema_name_id, model_name_id = sql_identifier.parse_fully_qualified_name(model_name)
|
|
181
188
|
version_name_id = sql_identifier.SqlIdentifier(version_name)
|
|
182
189
|
|
|
190
|
+
# Check if model is HuggingFace TransformersPipeline with no repo_snapshot_dir
|
|
191
|
+
# If so, use remote logging via SYSTEM$IMPORT_MODEL
|
|
192
|
+
if (
|
|
193
|
+
isinstance(model, huggingface.TransformersPipeline)
|
|
194
|
+
and model.compute_pool_for_log is not None
|
|
195
|
+
and (not hasattr(model, "repo_snapshot_dir") or model.repo_snapshot_dir is None)
|
|
196
|
+
):
|
|
197
|
+
logger.info("HuggingFace model has compute_pool_for_log, using remote logging")
|
|
198
|
+
return self._remote_log_huggingface_model(
|
|
199
|
+
model=model,
|
|
200
|
+
model_name=model_name,
|
|
201
|
+
version_name=version_name,
|
|
202
|
+
database_name_id=database_name_id,
|
|
203
|
+
schema_name_id=schema_name_id,
|
|
204
|
+
model_name_id=model_name_id,
|
|
205
|
+
version_name_id=version_name_id,
|
|
206
|
+
comment=comment,
|
|
207
|
+
conda_dependencies=conda_dependencies,
|
|
208
|
+
pip_requirements=pip_requirements,
|
|
209
|
+
target_platforms=target_platforms,
|
|
210
|
+
options=options,
|
|
211
|
+
statement_params=statement_params,
|
|
212
|
+
progress_status=progress_status,
|
|
213
|
+
)
|
|
214
|
+
|
|
183
215
|
# TODO(SNOW-2091317): Remove this when the snowpark enables file PUT operation for snowurls
|
|
184
216
|
use_live_commit = (
|
|
185
217
|
not snowpark_utils.is_in_stored_procedure() # type: ignore[no-untyped-call]
|
|
@@ -298,19 +330,11 @@ class ModelManager:
|
|
|
298
330
|
use_live_commit=use_live_commit,
|
|
299
331
|
)
|
|
300
332
|
|
|
301
|
-
mv =
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
),
|
|
307
|
-
service_ops=service_ops.ServiceOperator(
|
|
308
|
-
self._service_ops._session,
|
|
309
|
-
database_name=database_name_id or self._database_name,
|
|
310
|
-
schema_name=schema_name_id or self._schema_name,
|
|
311
|
-
),
|
|
312
|
-
model_name=model_name_id,
|
|
313
|
-
version_name=version_name_id,
|
|
333
|
+
mv = self._create_model_version_ref(
|
|
334
|
+
database_name_id=database_name_id,
|
|
335
|
+
schema_name_id=schema_name_id,
|
|
336
|
+
model_name_id=model_name_id,
|
|
337
|
+
version_name_id=version_name_id,
|
|
314
338
|
)
|
|
315
339
|
|
|
316
340
|
progress_status.update("setting model metadata...")
|
|
@@ -333,6 +357,73 @@ class ModelManager:
|
|
|
333
357
|
|
|
334
358
|
return mv
|
|
335
359
|
|
|
360
|
+
def _remote_log_huggingface_model(
|
|
361
|
+
self,
|
|
362
|
+
model: huggingface.TransformersPipeline,
|
|
363
|
+
model_name: str,
|
|
364
|
+
version_name: str,
|
|
365
|
+
database_name_id: Optional[sql_identifier.SqlIdentifier],
|
|
366
|
+
schema_name_id: Optional[sql_identifier.SqlIdentifier],
|
|
367
|
+
model_name_id: sql_identifier.SqlIdentifier,
|
|
368
|
+
version_name_id: sql_identifier.SqlIdentifier,
|
|
369
|
+
comment: Optional[str],
|
|
370
|
+
conda_dependencies: Optional[list[str]],
|
|
371
|
+
pip_requirements: Optional[list[str]],
|
|
372
|
+
target_platforms: Optional[list[type_hints.SupportedTargetPlatformType]],
|
|
373
|
+
options: Optional[type_hints.ModelSaveOption],
|
|
374
|
+
statement_params: Optional[dict[str, Any]],
|
|
375
|
+
progress_status: type_hints.ProgressStatus,
|
|
376
|
+
) -> model_version_impl.ModelVersion:
|
|
377
|
+
"""Log HuggingFace model remotely using SYSTEM$IMPORT_MODEL."""
|
|
378
|
+
if not isinstance(model, huggingface.TransformersPipeline):
|
|
379
|
+
raise ValueError(
|
|
380
|
+
f"Model must be a TransformersPipeline object. The provided model is a {type(model)} object"
|
|
381
|
+
)
|
|
382
|
+
progress_status.update("preparing remote model logging...")
|
|
383
|
+
progress_status.increment()
|
|
384
|
+
|
|
385
|
+
# Get compute pool from options or use default
|
|
386
|
+
compute_pool = model.compute_pool_for_log
|
|
387
|
+
if compute_pool is None:
|
|
388
|
+
raise ValueError("compute_pool_for_log is required for remote logging")
|
|
389
|
+
|
|
390
|
+
# Construct fully qualified model name
|
|
391
|
+
db_name = database_name_id.identifier() if database_name_id else self._database_name.identifier()
|
|
392
|
+
schema_name = schema_name_id.identifier() if schema_name_id else self._schema_name.identifier()
|
|
393
|
+
fq_model_name = f"{db_name}.{schema_name}.{model_name_id.identifier()}"
|
|
394
|
+
|
|
395
|
+
# Build YAML spec for import model
|
|
396
|
+
yaml_content = self._build_import_model_yaml_spec(
|
|
397
|
+
model=model,
|
|
398
|
+
fq_model_name=fq_model_name,
|
|
399
|
+
version_name=version_name,
|
|
400
|
+
compute_pool=compute_pool,
|
|
401
|
+
comment=comment,
|
|
402
|
+
conda_dependencies=conda_dependencies,
|
|
403
|
+
pip_requirements=pip_requirements,
|
|
404
|
+
target_platforms=target_platforms,
|
|
405
|
+
)
|
|
406
|
+
|
|
407
|
+
progress_status.update("Remotely logging the model...")
|
|
408
|
+
progress_status.increment()
|
|
409
|
+
|
|
410
|
+
self._model_ops.run_import_model_query(
|
|
411
|
+
database_name=db_name,
|
|
412
|
+
schema_name=schema_name,
|
|
413
|
+
yaml_content=yaml_content,
|
|
414
|
+
statement_params=statement_params,
|
|
415
|
+
)
|
|
416
|
+
progress_status.update("Remotely logged the model")
|
|
417
|
+
progress_status.increment()
|
|
418
|
+
|
|
419
|
+
# Return ModelVersion object
|
|
420
|
+
return self._create_model_version_ref(
|
|
421
|
+
database_name_id=database_name_id,
|
|
422
|
+
schema_name_id=schema_name_id,
|
|
423
|
+
model_name_id=model_name_id,
|
|
424
|
+
version_name_id=version_name_id,
|
|
425
|
+
)
|
|
426
|
+
|
|
336
427
|
def get_model(
|
|
337
428
|
self,
|
|
338
429
|
model_name: str,
|
|
@@ -408,6 +499,130 @@ class ModelManager:
|
|
|
408
499
|
statement_params=statement_params,
|
|
409
500
|
)
|
|
410
501
|
|
|
502
|
+
def _create_model_version_ref(
|
|
503
|
+
self,
|
|
504
|
+
database_name_id: Optional[sql_identifier.SqlIdentifier],
|
|
505
|
+
schema_name_id: Optional[sql_identifier.SqlIdentifier],
|
|
506
|
+
model_name_id: sql_identifier.SqlIdentifier,
|
|
507
|
+
version_name_id: sql_identifier.SqlIdentifier,
|
|
508
|
+
) -> model_version_impl.ModelVersion:
|
|
509
|
+
"""Create a ModelVersion reference object.
|
|
510
|
+
|
|
511
|
+
Args:
|
|
512
|
+
database_name_id: Database name identifier, falls back to instance database if None.
|
|
513
|
+
schema_name_id: Schema name identifier, falls back to instance schema if None.
|
|
514
|
+
model_name_id: Model name identifier.
|
|
515
|
+
version_name_id: Version name identifier.
|
|
516
|
+
|
|
517
|
+
Returns:
|
|
518
|
+
ModelVersion reference object.
|
|
519
|
+
"""
|
|
520
|
+
return model_version_impl.ModelVersion._ref(
|
|
521
|
+
model_ops=model_ops.ModelOperator(
|
|
522
|
+
self._model_ops._session,
|
|
523
|
+
database_name=database_name_id or self._database_name,
|
|
524
|
+
schema_name=schema_name_id or self._schema_name,
|
|
525
|
+
),
|
|
526
|
+
service_ops=service_ops.ServiceOperator(
|
|
527
|
+
self._service_ops._session,
|
|
528
|
+
database_name=database_name_id or self._database_name,
|
|
529
|
+
schema_name=schema_name_id or self._schema_name,
|
|
530
|
+
),
|
|
531
|
+
model_name=model_name_id,
|
|
532
|
+
version_name=version_name_id,
|
|
533
|
+
)
|
|
534
|
+
|
|
535
|
+
def _build_import_model_yaml_spec(
|
|
536
|
+
self,
|
|
537
|
+
model: huggingface.TransformersPipeline,
|
|
538
|
+
fq_model_name: str,
|
|
539
|
+
version_name: str,
|
|
540
|
+
compute_pool: str,
|
|
541
|
+
comment: Optional[str],
|
|
542
|
+
conda_dependencies: Optional[list[str]],
|
|
543
|
+
pip_requirements: Optional[list[str]],
|
|
544
|
+
target_platforms: Optional[list[type_hints.SupportedTargetPlatformType]],
|
|
545
|
+
) -> str:
|
|
546
|
+
"""Build YAML spec for SYSTEM$IMPORT_MODEL.
|
|
547
|
+
|
|
548
|
+
Args:
|
|
549
|
+
model: HuggingFace TransformersPipeline model.
|
|
550
|
+
fq_model_name: Fully qualified model name.
|
|
551
|
+
version_name: Model version name.
|
|
552
|
+
compute_pool: Compute pool name.
|
|
553
|
+
comment: Optional comment for the model.
|
|
554
|
+
conda_dependencies: Optional conda dependencies.
|
|
555
|
+
pip_requirements: Optional pip requirements.
|
|
556
|
+
target_platforms: Optional target platforms.
|
|
557
|
+
|
|
558
|
+
Returns:
|
|
559
|
+
YAML string representing the import model spec.
|
|
560
|
+
"""
|
|
561
|
+
# Convert target_platforms to list of strings
|
|
562
|
+
target_platforms_list = self._convert_target_platforms_to_list(target_platforms)
|
|
563
|
+
|
|
564
|
+
# Build HuggingFaceModel spec
|
|
565
|
+
hf_model = model_deployment_spec_schema.HuggingFaceModel(
|
|
566
|
+
hf_model_name=model.model,
|
|
567
|
+
task=model.task,
|
|
568
|
+
tokenizer=getattr(model, "tokenizer", None),
|
|
569
|
+
token_secret_object=model.secret_identifier,
|
|
570
|
+
trust_remote_code=model.trust_remote_code if model.trust_remote_code is not None else False,
|
|
571
|
+
revision=model.revision,
|
|
572
|
+
hf_model_kwargs=json.dumps(model.model_kwargs) if model.model_kwargs else "{}",
|
|
573
|
+
)
|
|
574
|
+
|
|
575
|
+
# Build LogModelArgs
|
|
576
|
+
log_model_args = model_deployment_spec_schema.LogModelArgs(
|
|
577
|
+
pip_requirements=pip_requirements,
|
|
578
|
+
conda_dependencies=conda_dependencies,
|
|
579
|
+
target_platforms=target_platforms_list,
|
|
580
|
+
comment=comment,
|
|
581
|
+
)
|
|
582
|
+
|
|
583
|
+
# Build ModelSpec
|
|
584
|
+
model_spec = import_model_spec_schema.ModelSpec(
|
|
585
|
+
name=import_model_spec_schema.ModelName(
|
|
586
|
+
model_name=fq_model_name,
|
|
587
|
+
version_name=version_name,
|
|
588
|
+
),
|
|
589
|
+
hf_model=hf_model,
|
|
590
|
+
log_model_args=log_model_args,
|
|
591
|
+
)
|
|
592
|
+
|
|
593
|
+
# Build ImportModelSpec
|
|
594
|
+
import_spec = import_model_spec_schema.ImportModelSpec(
|
|
595
|
+
compute_pool=compute_pool,
|
|
596
|
+
models=[model_spec],
|
|
597
|
+
)
|
|
598
|
+
|
|
599
|
+
# Convert to YAML
|
|
600
|
+
return yaml.safe_dump(import_spec.model_dump(exclude_none=True))
|
|
601
|
+
|
|
602
|
+
def _convert_target_platforms_to_list(
|
|
603
|
+
self, target_platforms: Optional[list[type_hints.SupportedTargetPlatformType]]
|
|
604
|
+
) -> Optional[list[str]]:
|
|
605
|
+
"""Convert target_platforms to list of strings.
|
|
606
|
+
|
|
607
|
+
Args:
|
|
608
|
+
target_platforms: List of target platforms (enums or strings).
|
|
609
|
+
|
|
610
|
+
Returns:
|
|
611
|
+
List of platform strings, or None if input is None.
|
|
612
|
+
"""
|
|
613
|
+
if not target_platforms:
|
|
614
|
+
return None
|
|
615
|
+
|
|
616
|
+
target_platforms_list = []
|
|
617
|
+
for tp in target_platforms:
|
|
618
|
+
if hasattr(tp, "value"):
|
|
619
|
+
# It's an enum, get the value
|
|
620
|
+
target_platforms_list.append(tp.value)
|
|
621
|
+
else:
|
|
622
|
+
# It's already a string
|
|
623
|
+
target_platforms_list.append(str(tp))
|
|
624
|
+
return target_platforms_list
|
|
625
|
+
|
|
411
626
|
def _parse_fully_qualified_name(
|
|
412
627
|
self, model_name: str
|
|
413
628
|
) -> tuple[
|
|
@@ -146,7 +146,7 @@ class Registry:
|
|
|
146
146
|
signatures: Optional[dict[str, model_signature.ModelSignature]] = None,
|
|
147
147
|
sample_input_data: Optional[type_hints.SupportedDataType] = None,
|
|
148
148
|
user_files: Optional[dict[str, list[str]]] = None,
|
|
149
|
-
code_paths: Optional[list[
|
|
149
|
+
code_paths: Optional[list[type_hints.CodePathLike]] = None,
|
|
150
150
|
ext_modules: Optional[list[ModuleType]] = None,
|
|
151
151
|
task: task.Task = task.Task.UNKNOWN,
|
|
152
152
|
options: Optional[type_hints.ModelSaveOption] = None,
|
|
@@ -200,7 +200,7 @@ class Registry:
|
|
|
200
200
|
It would also be used as background data in explanation and to capture data lineage. Defaults to None.
|
|
201
201
|
user_files: Dictionary where the keys are subdirectories, and values are lists of local file name
|
|
202
202
|
strings. The local file name strings can include wildcards (? or *) for matching multiple files.
|
|
203
|
-
code_paths: List of directories containing code to import. Defaults to None.
|
|
203
|
+
code_paths: List of directories or CodePath objects containing code to import. Defaults to None.
|
|
204
204
|
ext_modules: List of external modules to pickle with the model object.
|
|
205
205
|
Only supported when logging the following types of model:
|
|
206
206
|
Scikit-learn, Snowpark ML, PyTorch, TorchScript and Custom Model. Defaults to None.
|
|
@@ -298,7 +298,7 @@ class Registry:
|
|
|
298
298
|
signatures: Optional[dict[str, model_signature.ModelSignature]] = None,
|
|
299
299
|
sample_input_data: Optional[type_hints.SupportedDataType] = None,
|
|
300
300
|
user_files: Optional[dict[str, list[str]]] = None,
|
|
301
|
-
code_paths: Optional[list[
|
|
301
|
+
code_paths: Optional[list[type_hints.CodePathLike]] = None,
|
|
302
302
|
ext_modules: Optional[list[ModuleType]] = None,
|
|
303
303
|
task: task.Task = task.Task.UNKNOWN,
|
|
304
304
|
options: Optional[type_hints.ModelSaveOption] = None,
|
|
@@ -352,7 +352,7 @@ class Registry:
|
|
|
352
352
|
It would also be used as background data in explanation and to capture data lineage. Defaults to None.
|
|
353
353
|
user_files: Dictionary where the keys are subdirectories, and values are lists of local file name
|
|
354
354
|
strings. The local file name strings can include wildcards (? or *) for matching multiple files.
|
|
355
|
-
code_paths: List of directories containing code to import. Defaults to None.
|
|
355
|
+
code_paths: List of directories or CodePath objects containing code to import. Defaults to None.
|
|
356
356
|
ext_modules: List of external modules to pickle with the model object.
|
|
357
357
|
Only supported when logging the following types of model:
|
|
358
358
|
Scikit-learn, Snowpark ML, PyTorch, TorchScript and Custom Model. Defaults to None.
|
snowflake/ml/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# This is parsed by regex in conda recipe meta file. Make sure not to break it.
|
|
2
|
-
VERSION = "1.
|
|
2
|
+
VERSION = "1.22.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: snowflake-ml-python
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.22.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:
|
|
@@ -417,6 +417,34 @@ NOTE: Version 1.7.0 is used as example here. Please choose the the latest versio
|
|
|
417
417
|
|
|
418
418
|
# Release History
|
|
419
419
|
|
|
420
|
+
## 1.22.0
|
|
421
|
+
|
|
422
|
+
### New Features
|
|
423
|
+
|
|
424
|
+
* Registry: Introducing remotely logging a transformer pipeline model using SPCS job.
|
|
425
|
+
|
|
426
|
+
```python
|
|
427
|
+
# create reference of the model
|
|
428
|
+
model = huggingface.TransformersPipeline(
|
|
429
|
+
model="TinyLlama/TinyLlama-1.1B-Chat-v1.0",
|
|
430
|
+
task="text-generation",
|
|
431
|
+
)
|
|
432
|
+
|
|
433
|
+
# Remotely log the model, a SPCS job will run async and log the model
|
|
434
|
+
mv = registry.log_model(
|
|
435
|
+
model=model,
|
|
436
|
+
model_name="tinyllama_remote_log",
|
|
437
|
+
target_platforms=["SNOWPARK_CONTAINER_SERVICES"],
|
|
438
|
+
signatures=openai_signatures.OPENAI_CHAT_SIGNATURE,
|
|
439
|
+
)
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
### Bug Fixes
|
|
443
|
+
|
|
444
|
+
### Behavior Changes
|
|
445
|
+
|
|
446
|
+
### Deprecations
|
|
447
|
+
|
|
420
448
|
## 1.21.0
|
|
421
449
|
|
|
422
450
|
### New Features
|
|
@@ -10,7 +10,7 @@ snowflake/cortex/_sse_client.py,sha256=sLYgqAfTOPADCnaWH2RWAJi8KbU_7gSRsTUDcDD5T
|
|
|
10
10
|
snowflake/cortex/_summarize.py,sha256=7GH8zqfIdOiHA5w4b6EvJEKEWhaTrL4YA6iDGbn7BNM,1307
|
|
11
11
|
snowflake/cortex/_translate.py,sha256=9ZGjvAnJFisbzJ_bXnt4pyug5UzhHJRXW8AhGQEersM,1652
|
|
12
12
|
snowflake/cortex/_util.py,sha256=krNTpbkFLXwdFqy1bd0xi7ZmOzOHRnIfHdQCPiLZJxk,3288
|
|
13
|
-
snowflake/ml/version.py,sha256=
|
|
13
|
+
snowflake/ml/version.py,sha256=_JcB9jxPpN07nlKMJK54-i2xkicKgy6P-gyd_SPnpZA,99
|
|
14
14
|
snowflake/ml/_internal/env.py,sha256=EY_2KVe8oR3LgKWdaeRb5rRU-NDNXJppPDsFJmMZUUY,265
|
|
15
15
|
snowflake/ml/_internal/env_utils.py,sha256=Xx03pV_qEIVJJY--J3ZmnqK9Ugf0Os3O2vrF8xOyq_c,31500
|
|
16
16
|
snowflake/ml/_internal/file_utils.py,sha256=7sA6loOeSfmGP4yx16P4usT9ZtRqG3ycnXu7_Tk7dOs,14206
|
|
@@ -51,6 +51,7 @@ snowflake/ml/_internal/utils/snowpark_dataframe_utils.py,sha256=tm2leAu_oDTNUQZJ
|
|
|
51
51
|
snowflake/ml/_internal/utils/sql_identifier.py,sha256=YHIwXpb8E1U6LVUVpT8q7s9ZygONAXKPVMD4IucwXx8,4669
|
|
52
52
|
snowflake/ml/_internal/utils/table_manager.py,sha256=Wf3JXLUzdCiffKF9PJj7edHY7usCXNNZf1P0jRWff-E,4963
|
|
53
53
|
snowflake/ml/_internal/utils/temp_file_utils.py,sha256=eHyyvxHfj4Z3FIS6VWgNyw5bFjNi5cSGYmY1hzyqzwY,1534
|
|
54
|
+
snowflake/ml/_internal/utils/url.py,sha256=V3Y5zwNhJouy_cyLTa2rogg5nQZ-Ag-7Rmq-qPPEjmg,1219
|
|
54
55
|
snowflake/ml/data/__init__.py,sha256=nm5VhN98Lzxr4kb679kglQfqbDbHhd9zYsnFJiQiThg,351
|
|
55
56
|
snowflake/ml/data/data_connector.py,sha256=ZAgnXWEmOjR_3tremS2gNgLen7Rzrt1Z3ZtkXJrZtCo,14154
|
|
56
57
|
snowflake/ml/data/data_ingestor.py,sha256=0TFc8qo4TZwdHMaBUBTZ7T8kkZfLGVmStvEx9KrXPHU,1165
|
|
@@ -73,6 +74,7 @@ snowflake/ml/experiment/_entities/__init__.py,sha256=11XxkvAzosydf5owNmMzLwXZdQ2
|
|
|
73
74
|
snowflake/ml/experiment/_entities/experiment.py,sha256=lKmQj59K8fGDWVwRqeIesxorrChb-m78vX_WUmI7PV0,225
|
|
74
75
|
snowflake/ml/experiment/_entities/run.py,sha256=6_R35nI24PzIWMrwPKDif5ZINAAE6J0R7p4UmlT-m4o,2251
|
|
75
76
|
snowflake/ml/experiment/_entities/run_metadata.py,sha256=25cIg8FnAYHk5SoTg_StzL10_BkomL7xrhMmWxUTU8E,366
|
|
77
|
+
snowflake/ml/experiment/callback/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
76
78
|
snowflake/ml/experiment/callback/keras.py,sha256=2kNYVWJjBKn9i2pioiGthLNjclNdSHn-6xHm6tlDc4E,4122
|
|
77
79
|
snowflake/ml/experiment/callback/lightgbm.py,sha256=dftlOMT9Wxo-XPaSvgbMh5IwVfQEskz4Ev4jd4G3_ns,4249
|
|
78
80
|
snowflake/ml/experiment/callback/xgboost.py,sha256=VLO3uW0Pot1b4nRaoi8tjLtDt3hrkTV0_6cqja3SqZQ,4197
|
|
@@ -121,13 +123,12 @@ snowflake/ml/jobs/_interop/protocols.py,sha256=I-RGWUDUc_FsKsq_mtczO7n93O_IzUvmE
|
|
|
121
123
|
snowflake/ml/jobs/_interop/results.py,sha256=nQ07XJ1BZEkPB4xa12pbGyaKqR8sWCoSzx0IKQlub4w,1714
|
|
122
124
|
snowflake/ml/jobs/_interop/utils.py,sha256=TWFkUcAYmb-fpTwEL8idkk3XxlZ8vLz4X_gyS78PSi4,5552
|
|
123
125
|
snowflake/ml/jobs/_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
124
|
-
snowflake/ml/jobs/_utils/constants.py,sha256=
|
|
126
|
+
snowflake/ml/jobs/_utils/constants.py,sha256=vANNraDqsZkyhQ3lYQJnFx6NligKUdAaj2qMNRZpTEA,4645
|
|
125
127
|
snowflake/ml/jobs/_utils/feature_flags.py,sha256=dLWBVIjyB2vsa4Vtm7Yhty6DOi8Nn73_YSjuYf73Y7A,1669
|
|
126
128
|
snowflake/ml/jobs/_utils/function_payload_utils.py,sha256=4LBaStMdhRxcqwRkwFje-WwiEKRWnBfkaOYouF3N3Kg,1308
|
|
127
129
|
snowflake/ml/jobs/_utils/payload_utils.py,sha256=ga7VbdiufuStLHn1_4xIOIhJtWrrE9-yMEZxsLDQ36A,33279
|
|
128
130
|
snowflake/ml/jobs/_utils/query_helper.py,sha256=1-XK-y4iukbR1693qAELprRbHmJDM4YoEBHov8IYbHU,1115
|
|
129
|
-
snowflake/ml/jobs/_utils/
|
|
130
|
-
snowflake/ml/jobs/_utils/spec_utils.py,sha256=xPkrlQlU015S_Hv8eL3IOA2XnIHOMrhH2iRAkohZZIM,2036
|
|
131
|
+
snowflake/ml/jobs/_utils/spec_utils.py,sha256=eC24LFiHtHQiswrZy7m94jixIInJFXNZ_-Km-xr9NJg,871
|
|
131
132
|
snowflake/ml/jobs/_utils/stage_utils.py,sha256=_eLdp9YTslkq6F7K-3K6WVBsMWtm6E6p3fJG1UFk3wQ,5890
|
|
132
133
|
snowflake/ml/jobs/_utils/types.py,sha256=__wwHJmdp9CvEI2HmosRJ4DxeZAkVDQ37D9ImCavvng,2579
|
|
133
134
|
snowflake/ml/jobs/_utils/scripts/constants.py,sha256=YyIWZqQPYOTtgCY6SfyJjk2A98I5RQVmrOuLtET5Pqg,173
|
|
@@ -138,51 +139,54 @@ snowflake/ml/jobs/_utils/scripts/start_mlruntime.sh,sha256=EIhhpEeu1Ph3J-QsAvugk
|
|
|
138
139
|
snowflake/ml/jobs/_utils/scripts/startup.sh,sha256=OwJjQczoNwqf6v2vq6MeChNoa79NHfLeZG8VngRQMvQ,4148
|
|
139
140
|
snowflake/ml/jobs/_utils/scripts/worker_shutdown_listener.py,sha256=SeJ8v5XDriwHAjIGpcQkwVP-f-lO9QIdVjVD7Fkgafs,7893
|
|
140
141
|
snowflake/ml/lineage/__init__.py,sha256=8p1YGynC-qOxAZ8jZX2z84Reg5bv1NoJMoJmNJCrzI4,65
|
|
141
|
-
snowflake/ml/lineage/lineage_node.py,sha256=
|
|
142
|
-
snowflake/ml/model/__init__.py,sha256=
|
|
142
|
+
snowflake/ml/lineage/lineage_node.py,sha256=kL3b8VXhhpwnDl1r7UT27QEJkXEoSIavBGG-_3BE8t8,5775
|
|
143
|
+
snowflake/ml/model/__init__.py,sha256=gTZ_w-c57d1VrlxBXBGGt2384xenmQ193-xF8x6Vfz4,1172
|
|
144
|
+
snowflake/ml/model/code_path.py,sha256=erQhLkW6EY8V8FqDBBCFgMr4iImfMH0G6Mvw1cbDwws,4352
|
|
143
145
|
snowflake/ml/model/compute_pool.py,sha256=a54DQ3VRnOU0tSc8_IBwADLOKJMxyqe5R1jlKxnMMvs,106
|
|
144
|
-
snowflake/ml/model/custom_model.py,sha256=
|
|
146
|
+
snowflake/ml/model/custom_model.py,sha256=sdyKhT-QNNtTeu3idu6BExZNVyjUD4YTU8cru3iy4AY,14184
|
|
145
147
|
snowflake/ml/model/event_handler.py,sha256=pojleQVM9TPNeDvliTvon2Sfxqbf2WWxrOebo1SaEHo,7211
|
|
146
148
|
snowflake/ml/model/inference_engine.py,sha256=L0nwySY2Qwp3JzuRpPS87r0--m3HTUNUgZXYyOPJjyk,66
|
|
147
|
-
snowflake/ml/model/model_signature.py,sha256=
|
|
149
|
+
snowflake/ml/model/model_signature.py,sha256=ae1tkh3Rw9MzJSxmVT9kb0PwD3TANtKbWwp6b8-cItE,32847
|
|
148
150
|
snowflake/ml/model/openai_signatures.py,sha256=ZVnHDgaOA6RcvtSP3HIbHVgr3scJH2gG_9QvZidn41g,2630
|
|
149
151
|
snowflake/ml/model/target_platform.py,sha256=H5d-wtuKQyVlq9x33vPtYZAlR5ka0ytcKRYgwlKl0bQ,390
|
|
150
152
|
snowflake/ml/model/task.py,sha256=Zp5JaLB-YfX5p_HSaw81P3J7UnycQq5EMa87A35VOaQ,286
|
|
151
|
-
snowflake/ml/model/type_hints.py,sha256=
|
|
153
|
+
snowflake/ml/model/type_hints.py,sha256=Xxa6b9ezbvXYvSIN5R4Zv6Dro4ZH74-eW4cno92VTJE,11475
|
|
152
154
|
snowflake/ml/model/volatility.py,sha256=qu-wqe9oKkRwXwE2qkKygxTWzUypQYEk3UjsqOGRl_I,1144
|
|
153
|
-
snowflake/ml/model/_client/model/batch_inference_specs.py,sha256=
|
|
155
|
+
snowflake/ml/model/_client/model/batch_inference_specs.py,sha256=BA_pF9Hnwz9iIywi4CUaNMLPqWE4R7Q8QE9kWFU369E,4797
|
|
154
156
|
snowflake/ml/model/_client/model/inference_engine_utils.py,sha256=yPkdImi2qP1uG1WzLKCBZgXV-DiIBVpImEosIjYJk8Y,1958
|
|
155
157
|
snowflake/ml/model/_client/model/model_impl.py,sha256=Yabrbir5vPMOnsVmQJ23YN7vqhi756Jcm6pfO8Aq92o,17469
|
|
156
|
-
snowflake/ml/model/_client/model/model_version_impl.py,sha256=
|
|
158
|
+
snowflake/ml/model/_client/model/model_version_impl.py,sha256=wcqFQXuQXez6gAcYA2Bj0FnVoyoDiUp6_JvOKcwJE2s,68149
|
|
159
|
+
snowflake/ml/model/_client/ops/deployment_step.py,sha256=9kxKDr9xcD4KmVM-9O4_tm3ytkllQVoElJD793VI84Q,1428
|
|
157
160
|
snowflake/ml/model/_client/ops/metadata_ops.py,sha256=qpK6PL3OyfuhyOmpvLCpHLy6vCxbZbp1HlEvakFGwv4,4884
|
|
158
|
-
snowflake/ml/model/_client/ops/model_ops.py,sha256=
|
|
159
|
-
snowflake/ml/model/_client/ops/service_ops.py,sha256=
|
|
160
|
-
snowflake/ml/model/_client/service/
|
|
161
|
-
snowflake/ml/model/_client/service/
|
|
161
|
+
snowflake/ml/model/_client/ops/model_ops.py,sha256=NmTP9jbojy6rxEpC18h_3fHPiTCZQw3I0TVgiF_dtnE,54938
|
|
162
|
+
snowflake/ml/model/_client/ops/service_ops.py,sha256=VfIMn-p8YlsenObkRG5GK2e9SHK7Afi_PKYoZfus8iU,46589
|
|
163
|
+
snowflake/ml/model/_client/service/import_model_spec_schema.py,sha256=SlEX1GiPlB8whMCmiwKUopnrGlm4fkQOQbTW2KyVTFU,554
|
|
164
|
+
snowflake/ml/model/_client/service/model_deployment_spec.py,sha256=AEF_orcAj090oafVJ01iH767h_6a68Bb2oZqCQccIOo,19942
|
|
165
|
+
snowflake/ml/model/_client/service/model_deployment_spec_schema.py,sha256=f21_tYaGFPt07w1kgcIGWc4XKWWBGKKc3ivMKVTaOM0,2585
|
|
162
166
|
snowflake/ml/model/_client/sql/_base.py,sha256=Qrm8M92g3MHb-QnSLUlbd8iVKCRxLhG_zr5M2qmXwJ8,1473
|
|
163
167
|
snowflake/ml/model/_client/sql/model.py,sha256=nstZ8zR7MkXVEfhqLt7PWMik6dZr06nzq7VsF5NVNow,5840
|
|
164
|
-
snowflake/ml/model/_client/sql/model_version.py,sha256=
|
|
165
|
-
snowflake/ml/model/_client/sql/service.py,sha256=
|
|
168
|
+
snowflake/ml/model/_client/sql/model_version.py,sha256=SOYr13YEq0mxgIatsSchOq0aKUgdPhKO3clRQ6AMa7U,24766
|
|
169
|
+
snowflake/ml/model/_client/sql/service.py,sha256=zcyNsZVyanWC-iBcGOlBYz2DZ2jxnwdr5XT2xXa3oAk,15533
|
|
166
170
|
snowflake/ml/model/_client/sql/stage.py,sha256=1TWYIVoWIeNwhVG9uqwmNpmKcC6x45LrbxCtzJW7fi4,1214
|
|
167
171
|
snowflake/ml/model/_client/sql/tag.py,sha256=9sI0VoldKmsfToWSjMQddozPPGCxYUI6n0gPBiqd6x8,4333
|
|
168
|
-
snowflake/ml/model/_model_composer/model_composer.py,sha256=
|
|
172
|
+
snowflake/ml/model/_model_composer/model_composer.py,sha256=1iMJe9b71xHC4K8VGTreQMJhI3ryAeQl3SpSK77uK_g,8313
|
|
169
173
|
snowflake/ml/model/_model_composer/model_manifest/model_manifest.py,sha256=MyNaOLRD94RiMf-GofqPP989ifTLrSOOOau2RHCHphg,9308
|
|
170
|
-
snowflake/ml/model/_model_composer/model_manifest/model_manifest_schema.py,sha256=
|
|
174
|
+
snowflake/ml/model/_model_composer/model_manifest/model_manifest_schema.py,sha256=GsHTjZPUpiVSePzNswNFxW3w07IQ32Vi_B9t-W8jUHE,3140
|
|
171
175
|
snowflake/ml/model/_model_composer/model_method/constants.py,sha256=hoJwIopSdZiYn0fGq15_NiirC0l02d5LEs2D-4J_tPk,35
|
|
172
176
|
snowflake/ml/model/_model_composer/model_method/function_generator.py,sha256=nnUJki3bJVCTF3gZ-usZW3xQ6wwlJ08EfNsPAgsnI3s,2625
|
|
173
177
|
snowflake/ml/model/_model_composer/model_method/infer_function.py_template,sha256=olysEb_bE2C8CjIRAhm7qdr2mtgk77Tx45gnLRVQGFw,1511
|
|
174
178
|
snowflake/ml/model/_model_composer/model_method/infer_partitioned.py_template,sha256=8p8jkTOJA-mBt5cuGhcWSH4z7ySQ9xevC35UioCLkC8,1539
|
|
175
179
|
snowflake/ml/model/_model_composer/model_method/infer_table_function.py_template,sha256=QT32N6akQDutLh00cXp2OD4WI6Gb7IGG1snsnrXNih8,1453
|
|
176
|
-
snowflake/ml/model/_model_composer/model_method/model_method.py,sha256=
|
|
180
|
+
snowflake/ml/model/_model_composer/model_method/model_method.py,sha256=Gau0GM87VN7uezzLmcPKeK7HCK6VQA92yk8adlcXI9E,11807
|
|
177
181
|
snowflake/ml/model/_model_composer/model_method/utils.py,sha256=RQi2qebBeE-0Y-jLYXiDWZU8nfvbnif9QbExeWiMmyI,1057
|
|
178
182
|
snowflake/ml/model/_model_composer/model_user_file/model_user_file.py,sha256=dYNgg8P9p6nRH47-OLxZIbt_Ja3t1VPGNQ0qJtpGuAw,1018
|
|
179
183
|
snowflake/ml/model/_packager/model_handler.py,sha256=xbqTFDC7ArQyYuOk6zMV_dSttWbsKKVuaOUAY3ddQmE,2846
|
|
180
|
-
snowflake/ml/model/_packager/model_packager.py,sha256=
|
|
184
|
+
snowflake/ml/model/_packager/model_packager.py,sha256=AVQ95gSURPUEmFNQo1_qKDULZpXoeo46WO86Fww7-xg,6108
|
|
181
185
|
snowflake/ml/model/_packager/model_env/model_env.py,sha256=xDDyRr8AzME0SRv2mQxzfh-blh2MH7Fz8H7R5HXiVJQ,21085
|
|
182
186
|
snowflake/ml/model/_packager/model_handlers/_base.py,sha256=OZhGv7nyej3PqaoBz021uGa40T06d9rv-kDcKUY3VnM,7152
|
|
183
187
|
snowflake/ml/model/_packager/model_handlers/_utils.py,sha256=v_IjjbvzJDqrAYSq4_l7_CiN8vkMzLx5MlYDJ_oL970,15522
|
|
184
188
|
snowflake/ml/model/_packager/model_handlers/catboost.py,sha256=dbI2QizGZS04l6ehgXb3oy5YSXrlwRHz8YENVefEbms,10676
|
|
185
|
-
snowflake/ml/model/_packager/model_handlers/custom.py,sha256=
|
|
189
|
+
snowflake/ml/model/_packager/model_handlers/custom.py,sha256=eOPTt3BoT5r9Z6rzvKaLhbffND647-j8aQ8fD50-cmA,10595
|
|
186
190
|
snowflake/ml/model/_packager/model_handlers/huggingface.py,sha256=2515WbwyuVKQy2ZJURwWY-yAfVH12s_gYBgPl-Lp7ts,42624
|
|
187
191
|
snowflake/ml/model/_packager/model_handlers/keras.py,sha256=JKBCiJEjc41zaoEhsen7rnlyPo2RBuEqG9Vq6JR_Cq0,8696
|
|
188
192
|
snowflake/ml/model/_packager/model_handlers/lightgbm.py,sha256=DAFMiqpXEUmKqeq5rgn5j6rtuwScNnuiMUBwS4OyC7Q,11074
|
|
@@ -194,14 +198,14 @@ snowflake/ml/model/_packager/model_handlers/sklearn.py,sha256=_D1YE7TmEJDsuOUt-m
|
|
|
194
198
|
snowflake/ml/model/_packager/model_handlers/snowmlmodel.py,sha256=uvz-hosuNbtcQFprnS8GzjnM8fWULBDMRbXq8immW9Q,18352
|
|
195
199
|
snowflake/ml/model/_packager/model_handlers/tensorflow.py,sha256=2J2XWYOC70axWaoNJa9aQLMyjLAKIskrT31t_LgqcIk,11350
|
|
196
200
|
snowflake/ml/model/_packager/model_handlers/torchscript.py,sha256=3IbMoVGlBR-RsQAdYZxjAz1ST-jDMQIyhhdwM5e3NeE,9531
|
|
197
|
-
snowflake/ml/model/_packager/model_handlers/xgboost.py,sha256=
|
|
201
|
+
snowflake/ml/model/_packager/model_handlers/xgboost.py,sha256=vZo81r2uCIp-yGDkB3dIRN2dXqoF1HyrQ3nXnPlAiA0,14002
|
|
198
202
|
snowflake/ml/model/_packager/model_handlers_migrator/base_migrator.py,sha256=BZo14UrywGZM1kTqzN4VFQcYjl7dggDp1U90ZBCMuOg,1409
|
|
199
203
|
snowflake/ml/model/_packager/model_handlers_migrator/pytorch_migrator_2023_12_01.py,sha256=GVpfYllXa3Voxa54PGNsZ3Hea1kOJe3T_AoA9nrs60A,764
|
|
200
204
|
snowflake/ml/model/_packager/model_handlers_migrator/tensorflow_migrator_2023_12_01.py,sha256=dXIisQteU55QMw5OvC_1E_sGqFgE88WRhGCWFqUyauM,2239
|
|
201
205
|
snowflake/ml/model/_packager/model_handlers_migrator/tensorflow_migrator_2025_01_01.py,sha256=0DxwZtXFgXpxb5LQEAfTUfEFV7zgbG4j3F-oNHLkTgE,769
|
|
202
206
|
snowflake/ml/model/_packager/model_handlers_migrator/torchscript_migrator_2023_12_01.py,sha256=MDOAGV6kML9sJh_hnYjnrPH4GtECP5DDCjaRT7NmYpU,768
|
|
203
207
|
snowflake/ml/model/_packager/model_meta/model_blob_meta.py,sha256=CzY_MhiSshKi9dWzXc4lrC9PysU0FCdHG2oRlz1vCb8,1943
|
|
204
|
-
snowflake/ml/model/_packager/model_meta/model_meta.py,sha256=
|
|
208
|
+
snowflake/ml/model/_packager/model_meta/model_meta.py,sha256=E6ax_9FWTXmoEZyAD3NCMl2YQ1oRpyC8YVhpsbmOkk8,22043
|
|
205
209
|
snowflake/ml/model/_packager/model_meta/model_meta_schema.py,sha256=mtKRbHQb6Hq2xiH1fTHSlBGaZg94qfyJ90rYRg14l0Y,3992
|
|
206
210
|
snowflake/ml/model/_packager/model_meta_migrator/base_migrator.py,sha256=8zTgq3n6TBXv7Vcwmf7b9wjK3m-9HHMsY0Qy1Rs-sZ4,1305
|
|
207
211
|
snowflake/ml/model/_packager/model_meta_migrator/migrator_plans.py,sha256=5butM-lyaDRhCAO2BaCOIQufpAxAfSAinsNuGqbbjMU,1029
|
|
@@ -211,7 +215,7 @@ snowflake/ml/model/_packager/model_runtime/model_runtime.py,sha256=xEf-S9QurEOeQ
|
|
|
211
215
|
snowflake/ml/model/_packager/model_task/model_task_utils.py,sha256=_nm3Irl5W6Oa8_OnJyp3bLeA9QAbV9ygGCsgHI70GX4,6641
|
|
212
216
|
snowflake/ml/model/_signatures/base_handler.py,sha256=4CTZKKbg4WIz_CmXjyVy8tKZW-5OFcz0J8XVPHm2dfQ,1269
|
|
213
217
|
snowflake/ml/model/_signatures/builtins_handler.py,sha256=ItWb8xNDDvIhDlmfUFCHOnUllvKZSTsny7_mRwks_Lc,3135
|
|
214
|
-
snowflake/ml/model/_signatures/core.py,sha256=
|
|
218
|
+
snowflake/ml/model/_signatures/core.py,sha256=IiQC6FqXZNLfSiXO-K__Gke71_PUO1W_9TtJUag1UJU,36473
|
|
215
219
|
snowflake/ml/model/_signatures/dmatrix_handler.py,sha256=ldcWqadJ9fJp9cOaZ3Mn-hTSj8W_laXszlkWb0zpifw,4137
|
|
216
220
|
snowflake/ml/model/_signatures/numpy_handler.py,sha256=xy7mBEAs9U5eM8F51NLabLbWXRmyQUffhVweO6jmLBA,5461
|
|
217
221
|
snowflake/ml/model/_signatures/pandas_handler.py,sha256=Gz2olwWzT4Kb3yBH0uYn3o92vT_lFoIx4yySh7T2tTQ,10790
|
|
@@ -447,16 +451,16 @@ snowflake/ml/monitoring/_client/queries/rmse.ssql,sha256=OEJiSStRz9-qKoZaFvmubtY
|
|
|
447
451
|
snowflake/ml/monitoring/_manager/model_monitor_manager.py,sha256=8WDL1OJH09tRDxsS3qiTxXKWApfQFv8Ftn2IH_j7sqI,11338
|
|
448
452
|
snowflake/ml/monitoring/entities/model_monitor_config.py,sha256=auy9BD0IoyUpZPZXMSx11orgY9D3ycqlt-w7ndLPtu8,2271
|
|
449
453
|
snowflake/ml/registry/__init__.py,sha256=XdPQK9ejYkSJVrSQ7HD3jKQO0hKq2mC4bPCB6qrtH3U,76
|
|
450
|
-
snowflake/ml/registry/registry.py,sha256=
|
|
451
|
-
snowflake/ml/registry/_manager/model_manager.py,sha256=
|
|
454
|
+
snowflake/ml/registry/registry.py,sha256=_vtQCh4DmhnPusTKWJteRPJkDpLFEfG150cjED70sOA,34611
|
|
455
|
+
snowflake/ml/registry/_manager/model_manager.py,sha256=splK5YGErt-eDIy6UbZAB3VKsGMZSJk2_MzfgrIQOhY,26306
|
|
452
456
|
snowflake/ml/registry/_manager/model_parameter_reconciler.py,sha256=QsnIp9bspUo7wqGwn2o78YewsNDOgYp3eQtfJ_Rf2Tc,15332
|
|
453
457
|
snowflake/ml/utils/authentication.py,sha256=TQV3E8YDHAPXA3dS8JWDmb_Zm8P0d9c8kCexRI4nefo,3106
|
|
454
458
|
snowflake/ml/utils/connection_params.py,sha256=NSBUgcs-DXPRHs1BKpxdSubbJx1yrFRlMPBp-bE3Ugc,8308
|
|
455
459
|
snowflake/ml/utils/html_utils.py,sha256=4g1EPuD8EnOAK7BCYiY8Wp3ZrdDkNOcUDrDAbUYxLfs,9954
|
|
456
460
|
snowflake/ml/utils/sparse.py,sha256=zLBNh-ynhGpKH5TFtopk0YLkHGvv0yq1q-sV59YQKgg,3819
|
|
457
461
|
snowflake/ml/utils/sql_client.py,sha256=pSe2od6Pkh-8NwG3D-xqN76_uNf-ohOtVbT55HeQg1Y,668
|
|
458
|
-
snowflake_ml_python-1.
|
|
459
|
-
snowflake_ml_python-1.
|
|
460
|
-
snowflake_ml_python-1.
|
|
461
|
-
snowflake_ml_python-1.
|
|
462
|
-
snowflake_ml_python-1.
|
|
462
|
+
snowflake_ml_python-1.22.0.dist-info/licenses/LICENSE.txt,sha256=PdEp56Av5m3_kl21iFkVTX_EbHJKFGEdmYeIO1pL_Yk,11365
|
|
463
|
+
snowflake_ml_python-1.22.0.dist-info/METADATA,sha256=blcI4iB283G6JXS7v5Ttkw5bunAO1Q4tqkgAaqruA_8,102098
|
|
464
|
+
snowflake_ml_python-1.22.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
465
|
+
snowflake_ml_python-1.22.0.dist-info/top_level.txt,sha256=TY0gFSHKDdZy3THb0FGomyikWQasEGldIR1O0HGOHVw,10
|
|
466
|
+
snowflake_ml_python-1.22.0.dist-info/RECORD,,
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
from typing import Any, Optional, Union
|
|
2
|
-
|
|
3
|
-
from packaging.version import Version
|
|
4
|
-
from pydantic import BaseModel, Field, RootModel, field_validator
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class SpcsContainerRuntime(BaseModel):
|
|
8
|
-
python_version: Version = Field(alias="pythonVersion")
|
|
9
|
-
hardware_type: str = Field(alias="hardwareType")
|
|
10
|
-
runtime_container_image: str = Field(alias="runtimeContainerImage")
|
|
11
|
-
|
|
12
|
-
@field_validator("python_version", mode="before")
|
|
13
|
-
@classmethod
|
|
14
|
-
def validate_python_version(cls, v: Union[str, Version]) -> Version:
|
|
15
|
-
if isinstance(v, Version):
|
|
16
|
-
return v
|
|
17
|
-
try:
|
|
18
|
-
return Version(v)
|
|
19
|
-
except Exception:
|
|
20
|
-
raise ValueError(f"Invalid Python version format: {v}")
|
|
21
|
-
|
|
22
|
-
class Config:
|
|
23
|
-
frozen = True
|
|
24
|
-
extra = "allow"
|
|
25
|
-
arbitrary_types_allowed = True
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class RuntimeEnvironmentEntry(BaseModel):
|
|
29
|
-
spcs_container_runtime: Optional[SpcsContainerRuntime] = Field(alias="spcsContainerRuntime", default=None)
|
|
30
|
-
|
|
31
|
-
class Config:
|
|
32
|
-
extra = "allow"
|
|
33
|
-
frozen = True
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class RuntimeEnvironmentsDict(RootModel[dict[str, RuntimeEnvironmentEntry]]):
|
|
37
|
-
@field_validator("root", mode="before")
|
|
38
|
-
@classmethod
|
|
39
|
-
def _filter_to_dict_entries(cls, data: Any) -> dict[str, dict[str, Any]]:
|
|
40
|
-
"""
|
|
41
|
-
Pre-validation hook: keep only those items at the root level
|
|
42
|
-
whose values are dicts. Non-dict values will be dropped.
|
|
43
|
-
|
|
44
|
-
Args:
|
|
45
|
-
data: The input data to filter, expected to be a dictionary.
|
|
46
|
-
|
|
47
|
-
Returns:
|
|
48
|
-
A dictionary containing only the key-value pairs where values are dictionaries.
|
|
49
|
-
|
|
50
|
-
Raises:
|
|
51
|
-
ValueError: If input data is not a dictionary.
|
|
52
|
-
"""
|
|
53
|
-
# If the entire root is not a dict, raise error immediately
|
|
54
|
-
if not isinstance(data, dict):
|
|
55
|
-
raise ValueError(f"Expected dictionary data, but got {type(data).__name__}: {data}")
|
|
56
|
-
|
|
57
|
-
# Filter out any key whose value is not a dict
|
|
58
|
-
return {key: value for key, value in data.items() if isinstance(value, dict)}
|
|
59
|
-
|
|
60
|
-
def get_spcs_container_runtimes(self) -> list[SpcsContainerRuntime]:
|
|
61
|
-
return [
|
|
62
|
-
entry.spcs_container_runtime for entry in self.root.values() if entry.spcs_container_runtime is not None
|
|
63
|
-
]
|
|
File without changes
|
{snowflake_ml_python-1.21.0.dist-info → snowflake_ml_python-1.22.0.dist-info}/licenses/LICENSE.txt
RENAMED
|
File without changes
|
|
File without changes
|