zenml-nightly 0.66.0.dev20240925__py3-none-any.whl → 0.66.0.dev20240926__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.
- zenml/VERSION +1 -1
- zenml/integrations/__init__.py +1 -0
- zenml/integrations/constants.py +1 -0
- zenml/integrations/deepchecks/__init__.py +1 -1
- zenml/integrations/deepchecks/data_validators/deepchecks_data_validator.py +55 -14
- zenml/integrations/deepchecks/validation_checks.py +62 -5
- zenml/integrations/skypilot/orchestrators/skypilot_base_vm_orchestrator.py +38 -26
- zenml/integrations/skypilot_kubernetes/__init__.py +52 -0
- zenml/integrations/skypilot_kubernetes/flavors/__init__.py +26 -0
- zenml/integrations/skypilot_kubernetes/flavors/skypilot_orchestrator_kubernetes_vm_flavor.py +125 -0
- zenml/integrations/skypilot_kubernetes/orchestrators/__init__.py +25 -0
- zenml/integrations/skypilot_kubernetes/orchestrators/skypilot_kubernetes_vm_orchestrator.py +74 -0
- zenml/zen_server/dashboard/assets/{404-iO8vpun1.js → 404-CMnKjD-L.js} +1 -1
- zenml/zen_server/dashboard/assets/{@reactflow-B6kq9fJZ.js → @reactflow-CEC2f0cl.js} +1 -1
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-BqM1UpCD.js +1 -0
- zenml/zen_server/dashboard/assets/{CodeSnippet-DNWdQmbo.js → CodeSnippet-DRy_0J4D.js} +2 -2
- zenml/zen_server/dashboard/assets/{CollapsibleCard-B2OVjWYE.js → CollapsibleCard-lE-75Zob.js} +1 -1
- zenml/zen_server/dashboard/assets/{Commands-DsoaVElZ.js → Commands-CVx2RAoT.js} +1 -1
- zenml/zen_server/dashboard/assets/{CopyButton-BqE_-PHO.js → CopyButton-C_yRGWuP.js} +1 -1
- zenml/zen_server/dashboard/assets/{CsvVizualization-Dyasr2jU.js → CsvVizualization-Dd0P02Iz.js} +1 -1
- zenml/zen_server/dashboard/assets/{DialogItem-Cz1VLRwa.js → DialogItem-BCrc2wIk.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-DorJD_va.js → Error-BuMJbG-M.js} +1 -1
- zenml/zen_server/dashboard/assets/{ExecutionStatus-CIfQTutR.js → ExecutionStatus-fIulMG4w.js} +1 -1
- zenml/zen_server/dashboard/assets/{Helpbox-CmfvtNeq.js → Helpbox-CJAp4kbv.js} +1 -1
- zenml/zen_server/dashboard/assets/Infobox-CC70zvGO.js +1 -0
- zenml/zen_server/dashboard/assets/{InlineAvatar-Ds2ZFHPc.js → InlineAvatar-C3QXdFW1.js} +1 -1
- zenml/zen_server/dashboard/assets/{Partials-DX-8iEa1.js → Partials-Cb8lrNsi.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderIcon-BOQJgapd.js → ProviderIcon-C9BuYVSN.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderRadio-BsYBw9YA.js → ProviderRadio-GYc9PJtG.js} +1 -1
- zenml/zen_server/dashboard/assets/{SearchField-W3GXpLlI.js → SearchField-BeF1yR7M.js} +1 -1
- zenml/zen_server/dashboard/assets/SecretTooltip-DgVWrPxX.js +1 -0
- zenml/zen_server/dashboard/assets/{SetPassword-B-0a8UCj.js → SetPassword-nAhHddXW.js} +1 -1
- zenml/zen_server/dashboard/assets/{Tick-i1DYsVcX.js → Tick-C5ZVvNRQ.js} +1 -1
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-C6Zb7ASL.js → UpdatePasswordSchemas-7KFsDbKb.js} +1 -1
- zenml/zen_server/dashboard/assets/UsageReason-DL5NL_ZD.js +1 -0
- zenml/zen_server/dashboard/assets/{WizardFooter-BHbO7zOa.js → WizardFooter-CgvFSppz.js} +1 -1
- zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-BBEe6I9-.js → all-pipeline-runs-query-DAPSF_74.js} +1 -1
- zenml/zen_server/dashboard/assets/{cloud-only-BuP4Kt_7.js → cloud-only-CxoNxh86.js} +1 -1
- zenml/zen_server/dashboard/assets/{create-stack-B2x2d4r1.js → create-stack-BfgeXFuV.js} +1 -1
- zenml/zen_server/dashboard/assets/delete-run-OkGmZQ5G.js +1 -0
- zenml/zen_server/dashboard/assets/{form-schemas-Bap0f854.js → form-schemas-C09PrQUJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-DFi8BroH.js → index-CLT4K7oC.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-B9wVwe7u.js → index-D0bJjaey.js} +3 -3
- zenml/zen_server/dashboard/assets/index-PcI3Xw77.css +1 -0
- zenml/zen_server/dashboard/assets/{login-mutation-DwxUz8VA.js → login-mutation-CB45FHbP.js} +1 -1
- zenml/zen_server/dashboard/assets/{not-found-D5i9DunU.js → not-found-NtCUfXiV.js} +1 -1
- zenml/zen_server/dashboard/assets/page-AvcQe_oR.js +1 -0
- zenml/zen_server/dashboard/assets/page-B6DccgPa.js +1 -0
- zenml/zen_server/dashboard/assets/{page-xQG6GmFJ.js → page-B7DTiwhv.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CIbehp7V.js → page-B7LduaiG.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CEJWu1YO.js → page-B8WlhDq6.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BitfWsiW.js → page-BIhP9udn.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DE03uZZR.js → page-BLS9bXB8.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DFCK65G9.js → page-BYXn4SXu.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-bimkItOg.js → page-Bfvwt3AB.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-D5F3DJjm.js → page-BipKr1Pt.js} +1 -1
- zenml/zen_server/dashboard/assets/page-BwG4f5qc.js +1 -0
- zenml/zen_server/dashboard/assets/page-C1c_unjg.js +9 -0
- zenml/zen_server/dashboard/assets/{page-DQdwZZ9x.js → page-C25tiRdj.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CIATsAA7.js +1 -0
- zenml/zen_server/dashboard/assets/{page-iwoJnwPv.js → page-CKUVhcYr.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BiF8hLbO.js → page-CXLwze-m.js} +1 -1
- zenml/zen_server/dashboard/assets/page-D7TD0k_A.js +1 -0
- zenml/zen_server/dashboard/assets/{page-CDOQLrPC.js → page-DIlOQjGU.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DGMa3ZQL.js → page-DJ31Huvj.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-J0s8Sq3N.js → page-DOqsdVzG.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DQGCHKrQ.js → page-DUapawuM.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-WCQ659by.js → page-Dd3jZyrf.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CrSdkteO.js → page-DyZzYHWA.js} +2 -2
- zenml/zen_server/dashboard/assets/page-L_xNBh_5.js +3 -0
- zenml/zen_server/dashboard/assets/{page-oS4hqS8M.js → page-VsrKiIdF.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DgM-N9RL.js → page-ioO58ULo.js} +1 -1
- zenml/zen_server/dashboard/assets/page-kalpiPZz.js +6 -0
- zenml/zen_server/dashboard/assets/{persist-xsYgVtR1.js → persist-ChKZVcn3.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-mEZN_fgH.js → persist-DodaLO0k.js} +1 -1
- zenml/zen_server/dashboard/assets/{sharedSchema-BfZcy7aP.js → sharedSchema-BvRWAv-c.js} +1 -1
- zenml/zen_server/dashboard/assets/{stack-detail-query-CU4egfhp.js → stack-detail-query-C9XwNP1E.js} +1 -1
- zenml/zen_server/dashboard/assets/tick-circle-m-hJG8i9.js +1 -0
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-DNqmQXDM.js → update-server-settings-mutation-DJDefwqW.js} +1 -1
- zenml/zen_server/dashboard/assets/{url-DwbuKk1b.js → url-DdWrpIhi.js} +1 -1
- zenml/zen_server/dashboard/index.html +4 -4
- zenml/zen_server/dashboard_legacy/asset-manifest.json +4 -4
- zenml/zen_server/dashboard_legacy/index.html +1 -1
- zenml/zen_server/dashboard_legacy/{precache-manifest.290b95d5b43efa3368b3dc63d20c4782.js → precache-manifest.4f9db97de1b48fd5944e8a766c1300fe.js} +4 -4
- zenml/zen_server/dashboard_legacy/service-worker.js +1 -1
- zenml/zen_server/dashboard_legacy/static/js/{main.840d1bf0.chunk.js → main.0fdd4aad.chunk.js} +2 -2
- zenml/zen_server/dashboard_legacy/static/js/{main.840d1bf0.chunk.js.map → main.0fdd4aad.chunk.js.map} +1 -1
- {zenml_nightly-0.66.0.dev20240925.dist-info → zenml_nightly-0.66.0.dev20240926.dist-info}/METADATA +1 -1
- {zenml_nightly-0.66.0.dev20240925.dist-info → zenml_nightly-0.66.0.dev20240926.dist-info}/RECORD +92 -85
- zenml/zen_server/dashboard/assets/AlertDialogDropdownItem-BXeSvmMY.js +0 -1
- zenml/zen_server/dashboard/assets/EditSecretDialog-Du423_3U.js +0 -1
- zenml/zen_server/dashboard/assets/Infobox-BL9NOS37.js +0 -1
- zenml/zen_server/dashboard/assets/UsageReason-CCnzmwS8.js +0 -1
- zenml/zen_server/dashboard/assets/index-6DYjZgDn.css +0 -1
- zenml/zen_server/dashboard/assets/page-BFuJICXM.js +0 -9
- zenml/zen_server/dashboard/assets/page-CLiRGfWo.js +0 -1
- zenml/zen_server/dashboard/assets/page-CV44mQn9.js +0 -1
- zenml/zen_server/dashboard/assets/page-DI-qTWrm.js +0 -1
- zenml/zen_server/dashboard/assets/page-Dt8VgzbE.js +0 -1
- zenml/zen_server/dashboard/assets/page-oSqx9dkH.js +0 -1
- zenml/zen_server/dashboard/assets/page-p3GqEAUW.js +0 -1
- zenml/zen_server/dashboard/assets/page-qvcUVPE-.js +0 -1
- {zenml_nightly-0.66.0.dev20240925.dist-info → zenml_nightly-0.66.0.dev20240926.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.66.0.dev20240925.dist-info → zenml_nightly-0.66.0.dev20240926.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.66.0.dev20240925.dist-info → zenml_nightly-0.66.0.dev20240926.dist-info}/entry_points.txt +0 -0
zenml/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.66.0.
|
1
|
+
0.66.0.dev20240926
|
zenml/integrations/__init__.py
CHANGED
@@ -69,6 +69,7 @@ from zenml.integrations.skypilot_aws import SkypilotAWSIntegration # noqa
|
|
69
69
|
from zenml.integrations.skypilot_gcp import SkypilotGCPIntegration # noqa
|
70
70
|
from zenml.integrations.skypilot_azure import SkypilotAzureIntegration # noqa
|
71
71
|
from zenml.integrations.skypilot_lambda import SkypilotLambdaIntegration # noqa
|
72
|
+
from zenml.integrations.skypilot_kubernetes import SkypilotKubernetesIntegration # noqa
|
72
73
|
from zenml.integrations.slack import SlackIntegration # noqa
|
73
74
|
from zenml.integrations.spark import SparkIntegration # noqa
|
74
75
|
from zenml.integrations.tekton import TektonIntegration # noqa
|
zenml/integrations/constants.py
CHANGED
@@ -35,7 +35,7 @@ class DeepchecksIntegration(Integration):
|
|
35
35
|
|
36
36
|
NAME = DEEPCHECKS
|
37
37
|
REQUIREMENTS = [
|
38
|
-
"deepchecks[vision]
|
38
|
+
"deepchecks[vision]~=0.18.0",
|
39
39
|
"torchvision>=0.14.0",
|
40
40
|
"opencv-python==4.5.5.64", # pin to same version
|
41
41
|
"opencv-python-headless==4.5.5.64", # pin to same version
|
@@ -17,6 +17,7 @@ from typing import (
|
|
17
17
|
Any,
|
18
18
|
ClassVar,
|
19
19
|
Dict,
|
20
|
+
List,
|
20
21
|
Optional,
|
21
22
|
Sequence,
|
22
23
|
Tuple,
|
@@ -28,9 +29,8 @@ import pandas as pd
|
|
28
29
|
from deepchecks.core.checks import BaseCheck
|
29
30
|
from deepchecks.core.suite import SuiteResult
|
30
31
|
from deepchecks.tabular import Dataset as TabularData
|
32
|
+
from deepchecks.tabular import ModelComparisonSuite
|
31
33
|
from deepchecks.tabular import Suite as TabularSuite
|
32
|
-
|
33
|
-
# not part of deepchecks.tabular.checks
|
34
34
|
from deepchecks.tabular.suites import full_suite as full_tabular_suite
|
35
35
|
from deepchecks.vision import Suite as VisionSuite
|
36
36
|
from deepchecks.vision import VisionData
|
@@ -102,7 +102,7 @@ class DeepchecksDataValidator(BaseDataValidator):
|
|
102
102
|
comparison_dataset: Optional[
|
103
103
|
Union[pd.DataFrame, DataLoader[Any]]
|
104
104
|
] = None,
|
105
|
-
|
105
|
+
models: Optional[List[Union[ClassifierMixin, Module]]] = None,
|
106
106
|
check_list: Optional[Sequence[str]] = None,
|
107
107
|
dataset_kwargs: Dict[str, Any] = {},
|
108
108
|
check_kwargs: Dict[str, Dict[str, Any]] = {},
|
@@ -123,7 +123,7 @@ class DeepchecksDataValidator(BaseDataValidator):
|
|
123
123
|
validation.
|
124
124
|
comparison_dataset: Optional secondary (comparison) dataset argument
|
125
125
|
used during comparison checks.
|
126
|
-
|
126
|
+
models: Optional model argument used during validation.
|
127
127
|
check_list: Optional list of ZenML Deepchecks check identifiers
|
128
128
|
specifying the list of Deepchecks checks to be performed.
|
129
129
|
dataset_kwargs: Additional keyword arguments to be passed to the
|
@@ -149,6 +149,7 @@ class DeepchecksDataValidator(BaseDataValidator):
|
|
149
149
|
# arguments and the check list.
|
150
150
|
is_tabular = False
|
151
151
|
is_vision = False
|
152
|
+
is_multi_model = False
|
152
153
|
for dataset in [reference_dataset, comparison_dataset]:
|
153
154
|
if dataset is None:
|
154
155
|
continue
|
@@ -163,7 +164,18 @@ class DeepchecksDataValidator(BaseDataValidator):
|
|
163
164
|
f"data and {str(DataLoader)} for computer vision data."
|
164
165
|
)
|
165
166
|
|
166
|
-
if
|
167
|
+
if models:
|
168
|
+
# if there's more than one models, we should set the
|
169
|
+
# is_multi_model to True
|
170
|
+
if len(models) > 1:
|
171
|
+
is_multi_model = True
|
172
|
+
# if the models are of different types, raise an error
|
173
|
+
# only the same type of models can be used for comparison
|
174
|
+
if len(set(type(model) for model in models)) > 1:
|
175
|
+
raise TypeError(
|
176
|
+
"Models used for comparison checks must be of the same type."
|
177
|
+
)
|
178
|
+
model = models[0]
|
167
179
|
if isinstance(model, ClassifierMixin):
|
168
180
|
is_tabular = True
|
169
181
|
elif isinstance(model, Module):
|
@@ -190,8 +202,18 @@ class DeepchecksDataValidator(BaseDataValidator):
|
|
190
202
|
if not check_list:
|
191
203
|
# default to executing all the checks listed in the supplied
|
192
204
|
# checks enum type if a custom check list is not supplied
|
205
|
+
# don't include the TABULAR_PERFORMANCE_BIAS check enum value
|
206
|
+
# as it requires a protected feature name to be set
|
207
|
+
checks_to_exclude = [
|
208
|
+
DeepchecksModelValidationCheck.TABULAR_PERFORMANCE_BIAS
|
209
|
+
]
|
210
|
+
check_enum_values = [
|
211
|
+
check.value
|
212
|
+
for check in check_enum
|
213
|
+
if check not in checks_to_exclude
|
214
|
+
]
|
193
215
|
tabular_checks, vision_checks = cls._split_checks(
|
194
|
-
|
216
|
+
check_enum_values
|
195
217
|
)
|
196
218
|
if is_tabular:
|
197
219
|
check_list = tabular_checks
|
@@ -254,6 +276,10 @@ class DeepchecksDataValidator(BaseDataValidator):
|
|
254
276
|
suite_class = VisionSuite
|
255
277
|
full_suite = full_vision_suite()
|
256
278
|
|
279
|
+
# if is_multi_model is True, we need to use the ModelComparisonSuite
|
280
|
+
if is_multi_model:
|
281
|
+
suite_class = ModelComparisonSuite
|
282
|
+
|
257
283
|
train_dataset = dataset_class(reference_dataset, **dataset_kwargs)
|
258
284
|
test_dataset = None
|
259
285
|
if comparison_dataset is not None:
|
@@ -294,13 +320,28 @@ class DeepchecksDataValidator(BaseDataValidator):
|
|
294
320
|
continue
|
295
321
|
condition_method(**condition_kwargs)
|
296
322
|
|
297
|
-
suite
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
323
|
+
# if the check is supported by the suite, add it
|
324
|
+
if isinstance(check, suite.supported_checks()):
|
325
|
+
suite.add(check)
|
326
|
+
else:
|
327
|
+
logger.warning(
|
328
|
+
f"Check {check_name} is not supported by the {suite_class} "
|
329
|
+
"suite. Ignoring the check."
|
330
|
+
)
|
331
|
+
|
332
|
+
if isinstance(suite, ModelComparisonSuite):
|
333
|
+
return suite.run(
|
334
|
+
models=models,
|
335
|
+
train_datasets=train_dataset,
|
336
|
+
test_datasets=test_dataset,
|
337
|
+
)
|
338
|
+
else:
|
339
|
+
return suite.run(
|
340
|
+
train_dataset=train_dataset,
|
341
|
+
test_dataset=test_dataset,
|
342
|
+
model=models[0] if models else None,
|
343
|
+
**run_kwargs,
|
344
|
+
)
|
304
345
|
|
305
346
|
def data_validation(
|
306
347
|
self,
|
@@ -444,7 +485,7 @@ class DeepchecksDataValidator(BaseDataValidator):
|
|
444
485
|
check_enum=check_enum,
|
445
486
|
reference_dataset=dataset,
|
446
487
|
comparison_dataset=comparison_dataset,
|
447
|
-
|
488
|
+
models=[model],
|
448
489
|
check_list=check_list,
|
449
490
|
dataset_kwargs=dataset_kwargs,
|
450
491
|
check_kwargs=check_kwargs,
|
@@ -153,8 +153,8 @@ class DeepchecksDataIntegrityCheck(DeepchecksValidationCheck):
|
|
153
153
|
|
154
154
|
This list reflects the set of data integrity checks provided by Deepchecks:
|
155
155
|
|
156
|
-
* [for tabular data](https://docs.deepchecks.com/
|
157
|
-
* [for computer vision](https://docs.deepchecks.com/
|
156
|
+
* [for tabular data](https://docs.deepchecks.com/stable/tabular/auto_checks/data_integrity/index.html)
|
157
|
+
* [for computer vision](https://docs.deepchecks.com/stable/vision/auto_checks/data_integrity/index.html)
|
158
158
|
|
159
159
|
All these checks inherit from `deepchecks.tabular.SingleDatasetCheck` or
|
160
160
|
`deepchecks.vision.SingleDatasetCheck` and require a single dataset as input.
|
@@ -176,6 +176,9 @@ class DeepchecksDataIntegrityCheck(DeepchecksValidationCheck):
|
|
176
176
|
TABULAR_FEATURE_LABEL_CORRELATION = source_utils.resolve(
|
177
177
|
tabular_checks.FeatureLabelCorrelation
|
178
178
|
).import_path
|
179
|
+
TABULAR_IDENTIFIER_LABEL_CORRELATION = source_utils.resolve(
|
180
|
+
tabular_checks.IdentifierLabelCorrelation
|
181
|
+
).import_path
|
179
182
|
TABULAR_IS_SINGLE_VALUE = source_utils.resolve(
|
180
183
|
tabular_checks.IsSingleValue
|
181
184
|
).import_path
|
@@ -197,6 +200,12 @@ class DeepchecksDataIntegrityCheck(DeepchecksValidationCheck):
|
|
197
200
|
TABULAR_STRING_MISMATCH = source_utils.resolve(
|
198
201
|
tabular_checks.StringMismatch
|
199
202
|
).import_path
|
203
|
+
TABULAR_CLASS_IMBALANCE = source_utils.resolve(
|
204
|
+
tabular_checks.ClassImbalance
|
205
|
+
).import_path
|
206
|
+
TABULAR_PERCENT_OF_NULLS = source_utils.resolve(
|
207
|
+
tabular_checks.PercentOfNulls
|
208
|
+
).import_path
|
200
209
|
|
201
210
|
VISION_IMAGE_PROPERTY_OUTLIERS = source_utils.resolve(
|
202
211
|
vision_checks.ImagePropertyOutliers
|
@@ -204,6 +213,9 @@ class DeepchecksDataIntegrityCheck(DeepchecksValidationCheck):
|
|
204
213
|
VISION_LABEL_PROPERTY_OUTLIERS = source_utils.resolve(
|
205
214
|
vision_checks.LabelPropertyOutliers
|
206
215
|
).import_path
|
216
|
+
VISION_PROPERTY_LABEL_CORRELATION = source_utils.resolve(
|
217
|
+
vision_checks.PropertyLabelCorrelation
|
218
|
+
).import_path
|
207
219
|
|
208
220
|
|
209
221
|
class DeepchecksDataDriftCheck(DeepchecksValidationCheck):
|
@@ -246,19 +258,37 @@ class DeepchecksDataDriftCheck(DeepchecksValidationCheck):
|
|
246
258
|
TABULAR_TRAIN_TEST_FEATURE_DRIFT = source_utils.resolve(
|
247
259
|
tabular_checks.TrainTestFeatureDrift
|
248
260
|
).import_path
|
261
|
+
TABULAR_FEATURE_DRIFT = source_utils.resolve(
|
262
|
+
tabular_checks.FeatureDrift
|
263
|
+
).import_path
|
249
264
|
TABULAR_TRAIN_TEST_LABEL_DRIFT = source_utils.resolve(
|
250
265
|
tabular_checks.TrainTestLabelDrift
|
251
266
|
).import_path
|
267
|
+
TABULAR_LABEL_DRIFT = source_utils.resolve(
|
268
|
+
tabular_checks.LabelDrift
|
269
|
+
).import_path
|
252
270
|
TABULAR_TRAIN_TEST_SAMPLES_MIX = source_utils.resolve(
|
253
271
|
tabular_checks.TrainTestSamplesMix
|
254
272
|
).import_path
|
255
273
|
TABULAR_WHOLE_DATASET_DRIFT = source_utils.resolve(
|
256
274
|
tabular_checks.WholeDatasetDrift
|
257
275
|
).import_path
|
276
|
+
TABULAR_NEW_CATEGORY_TRAIN_TEST = source_utils.resolve(
|
277
|
+
tabular_checks.NewCategoryTrainTest
|
278
|
+
).import_path
|
279
|
+
TABULAR_MULTIVARIATE_DRIFT = source_utils.resolve(
|
280
|
+
tabular_checks.MultivariateDrift
|
281
|
+
).import_path
|
258
282
|
|
283
|
+
VISION_PROPERTY_LABEL_CORRELATION_CHANGE = source_utils.resolve(
|
284
|
+
vision_checks.PropertyLabelCorrelationChange
|
285
|
+
).import_path
|
259
286
|
VISION_HEATMAP_COMPARISON = source_utils.resolve(
|
260
287
|
vision_checks.HeatmapComparison
|
261
288
|
).import_path
|
289
|
+
VISION_LABEL_DRIFT = source_utils.resolve(
|
290
|
+
vision_checks.LabelDrift
|
291
|
+
).import_path
|
262
292
|
VISION_IMAGE_DATASET_DRIFT = source_utils.resolve(
|
263
293
|
vision_checks.ImageDatasetDrift
|
264
294
|
).import_path
|
@@ -268,9 +298,6 @@ class DeepchecksDataDriftCheck(DeepchecksValidationCheck):
|
|
268
298
|
VISION_NEW_LABELS = source_utils.resolve(
|
269
299
|
vision_checks.NewLabels
|
270
300
|
).import_path
|
271
|
-
VISION_TRAIN_TEST_LABEL_DRIFT = source_utils.resolve(
|
272
|
-
vision_checks.TrainTestLabelDrift
|
273
|
-
).import_path
|
274
301
|
|
275
302
|
|
276
303
|
class DeepchecksModelValidationCheck(DeepchecksValidationCheck):
|
@@ -296,6 +323,12 @@ class DeepchecksModelValidationCheck(DeepchecksValidationCheck):
|
|
296
323
|
TABULAR_MODEL_INFERENCE_TIME = source_utils.resolve(
|
297
324
|
tabular_checks.ModelInferenceTime
|
298
325
|
).import_path
|
326
|
+
TABULAR_MODEL_INFO = source_utils.resolve(
|
327
|
+
tabular_checks.ModelInfo
|
328
|
+
).import_path
|
329
|
+
TABULAR_PERFORMANCE_BIAS = source_utils.resolve(
|
330
|
+
tabular_checks.model_evaluation.PerformanceBias
|
331
|
+
).import_path
|
299
332
|
TABULAR_REGRESSION_ERROR_DISTRIBUTION = source_utils.resolve(
|
300
333
|
tabular_checks.RegressionErrorDistribution
|
301
334
|
).import_path
|
@@ -308,6 +341,18 @@ class DeepchecksModelValidationCheck(DeepchecksValidationCheck):
|
|
308
341
|
TABULAR_SEGMENT_PERFORMANCE = source_utils.resolve(
|
309
342
|
tabular_checks.SegmentPerformance
|
310
343
|
).import_path
|
344
|
+
TABULAR_WEAK_SEGMENT_PERFORMANCE = source_utils.resolve(
|
345
|
+
tabular_checks.WeakSegmentsPerformance
|
346
|
+
).import_path
|
347
|
+
TABULAR_SINGLE_DATASET_PERFORMANCE = source_utils.resolve(
|
348
|
+
tabular_checks.SingleDatasetPerformance
|
349
|
+
).import_path
|
350
|
+
TABULAR_TRAIN_TEST_PERFORMANCE = source_utils.resolve(
|
351
|
+
tabular_checks.TrainTestPerformance
|
352
|
+
).import_path
|
353
|
+
TABULAR_MULTI_MODEL_PERFORMANCE_REPORT = source_utils.resolve(
|
354
|
+
tabular_checks.MultiModelPerformanceReport
|
355
|
+
).import_path
|
311
356
|
|
312
357
|
VISION_CONFUSION_MATRIX_REPORT = source_utils.resolve(
|
313
358
|
vision_checks.ConfusionMatrixReport
|
@@ -318,6 +363,12 @@ class DeepchecksModelValidationCheck(DeepchecksValidationCheck):
|
|
318
363
|
VISION_MEAN_AVERAGE_RECALL_REPORT = source_utils.resolve(
|
319
364
|
vision_checks.MeanAverageRecallReport
|
320
365
|
).import_path
|
366
|
+
VISION_SINGLE_DATASET_PERFORMANCE = source_utils.resolve(
|
367
|
+
vision_checks.SingleDatasetPerformance
|
368
|
+
).import_path
|
369
|
+
VISION_WEAK_SEGMENT_PERFORMANCE = source_utils.resolve(
|
370
|
+
vision_checks.WeakSegmentsPerformance
|
371
|
+
).import_path
|
321
372
|
|
322
373
|
|
323
374
|
class DeepchecksModelDriftCheck(DeepchecksValidationCheck):
|
@@ -343,6 +394,9 @@ class DeepchecksModelDriftCheck(DeepchecksValidationCheck):
|
|
343
394
|
TABULAR_TRAIN_TEST_PREDICTION_DRIFT = source_utils.resolve(
|
344
395
|
tabular_checks.TrainTestPredictionDrift
|
345
396
|
).import_path
|
397
|
+
TABULAR_PREDICTION_DRIFT = source_utils.resolve(
|
398
|
+
tabular_checks.PredictionDrift
|
399
|
+
).import_path
|
346
400
|
TABULAR_UNUSED_FEATURES = source_utils.resolve(
|
347
401
|
tabular_checks.UnusedFeatures
|
348
402
|
).import_path
|
@@ -356,3 +410,6 @@ class DeepchecksModelDriftCheck(DeepchecksValidationCheck):
|
|
356
410
|
VISION_TRAIN_TEST_PREDICTION_DRIFT = source_utils.resolve(
|
357
411
|
vision_checks.TrainTestPredictionDrift
|
358
412
|
).import_path
|
413
|
+
VISION_PREDICTION_DRIFT = source_utils.resolve(
|
414
|
+
vision_checks.PredictionDrift
|
415
|
+
).import_path
|
@@ -250,6 +250,7 @@ class SkypilotBaseOrchestrator(ContainerizedOrchestrator):
|
|
250
250
|
entrypoint_str = " ".join(command)
|
251
251
|
arguments_str = " ".join(args)
|
252
252
|
|
253
|
+
task_envs = environment
|
253
254
|
docker_environment_str = " ".join(
|
254
255
|
f"-e {k}={v}" for k, v in environment.items()
|
255
256
|
)
|
@@ -271,13 +272,10 @@ class SkypilotBaseOrchestrator(ContainerizedOrchestrator):
|
|
271
272
|
f"sudo docker login --username $DOCKER_USERNAME --password "
|
272
273
|
f"$DOCKER_PASSWORD {stack.container_registry.config.uri}"
|
273
274
|
)
|
274
|
-
task_envs =
|
275
|
-
|
276
|
-
"DOCKER_PASSWORD": docker_password,
|
277
|
-
}
|
275
|
+
task_envs["DOCKER_USERNAME"] = docker_username
|
276
|
+
task_envs["DOCKER_PASSWORD"] = docker_password
|
278
277
|
else:
|
279
278
|
setup = None
|
280
|
-
task_envs = None
|
281
279
|
|
282
280
|
# Run the entire pipeline
|
283
281
|
|
@@ -285,15 +283,22 @@ class SkypilotBaseOrchestrator(ContainerizedOrchestrator):
|
|
285
283
|
self.prepare_environment_variable(set=True)
|
286
284
|
|
287
285
|
try:
|
286
|
+
if isinstance(self.cloud, sky.clouds.Kubernetes):
|
287
|
+
run_command = f"${{VIRTUAL_ENV:+$VIRTUAL_ENV/bin/}}{entrypoint_str} {arguments_str}"
|
288
|
+
setup = None
|
289
|
+
down = False
|
290
|
+
idle_minutes_to_autostop = None
|
291
|
+
else:
|
292
|
+
run_command = f"sudo docker run --rm {custom_run_args}{docker_environment_str} {image} {entrypoint_str} {arguments_str}"
|
293
|
+
down = settings.down
|
294
|
+
idle_minutes_to_autostop = settings.idle_minutes_to_autostop
|
288
295
|
task = sky.Task(
|
289
|
-
run=
|
296
|
+
run=run_command,
|
290
297
|
setup=setup,
|
291
298
|
envs=task_envs,
|
292
299
|
)
|
293
|
-
logger.debug(
|
294
|
-
|
295
|
-
)
|
296
|
-
logger.debug(f"Running run: {setup}")
|
300
|
+
logger.debug(f"Running run: {run_command}")
|
301
|
+
|
297
302
|
task = task.set_resources(
|
298
303
|
sky.Resources(
|
299
304
|
cloud=self.cloud,
|
@@ -306,15 +311,24 @@ class SkypilotBaseOrchestrator(ContainerizedOrchestrator):
|
|
306
311
|
job_recovery=settings.job_recovery,
|
307
312
|
region=settings.region,
|
308
313
|
zone=settings.zone,
|
309
|
-
image_id=
|
314
|
+
image_id=image
|
315
|
+
if isinstance(self.cloud, sky.clouds.Kubernetes)
|
316
|
+
else settings.image_id,
|
310
317
|
disk_size=settings.disk_size,
|
311
318
|
disk_tier=settings.disk_tier,
|
312
319
|
)
|
313
320
|
)
|
314
|
-
|
315
321
|
# Set the cluster name
|
316
|
-
|
317
|
-
|
322
|
+
if settings.cluster_name:
|
323
|
+
sky.exec(
|
324
|
+
task,
|
325
|
+
settings.cluster_name,
|
326
|
+
down=down,
|
327
|
+
stream_logs=settings.stream_logs,
|
328
|
+
backend=None,
|
329
|
+
detach_run=True,
|
330
|
+
)
|
331
|
+
else:
|
318
332
|
# Find existing cluster
|
319
333
|
for i in sky.status(refresh=True):
|
320
334
|
if isinstance(
|
@@ -324,21 +338,19 @@ class SkypilotBaseOrchestrator(ContainerizedOrchestrator):
|
|
324
338
|
logger.info(
|
325
339
|
f"Found existing cluster {cluster_name}. Reusing..."
|
326
340
|
)
|
327
|
-
if cluster_name is None:
|
328
341
|
cluster_name = self.sanitize_cluster_name(
|
329
342
|
f"{orchestrator_run_name}"
|
330
343
|
)
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
)
|
344
|
+
# Launch the cluster
|
345
|
+
sky.launch(
|
346
|
+
task,
|
347
|
+
cluster_name,
|
348
|
+
retry_until_up=settings.retry_until_up,
|
349
|
+
idle_minutes_to_autostop=idle_minutes_to_autostop,
|
350
|
+
down=down,
|
351
|
+
stream_logs=settings.stream_logs,
|
352
|
+
detach_setup=True,
|
353
|
+
)
|
342
354
|
|
343
355
|
except Exception as e:
|
344
356
|
logger.error(f"Pipeline run failed: {e}")
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# Copyright (c) ZenML GmbH 2024. All Rights Reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at:
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
12
|
+
# or implied. See the License for the specific language governing
|
13
|
+
# permissions and limitations under the License.
|
14
|
+
"""Initialization of the Skypilot Kubernetes integration for ZenML.
|
15
|
+
|
16
|
+
The Skypilot integration sub-module powers an alternative to the local
|
17
|
+
orchestrator for a remote orchestration of ZenML pipelines on VMs.
|
18
|
+
"""
|
19
|
+
from typing import List, Type
|
20
|
+
|
21
|
+
from zenml.integrations.constants import (
|
22
|
+
SKYPILOT_KUBERNETES,
|
23
|
+
)
|
24
|
+
from zenml.integrations.integration import Integration
|
25
|
+
from zenml.stack import Flavor
|
26
|
+
|
27
|
+
SKYPILOT_KUBERNETES_ORCHESTRATOR_FLAVOR = "vm_kubernetes"
|
28
|
+
|
29
|
+
|
30
|
+
class SkypilotKubernetesIntegration(Integration):
|
31
|
+
"""Definition of Skypilot Kubernetes Integration for ZenML."""
|
32
|
+
|
33
|
+
NAME = SKYPILOT_KUBERNETES
|
34
|
+
# all 0.6.x versions of skypilot[kubernetes] are compatible
|
35
|
+
REQUIREMENTS = ["skypilot[kubernetes]~=0.6.1"]
|
36
|
+
APT_PACKAGES = ["openssh-client", "rsync"]
|
37
|
+
|
38
|
+
@classmethod
|
39
|
+
def flavors(cls) -> List[Type[Flavor]]:
|
40
|
+
"""Declare the stack component flavors for the Skypilot Kubernetes integration.
|
41
|
+
|
42
|
+
Returns:
|
43
|
+
List of stack component flavors for this integration.
|
44
|
+
"""
|
45
|
+
from zenml.integrations.skypilot_kubernetes.flavors import (
|
46
|
+
SkypilotKubernetesOrchestratorFlavor,
|
47
|
+
)
|
48
|
+
|
49
|
+
return [SkypilotKubernetesOrchestratorFlavor]
|
50
|
+
|
51
|
+
|
52
|
+
SkypilotKubernetesIntegration.check_installation()
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Copyright (c) ZenML GmbH 2024. All Rights Reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at:
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
12
|
+
# or implied. See the License for the specific language governing
|
13
|
+
# permissions and limitations under the License.
|
14
|
+
"""Skypilot integration flavor for Skypilot Kubernetes orchestrator."""
|
15
|
+
|
16
|
+
from zenml.integrations.skypilot_kubernetes.flavors.skypilot_orchestrator_kubernetes_vm_flavor import (
|
17
|
+
SkypilotKubernetesOrchestratorConfig,
|
18
|
+
SkypilotKubernetesOrchestratorFlavor,
|
19
|
+
SkypilotKubernetesOrchestratorSettings,
|
20
|
+
)
|
21
|
+
|
22
|
+
__all__ = [
|
23
|
+
"SkypilotKubernetesOrchestratorConfig",
|
24
|
+
"SkypilotKubernetesOrchestratorFlavor",
|
25
|
+
"SkypilotKubernetesOrchestratorSettings",
|
26
|
+
]
|
@@ -0,0 +1,125 @@
|
|
1
|
+
# Copyright (c) ZenML GmbH 2023. All Rights Reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at:
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
12
|
+
# or implied. See the License for the specific language governing
|
13
|
+
# permissions and limitations under the License.
|
14
|
+
"""Skypilot orchestrator Kubernetes flavor."""
|
15
|
+
|
16
|
+
from typing import TYPE_CHECKING, Optional, Type
|
17
|
+
|
18
|
+
from zenml.constants import KUBERNETES_CLUSTER_RESOURCE_TYPE
|
19
|
+
from zenml.integrations.skypilot.flavors.skypilot_orchestrator_base_vm_config import (
|
20
|
+
SkypilotBaseOrchestratorConfig,
|
21
|
+
SkypilotBaseOrchestratorSettings,
|
22
|
+
)
|
23
|
+
from zenml.integrations.skypilot_kubernetes import (
|
24
|
+
SKYPILOT_KUBERNETES_ORCHESTRATOR_FLAVOR,
|
25
|
+
)
|
26
|
+
from zenml.logger import get_logger
|
27
|
+
from zenml.models import ServiceConnectorRequirements
|
28
|
+
from zenml.orchestrators import BaseOrchestratorConfig, BaseOrchestratorFlavor
|
29
|
+
|
30
|
+
if TYPE_CHECKING:
|
31
|
+
from zenml.integrations.skypilot_kubernetes.orchestrators import (
|
32
|
+
SkypilotKubernetesOrchestrator,
|
33
|
+
)
|
34
|
+
|
35
|
+
|
36
|
+
logger = get_logger(__name__)
|
37
|
+
|
38
|
+
|
39
|
+
class SkypilotKubernetesOrchestratorSettings(SkypilotBaseOrchestratorSettings):
|
40
|
+
"""Skypilot orchestrator settings."""
|
41
|
+
|
42
|
+
|
43
|
+
class SkypilotKubernetesOrchestratorConfig(
|
44
|
+
SkypilotBaseOrchestratorConfig, SkypilotKubernetesOrchestratorSettings
|
45
|
+
):
|
46
|
+
"""Skypilot orchestrator config."""
|
47
|
+
|
48
|
+
|
49
|
+
class SkypilotKubernetesOrchestratorFlavor(BaseOrchestratorFlavor):
|
50
|
+
"""Flavor for the Skypilot Kubernetes orchestrator."""
|
51
|
+
|
52
|
+
@property
|
53
|
+
def name(self) -> str:
|
54
|
+
"""Name of the orchestrator flavor.
|
55
|
+
|
56
|
+
Returns:
|
57
|
+
Name of the orchestrator flavor.
|
58
|
+
"""
|
59
|
+
return SKYPILOT_KUBERNETES_ORCHESTRATOR_FLAVOR
|
60
|
+
|
61
|
+
@property
|
62
|
+
def service_connector_requirements(
|
63
|
+
self,
|
64
|
+
) -> Optional[ServiceConnectorRequirements]:
|
65
|
+
"""Service connector resource requirements for service connectors.
|
66
|
+
|
67
|
+
Specifies resource requirements that are used to filter the available
|
68
|
+
service connector types that are compatible with this flavor.
|
69
|
+
|
70
|
+
Returns:
|
71
|
+
Requirements for compatible service connectors, if a service
|
72
|
+
connector is required for this flavor.
|
73
|
+
"""
|
74
|
+
return ServiceConnectorRequirements(
|
75
|
+
resource_type=KUBERNETES_CLUSTER_RESOURCE_TYPE,
|
76
|
+
)
|
77
|
+
|
78
|
+
@property
|
79
|
+
def docs_url(self) -> Optional[str]:
|
80
|
+
"""A url to point at docs explaining this flavor.
|
81
|
+
|
82
|
+
Returns:
|
83
|
+
A flavor docs url.
|
84
|
+
"""
|
85
|
+
return self.generate_default_docs_url()
|
86
|
+
|
87
|
+
@property
|
88
|
+
def sdk_docs_url(self) -> Optional[str]:
|
89
|
+
"""A url to point at SDK docs explaining this flavor.
|
90
|
+
|
91
|
+
Returns:
|
92
|
+
A flavor SDK docs url.
|
93
|
+
"""
|
94
|
+
return self.generate_default_sdk_docs_url()
|
95
|
+
|
96
|
+
@property
|
97
|
+
def logo_url(self) -> str:
|
98
|
+
"""A url to represent the flavor in the dashboard.
|
99
|
+
|
100
|
+
Returns:
|
101
|
+
The flavor logo.
|
102
|
+
"""
|
103
|
+
return "https://public-flavor-logos.s3.eu-central-1.amazonaws.com/orchestrator/kubernetes-skypilot.png"
|
104
|
+
|
105
|
+
@property
|
106
|
+
def config_class(self) -> Type[BaseOrchestratorConfig]:
|
107
|
+
"""Config class for the base orchestrator flavor.
|
108
|
+
|
109
|
+
Returns:
|
110
|
+
The config class.
|
111
|
+
"""
|
112
|
+
return SkypilotKubernetesOrchestratorConfig
|
113
|
+
|
114
|
+
@property
|
115
|
+
def implementation_class(self) -> Type["SkypilotKubernetesOrchestrator"]:
|
116
|
+
"""Implementation class for this flavor.
|
117
|
+
|
118
|
+
Returns:
|
119
|
+
Implementation class for this flavor.
|
120
|
+
"""
|
121
|
+
from zenml.integrations.skypilot_kubernetes.orchestrators import (
|
122
|
+
SkypilotKubernetesOrchestrator,
|
123
|
+
)
|
124
|
+
|
125
|
+
return SkypilotKubernetesOrchestrator
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# Copyright (c) ZenML GmbH 2024. All Rights Reserved.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at:
|
6
|
+
#
|
7
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
|
12
|
+
# or implied. See the License for the specific language governing
|
13
|
+
# permissions and limitations under the License.
|
14
|
+
"""Initialization of the Skypilot Kubernetes ZenML orchestrator."""
|
15
|
+
|
16
|
+
from zenml.integrations.skypilot.orchestrators.skypilot_base_vm_orchestrator import ( # noqa
|
17
|
+
SkypilotBaseOrchestrator,
|
18
|
+
)
|
19
|
+
from zenml.integrations.skypilot_kubernetes.orchestrators.skypilot_kubernetes_vm_orchestrator import ( # noqa
|
20
|
+
SkypilotKubernetesOrchestrator,
|
21
|
+
)
|
22
|
+
__all__ = [
|
23
|
+
"SkypilotBaseOrchestrator",
|
24
|
+
"SkypilotKubernetesOrchestrator",
|
25
|
+
]
|