snowflake-ml-python 1.20.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/platform_capabilities.py +36 -0
- snowflake/ml/_internal/utils/url.py +42 -0
- snowflake/ml/data/_internal/arrow_ingestor.py +67 -2
- snowflake/ml/data/data_connector.py +103 -1
- snowflake/ml/experiment/_client/experiment_tracking_sql_client.py +8 -2
- snowflake/ml/experiment/callback/__init__.py +0 -0
- snowflake/ml/experiment/callback/keras.py +25 -2
- snowflake/ml/experiment/callback/lightgbm.py +27 -2
- snowflake/ml/experiment/callback/xgboost.py +25 -2
- snowflake/ml/experiment/experiment_tracking.py +93 -3
- snowflake/ml/experiment/utils.py +6 -0
- snowflake/ml/feature_store/feature_view.py +34 -24
- snowflake/ml/jobs/_interop/protocols.py +3 -0
- snowflake/ml/jobs/_utils/constants.py +1 -0
- snowflake/ml/jobs/_utils/payload_utils.py +354 -356
- snowflake/ml/jobs/_utils/scripts/mljob_launcher.py +95 -8
- snowflake/ml/jobs/_utils/scripts/start_mlruntime.sh +92 -0
- snowflake/ml/jobs/_utils/scripts/startup.sh +112 -0
- snowflake/ml/jobs/_utils/spec_utils.py +1 -445
- snowflake/ml/jobs/_utils/stage_utils.py +22 -1
- snowflake/ml/jobs/_utils/types.py +14 -7
- snowflake/ml/jobs/job.py +2 -8
- snowflake/ml/jobs/manager.py +57 -135
- 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 +130 -14
- snowflake/ml/model/_client/ops/deployment_step.py +36 -0
- snowflake/ml/model/_client/ops/model_ops.py +93 -8
- snowflake/ml/model/_client/ops/service_ops.py +32 -52
- 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 +94 -5
- 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_handler.py +8 -2
- snowflake/ml/model/_packager/model_handlers/custom.py +52 -0
- snowflake/ml/model/_packager/model_handlers/{huggingface_pipeline.py → huggingface.py} +203 -76
- snowflake/ml/model/_packager/model_handlers/mlflow.py +6 -1
- 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 +390 -8
- snowflake/ml/model/_signatures/utils.py +13 -4
- snowflake/ml/model/code_path.py +104 -0
- snowflake/ml/model/compute_pool.py +2 -0
- snowflake/ml/model/custom_model.py +55 -13
- snowflake/ml/model/model_signature.py +13 -1
- snowflake/ml/model/models/huggingface.py +285 -0
- snowflake/ml/model/models/huggingface_pipeline.py +19 -208
- snowflake/ml/model/type_hints.py +7 -1
- snowflake/ml/modeling/_internal/snowpark_implementations/distributed_hpo_trainer.py +2 -2
- snowflake/ml/monitoring/_client/model_monitor_sql_client.py +12 -0
- snowflake/ml/monitoring/_manager/model_monitor_manager.py +12 -0
- snowflake/ml/monitoring/entities/model_monitor_config.py +5 -0
- snowflake/ml/registry/_manager/model_manager.py +230 -15
- snowflake/ml/registry/registry.py +4 -4
- snowflake/ml/utils/html_utils.py +67 -1
- snowflake/ml/version.py +1 -1
- {snowflake_ml_python-1.20.0.dist-info → snowflake_ml_python-1.22.0.dist-info}/METADATA +81 -7
- {snowflake_ml_python-1.20.0.dist-info → snowflake_ml_python-1.22.0.dist-info}/RECORD +67 -59
- snowflake/ml/jobs/_utils/runtime_env_utils.py +0 -63
- {snowflake_ml_python-1.20.0.dist-info → snowflake_ml_python-1.22.0.dist-info}/WHEEL +0 -0
- {snowflake_ml_python-1.20.0.dist-info → snowflake_ml_python-1.22.0.dist-info}/licenses/LICENSE.txt +0 -0
- {snowflake_ml_python-1.20.0.dist-info → snowflake_ml_python-1.22.0.dist-info}/top_level.txt +0 -0
|
@@ -218,38 +218,48 @@ class FeatureView(lineage_node.LineageNode):
|
|
|
218
218
|
"""
|
|
219
219
|
Create a FeatureView instance.
|
|
220
220
|
|
|
221
|
+
# noqa: DAR101
|
|
222
|
+
|
|
221
223
|
Args:
|
|
222
|
-
name: name of the FeatureView.
|
|
223
|
-
entities: entities that the FeatureView is associated with.
|
|
224
|
-
feature_df: Snowpark DataFrame containing data source and all feature feature_df
|
|
225
|
-
|
|
224
|
+
name: The name of the FeatureView. This must follow Snowflake identifier rules.
|
|
225
|
+
entities: The entities that the FeatureView is associated with.
|
|
226
|
+
feature_df: The Snowpark DataFrame containing data source and all feature feature_df logic.
|
|
227
|
+
The final projection of the DataFrame should contain feature names, join keys and timestamp if
|
|
228
|
+
applicable.
|
|
226
229
|
timestamp_col: name of the timestamp column for point-in-time lookup when consuming the
|
|
227
230
|
feature values.
|
|
228
|
-
refresh_freq: Time unit defining how often the new feature data should be generated
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
231
|
+
refresh_freq: Time unit defining how often the new feature data should be generated, in the format
|
|
232
|
+
``{ <num> { seconds | minutes | hours | days } | DOWNSTREAM | <cron expr> <time zone>}``.
|
|
233
|
+
|
|
234
|
+
The minimum refresh frequency is 1 minute.
|
|
235
|
+
|
|
236
|
+
When using a ``cron`` format, you must provide a time zone.
|
|
237
|
+
|
|
238
|
+
When you don't provide a refresh value, the ``FeatureView`` is registered as a ``View`` on the Snowflake
|
|
239
|
+
backend. There are no extra storage costs incurred for this view.
|
|
240
|
+
desc: Description of the FeatureView.
|
|
241
|
+
warehouse: The warehouse used to refresh this feature view. Not needed when ``refresh_freq`` is ``None``.
|
|
242
|
+
This warehouse will overwrite the default warehouse of Feature Store if specified, otherwise the default
|
|
243
|
+
warehouse will be used.
|
|
239
244
|
initialize: Specifies the behavior of the initial refresh of feature view. This property cannot be altered
|
|
240
245
|
after you register the feature view. It supports ON_CREATE (default) or ON_SCHEDULE. ON_CREATE refreshes
|
|
241
246
|
the feature view synchronously at creation. ON_SCHEDULE refreshes the feature view at the next scheduled
|
|
242
247
|
refresh. It is only effective when refresh_freq is not None.
|
|
243
248
|
refresh_mode: The refresh mode of managed feature view. The value can be 'AUTO', 'FULL' or 'INCREMENTAL'.
|
|
244
|
-
For managed feature view, the default value is 'AUTO'. For static feature view it has no effect.
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
online_config:
|
|
250
|
-
online storage will be enabled. Defaults to None (no online storage).
|
|
251
|
-
|
|
252
|
-
|
|
249
|
+
For managed feature view, the default value is 'AUTO'. For static feature view it has no effect. For
|
|
250
|
+
more information, see
|
|
251
|
+
`CREATE DYNAMIC TABLE <https://docs.snowflake.com/en/sql-reference/sql/create-dynamic-table>`__.
|
|
252
|
+
cluster_by: Columns to cluster the feature view by. If ``timestamp_col`` is provided, it is added to the
|
|
253
|
+
default clustering keys. Default is to use the join keys from entities in the view.
|
|
254
|
+
online_config: Configuration for online storage. If provided with ``enable=True``,
|
|
255
|
+
online storage will be enabled. Defaults to ``None`` (no online storage).
|
|
256
|
+
|
|
257
|
+
.. note::
|
|
258
|
+
This feature is currently in preview.
|
|
259
|
+
_kwargs: Reserved kwargs for system generated args.
|
|
260
|
+
|
|
261
|
+
.. caution::
|
|
262
|
+
Use of additional keywords is prohibited.
|
|
253
263
|
|
|
254
264
|
Example::
|
|
255
265
|
|
|
@@ -266,6 +266,9 @@ class PandasDataFrameProtocol(SerializationProtocol):
|
|
|
266
266
|
|
|
267
267
|
# TODO: Support partitioned writes for large datasets
|
|
268
268
|
result_path = posixpath.join(dest_dir, self.DEFAULT_PATH_PATTERN.format(0))
|
|
269
|
+
# stage mount v2 has a bug where it creates an empty file when creating a new file
|
|
270
|
+
with data_utils.open_stream(result_path, "wb", session=session) as stream:
|
|
271
|
+
stream.write(b"") # Dummy write to create the file
|
|
269
272
|
with data_utils.open_stream(result_path, "wb", session=session) as stream:
|
|
270
273
|
obj.to_parquet(stream)
|
|
271
274
|
|
|
@@ -30,6 +30,7 @@ DEFAULT_IMAGE_CPU = "st_plat/runtime/x86/runtime_image/snowbooks"
|
|
|
30
30
|
DEFAULT_IMAGE_GPU = "st_plat/runtime/x86/generic_gpu/runtime_image/snowbooks"
|
|
31
31
|
DEFAULT_IMAGE_TAG = "1.8.0"
|
|
32
32
|
DEFAULT_ENTRYPOINT_PATH = "func.py"
|
|
33
|
+
DEFAULT_PYTHON_VERSION = "3.10"
|
|
33
34
|
|
|
34
35
|
# Percent of container memory to allocate for /dev/shm volume
|
|
35
36
|
MEMORY_VOLUME_SIZE = 0.3
|