zenml-nightly 0.57.1.dev20240523__py3-none-any.whl → 0.58.0.dev20240528__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.
- README.md +1 -1
- RELEASE_NOTES.md +88 -0
- zenml/VERSION +1 -1
- zenml/cli/base.py +15 -16
- zenml/client.py +11 -1
- zenml/config/__init__.py +2 -0
- zenml/config/compiler.py +2 -2
- zenml/config/pipeline_configurations.py +2 -0
- zenml/config/pipeline_run_configuration.py +2 -0
- zenml/config/retry_config.py +27 -0
- zenml/config/server_config.py +13 -9
- zenml/config/step_configurations.py +2 -0
- zenml/constants.py +1 -0
- zenml/integrations/kubernetes/flavors/kubernetes_orchestrator_flavor.py +2 -0
- zenml/integrations/kubernetes/orchestrators/kubernetes_orchestrator.py +14 -0
- zenml/integrations/kubernetes/orchestrators/manifest_utils.py +4 -0
- zenml/integrations/mlflow/steps/mlflow_deployer.py +1 -1
- zenml/integrations/slack/alerters/slack_alerter.py +0 -2
- zenml/model/model.py +77 -45
- zenml/models/v2/core/model_version.py +1 -1
- zenml/models/v2/core/pipeline_run.py +12 -0
- zenml/models/v2/core/step_run.py +12 -0
- zenml/models/v2/misc/server_models.py +9 -3
- zenml/new/pipelines/run_utils.py +8 -2
- zenml/new/steps/step_context.py +6 -6
- zenml/new/steps/step_decorator.py +5 -0
- zenml/orchestrators/step_launcher.py +71 -53
- zenml/orchestrators/step_runner.py +28 -134
- zenml/orchestrators/utils.py +158 -1
- zenml/steps/base_step.py +16 -9
- zenml/utils/dashboard_utils.py +4 -8
- zenml/zen_server/dashboard/assets/{404-DtHkZQ2t.js → 404-DIgYOHj5.js} +1 -1
- zenml/zen_server/dashboard/assets/{@reactflow-BfgHyCG7.js → @reactflow-CF_wPv-n.js} +1 -1
- zenml/zen_server/dashboard/assets/{AwarenessChannel--3KuLcwp.js → AwarenessChannel-CqRB1HO9.js} +1 -1
- zenml/zen_server/dashboard/assets/{Cards-BzhQtXRm.js → Cards-DuJ8uYGM.js} +1 -1
- zenml/zen_server/dashboard/assets/{CodeSnippet-DpWTCS7Y.js → CodeSnippet-CBFcxTGW.js} +1 -1
- zenml/zen_server/dashboard/assets/Commands-BQb0_PAa.js +1 -0
- zenml/zen_server/dashboard/assets/CopyButton-BOFZCr5Z.js +2 -0
- zenml/zen_server/dashboard/assets/{CsvVizualization-B9nkywOx.js → CsvVizualization-D4QRvdDk.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-BbzLqrpR.js → Error-C9i5GdiH.js} +1 -1
- zenml/zen_server/dashboard/assets/{Helpbox-SS5TXXFE.js → Helpbox-CnuWjxcc.js} +1 -1
- zenml/zen_server/dashboard/assets/{Infobox-CV3EG_9t.js → Infobox-DV6YqO5N.js} +1 -1
- zenml/zen_server/dashboard/assets/{InlineAvatar-wz4SSxG5.js → InlineAvatar-DE_1-SDN.js} +1 -1
- zenml/zen_server/dashboard/assets/{PageHeader-Bz7qVuF9.js → PageHeader-D7r1Jb6H.js} +1 -1
- zenml/zen_server/dashboard/assets/{Pagination-BEP_9EMH.js → Pagination-0-Hv-4DJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{SetPassword-B0yU0HIe.js → SetPassword-074iDZCm.js} +1 -1
- zenml/zen_server/dashboard/assets/SuccessStep-DEeKB0Wq.js +1 -0
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-yy-qBmO9.js → UpdatePasswordSchemas-4be5el9x.js} +1 -1
- zenml/zen_server/dashboard/assets/{cloud-only-DhayG_Yj.js → cloud-only-lInATL8-.js} +1 -1
- zenml/zen_server/dashboard/assets/connectors-video-C9qY4syJ.svg +21 -0
- zenml/zen_server/dashboard/assets/{index-Bbgc_ynV.css → index-D4zsM9tz.css} +1 -1
- zenml/zen_server/dashboard/assets/{index-UnEiujvd.js → index-DKgtNG83.js} +3 -3
- zenml/zen_server/dashboard/assets/{login-mutation-uNylFM6V.js → login-mutation-BfEeVmSl.js} +1 -1
- zenml/zen_server/dashboard/assets/{not-found-CvNr1Owb.js → not-found-an_3Z-Ep.js} +1 -1
- zenml/zen_server/dashboard/assets/page-0AGNIDYi.js +1 -0
- zenml/zen_server/dashboard/assets/{page-1rE3Idho.js → page-68OLHx44.js} +2 -2
- zenml/zen_server/dashboard/assets/page-6Gp_NCQL.js +14 -0
- zenml/zen_server/dashboard/assets/{page-BAuah6Do.js → page-B90yVxNb.js} +1 -1
- zenml/zen_server/dashboard/assets/page-Ba5l9-eg.js +1 -0
- zenml/zen_server/dashboard/assets/{page-BCpiaYh8.js → page-BiyORkbM.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DIZKf8ZO.js → page-Bjj9GHVF.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CM80cPrr.js → page-BnrWbXYJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CjxYF1Om.js → page-C0opS_t4.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BldrIvaZ.js → page-C1Jl09zF.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BVZ01rdG.js → page-C6Xn5o3F.js} +1 -1
- zenml/zen_server/dashboard/assets/page-CUqLUGbU.js +1 -0
- zenml/zen_server/dashboard/assets/page-CWpGAjSi.js +1 -0
- zenml/zen_server/dashboard/assets/{page-Btc7hKsa.js → page-Cea5XeRB.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BBUhx49Q.js → page-DFQa6C6e.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DVAcOIuw.js +1 -0
- zenml/zen_server/dashboard/assets/{page-aQgPR2HA.js → page-Dn87PjPv.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-sPFYi62U.js → page-GXA0bsIT.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-PQQVONmL.js → page-NTQrxRsu.js} +2 -2
- zenml/zen_server/dashboard/assets/page-NlxFzoaz.js +1 -0
- zenml/zen_server/dashboard/assets/page-ZJ5Cy_-x.js +1 -0
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-B8N8nrWI.js → update-server-settings-mutation-CdcOI8-c.js} +1 -1
- zenml/zen_server/dashboard/assets/url-DLJUVIKc.js +1 -0
- 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.36c2742fac555eaab6995df9d81c08ab.js → precache-manifest.05e51e85bd64770b2708d408a88d7028.js} +4 -4
- zenml/zen_server/dashboard_legacy/service-worker.js +1 -1
- zenml/zen_server/dashboard_legacy/static/js/{main.1c1aaa11.chunk.js → main.41d438ec.chunk.js} +2 -2
- zenml/zen_server/dashboard_legacy/static/js/{main.1c1aaa11.chunk.js.map → main.41d438ec.chunk.js.map} +1 -1
- zenml/zen_server/deploy/helm/Chart.yaml +1 -1
- zenml/zen_server/deploy/helm/README.md +2 -2
- zenml/zen_server/deploy/helm/templates/_environment.tpl +5 -5
- zenml/zen_server/deploy/helm/values.yaml +13 -9
- zenml/zen_server/pipeline_deployment/utils.py +6 -2
- zenml/zen_server/routers/auth_endpoints.py +4 -4
- zenml/zen_server/zen_server_api.py +1 -1
- zenml/zen_stores/base_zen_store.py +2 -2
- zenml/zen_stores/migrations/versions/0.58.0_release.py +23 -0
- zenml/zen_stores/schemas/artifact_schemas.py +11 -2
- zenml/zen_stores/schemas/pipeline_run_schemas.py +12 -0
- zenml/zen_stores/schemas/step_run_schemas.py +17 -1
- zenml/zen_stores/sql_zen_store.py +9 -5
- {zenml_nightly-0.57.1.dev20240523.dist-info → zenml_nightly-0.58.0.dev20240528.dist-info}/METADATA +4 -4
- {zenml_nightly-0.57.1.dev20240523.dist-info → zenml_nightly-0.58.0.dev20240528.dist-info}/RECORD +102 -101
- zenml/zen_server/dashboard/assets/Commands-fpiuAaZ1.js +0 -1
- zenml/zen_server/dashboard/assets/CopyButton-DVKNxLl5.js +0 -2
- zenml/zen_server/dashboard/assets/SuccessStep-B8Qhr2kK.js +0 -1
- zenml/zen_server/dashboard/assets/VideoModal-qB9JWw-2.js +0 -1
- zenml/zen_server/dashboard/assets/page-3NFpYOpt.js +0 -1
- zenml/zen_server/dashboard/assets/page-BE7NJ8PH.js +0 -1
- zenml/zen_server/dashboard/assets/page-BTYWG9gF.js +0 -1
- zenml/zen_server/dashboard/assets/page-BuBHmjwQ.js +0 -1
- zenml/zen_server/dashboard/assets/page-C-Jw_wjv.js +0 -1
- zenml/zen_server/dashboard/assets/page-CeMgQAs7.js +0 -14
- zenml/zen_server/dashboard/assets/page-X0_g3JVr.js +0 -1
- zenml/zen_server/dashboard/assets/page-ijCkM2BW.js +0 -1
- zenml/zen_server/dashboard/assets/refresh-CdiBx6nL.js +0 -1
- zenml/zen_server/dashboard/assets/url-BxOqGmlk.js +0 -1
- {zenml_nightly-0.57.1.dev20240523.dist-info → zenml_nightly-0.58.0.dev20240528.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.57.1.dev20240523.dist-info → zenml_nightly-0.58.0.dev20240528.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.57.1.dev20240523.dist-info → zenml_nightly-0.58.0.dev20240528.dist-info}/entry_points.txt +0 -0
zenml/orchestrators/utils.py
CHANGED
@@ -15,13 +15,14 @@
|
|
15
15
|
|
16
16
|
import random
|
17
17
|
from datetime import datetime
|
18
|
-
from typing import TYPE_CHECKING, Dict, Optional
|
18
|
+
from typing import TYPE_CHECKING, Dict, List, Optional, Set, Tuple
|
19
19
|
from uuid import UUID
|
20
20
|
|
21
21
|
from zenml.client import Client
|
22
22
|
from zenml.config.global_config import (
|
23
23
|
GlobalConfiguration,
|
24
24
|
)
|
25
|
+
from zenml.config.source import Source
|
25
26
|
from zenml.constants import (
|
26
27
|
ENV_ZENML_ACTIVE_STACK_ID,
|
27
28
|
ENV_ZENML_ACTIVE_WORKSPACE_ID,
|
@@ -29,8 +30,16 @@ from zenml.constants import (
|
|
29
30
|
PIPELINE_API_TOKEN_EXPIRES_MINUTES,
|
30
31
|
)
|
31
32
|
from zenml.enums import StoreType
|
33
|
+
from zenml.exceptions import StepContextError
|
34
|
+
from zenml.model.utils import link_artifact_config_to_model
|
35
|
+
from zenml.models.v2.core.step_run import StepRunRequest
|
36
|
+
from zenml.new.steps.step_context import get_step_context
|
32
37
|
|
33
38
|
if TYPE_CHECKING:
|
39
|
+
from zenml.artifacts.external_artifact_config import (
|
40
|
+
ExternalArtifactConfiguration,
|
41
|
+
)
|
42
|
+
from zenml.model.model import Model
|
34
43
|
from zenml.models import PipelineDeploymentResponse
|
35
44
|
|
36
45
|
|
@@ -148,3 +157,151 @@ def get_run_name(run_name_template: str) -> str:
|
|
148
157
|
raise ValueError("Empty run names are not allowed.")
|
149
158
|
|
150
159
|
return run_name
|
160
|
+
|
161
|
+
|
162
|
+
def _link_pipeline_run_to_model_from_context(
|
163
|
+
pipeline_run_id: "UUID", model: Optional["Model"] = None
|
164
|
+
) -> None:
|
165
|
+
"""Links the pipeline run to the model version using artifacts data.
|
166
|
+
|
167
|
+
Args:
|
168
|
+
pipeline_run_id: The ID of the current pipeline run.
|
169
|
+
model: Model configured in the step
|
170
|
+
"""
|
171
|
+
from zenml.models import ModelVersionPipelineRunRequest
|
172
|
+
|
173
|
+
if not model:
|
174
|
+
model_id, model_version_id = _get_model_versions_from_config()
|
175
|
+
else:
|
176
|
+
model_id, model_version_id = model.model_id, model.id
|
177
|
+
|
178
|
+
if model_id and model_version_id:
|
179
|
+
Client().zen_store.create_model_version_pipeline_run_link(
|
180
|
+
ModelVersionPipelineRunRequest(
|
181
|
+
user=Client().active_user.id,
|
182
|
+
workspace=Client().active_workspace.id,
|
183
|
+
pipeline_run=pipeline_run_id,
|
184
|
+
model=model_id,
|
185
|
+
model_version=model_version_id,
|
186
|
+
)
|
187
|
+
)
|
188
|
+
|
189
|
+
|
190
|
+
def _get_model_versions_from_config() -> Tuple[Optional[UUID], Optional[UUID]]:
|
191
|
+
"""Gets the model versions from the step model version.
|
192
|
+
|
193
|
+
Returns:
|
194
|
+
Tuple of (model_id, model_version_id).
|
195
|
+
"""
|
196
|
+
try:
|
197
|
+
mc = get_step_context().model
|
198
|
+
return mc.model_id, mc.id
|
199
|
+
except StepContextError:
|
200
|
+
return None, None
|
201
|
+
|
202
|
+
|
203
|
+
def _link_cached_artifacts_to_model(
|
204
|
+
model_from_context: Optional["Model"],
|
205
|
+
step_run: StepRunRequest,
|
206
|
+
step_source: Source,
|
207
|
+
) -> None:
|
208
|
+
"""Links the output artifacts of the cached step to the model version in Control Plane.
|
209
|
+
|
210
|
+
Args:
|
211
|
+
model_from_context: The model version of the current step.
|
212
|
+
step_run: The step to run.
|
213
|
+
step_source: The source of the step.
|
214
|
+
"""
|
215
|
+
from zenml.artifacts.artifact_config import ArtifactConfig
|
216
|
+
from zenml.steps.base_step import BaseStep
|
217
|
+
from zenml.steps.utils import parse_return_type_annotations
|
218
|
+
|
219
|
+
step_instance = BaseStep.load_from_source(step_source)
|
220
|
+
output_annotations = parse_return_type_annotations(
|
221
|
+
step_instance.entrypoint
|
222
|
+
)
|
223
|
+
for output_name_, output_id in step_run.outputs.items():
|
224
|
+
artifact_config_ = None
|
225
|
+
if output_name_ in output_annotations:
|
226
|
+
annotation = output_annotations.get(output_name_, None)
|
227
|
+
if annotation and annotation.artifact_config is not None:
|
228
|
+
artifact_config_ = annotation.artifact_config.copy()
|
229
|
+
# no artifact config found or artifact was produced by `save_artifact`
|
230
|
+
# inside the step body, so was never in annotations
|
231
|
+
if artifact_config_ is None:
|
232
|
+
artifact_config_ = ArtifactConfig(name=output_name_)
|
233
|
+
|
234
|
+
link_artifact_config_to_model(
|
235
|
+
artifact_config=artifact_config_,
|
236
|
+
model=model_from_context,
|
237
|
+
artifact_version_id=output_id,
|
238
|
+
)
|
239
|
+
|
240
|
+
|
241
|
+
def _link_pipeline_run_to_model_from_artifacts(
|
242
|
+
pipeline_run_id: UUID,
|
243
|
+
artifact_names: List[str],
|
244
|
+
external_artifacts: List["ExternalArtifactConfiguration"],
|
245
|
+
) -> None:
|
246
|
+
"""Links the pipeline run to the model version using artifacts data.
|
247
|
+
|
248
|
+
Args:
|
249
|
+
pipeline_run_id: The ID of the current pipeline run.
|
250
|
+
artifact_names: The name of the published output artifacts.
|
251
|
+
external_artifacts: The external artifacts of the step.
|
252
|
+
"""
|
253
|
+
from zenml.models import ModelVersionPipelineRunRequest
|
254
|
+
|
255
|
+
models = _get_model_versions_from_artifacts(artifact_names)
|
256
|
+
client = Client()
|
257
|
+
|
258
|
+
# Add models from external artifacts
|
259
|
+
for external_artifact in external_artifacts:
|
260
|
+
if external_artifact.model:
|
261
|
+
models.add(
|
262
|
+
(
|
263
|
+
external_artifact.model.model_id,
|
264
|
+
external_artifact.model.id,
|
265
|
+
)
|
266
|
+
)
|
267
|
+
|
268
|
+
for model in models:
|
269
|
+
client.zen_store.create_model_version_pipeline_run_link(
|
270
|
+
ModelVersionPipelineRunRequest(
|
271
|
+
user=client.active_user.id,
|
272
|
+
workspace=client.active_workspace.id,
|
273
|
+
pipeline_run=pipeline_run_id,
|
274
|
+
model=model[0],
|
275
|
+
model_version=model[1],
|
276
|
+
)
|
277
|
+
)
|
278
|
+
|
279
|
+
|
280
|
+
def _get_model_versions_from_artifacts(
|
281
|
+
artifact_names: List[str],
|
282
|
+
) -> Set[Tuple[UUID, UUID]]:
|
283
|
+
"""Gets the model versions from the artifacts.
|
284
|
+
|
285
|
+
Args:
|
286
|
+
artifact_names: The names of the published output artifacts.
|
287
|
+
|
288
|
+
Returns:
|
289
|
+
Set of tuples of (model_id, model_version_id).
|
290
|
+
"""
|
291
|
+
models = set()
|
292
|
+
for artifact_name in artifact_names:
|
293
|
+
artifact_config = (
|
294
|
+
get_step_context()._get_output(artifact_name).artifact_config
|
295
|
+
)
|
296
|
+
if artifact_config is not None:
|
297
|
+
if (model := artifact_config._model) is not None:
|
298
|
+
model_version_response = model._get_or_create_model_version()
|
299
|
+
models.add(
|
300
|
+
(
|
301
|
+
model_version_response.model.id,
|
302
|
+
model_version_response.id,
|
303
|
+
)
|
304
|
+
)
|
305
|
+
else:
|
306
|
+
break
|
307
|
+
return models
|
zenml/steps/base_step.py
CHANGED
@@ -37,6 +37,7 @@ from typing import (
|
|
37
37
|
from pydantic import BaseModel, Extra, ValidationError
|
38
38
|
|
39
39
|
from zenml.client_lazy_loader import ClientLazyLoader
|
40
|
+
from zenml.config.retry_config import StepRetryConfig
|
40
41
|
from zenml.config.source import Source
|
41
42
|
from zenml.constants import STEP_SOURCE_PARAMETER_NAME
|
42
43
|
from zenml.exceptions import MissingStepParameterError, StepInterfaceError
|
@@ -140,6 +141,7 @@ class BaseStep(metaclass=BaseStepMeta):
|
|
140
141
|
on_failure: Optional["HookSpecification"] = None,
|
141
142
|
on_success: Optional["HookSpecification"] = None,
|
142
143
|
model: Optional["Model"] = None,
|
144
|
+
retry: Optional[StepRetryConfig] = None,
|
143
145
|
**kwargs: Any,
|
144
146
|
) -> None:
|
145
147
|
"""Initializes a step.
|
@@ -169,6 +171,7 @@ class BaseStep(metaclass=BaseStepMeta):
|
|
169
171
|
be a function with no arguments, or a source path to such a
|
170
172
|
function (e.g. `module.my_function`).
|
171
173
|
model: configuration of the model version in the Model Control Plane.
|
174
|
+
retry: Configuration for retrying the step in case of failure.
|
172
175
|
**kwargs: Keyword arguments passed to the step.
|
173
176
|
"""
|
174
177
|
from zenml.config.step_configurations import PartialStepConfiguration
|
@@ -188,36 +191,36 @@ class BaseStep(metaclass=BaseStepMeta):
|
|
188
191
|
# We therefore disable caching unless it is explicitly enabled
|
189
192
|
enable_cache = False
|
190
193
|
logger.debug(
|
191
|
-
"Step
|
194
|
+
"Step `%s`: Step context required and caching not "
|
192
195
|
"explicitly enabled.",
|
193
196
|
name,
|
194
197
|
)
|
195
198
|
|
196
199
|
logger.debug(
|
197
|
-
"Step
|
200
|
+
"Step `%s`: Caching %s.",
|
198
201
|
name,
|
199
202
|
"enabled" if enable_cache is not False else "disabled",
|
200
203
|
)
|
201
204
|
logger.debug(
|
202
|
-
"Step
|
205
|
+
"Step `%s`: Artifact metadata %s.",
|
203
206
|
name,
|
204
207
|
"enabled" if enable_artifact_metadata is not False else "disabled",
|
205
208
|
)
|
206
209
|
logger.debug(
|
207
|
-
"Step
|
210
|
+
"Step `%s`: Artifact visualization %s.",
|
208
211
|
name,
|
209
212
|
"enabled"
|
210
213
|
if enable_artifact_visualization is not False
|
211
214
|
else "disabled",
|
212
215
|
)
|
213
216
|
logger.debug(
|
214
|
-
"Step
|
217
|
+
"Step `%s`: logs %s.",
|
215
218
|
name,
|
216
219
|
"enabled" if enable_step_logs is not False else "disabled",
|
217
220
|
)
|
218
221
|
if model is not None:
|
219
222
|
logger.debug(
|
220
|
-
"Step
|
223
|
+
"Step `%s`: Is in Model context %s.",
|
221
224
|
name,
|
222
225
|
{
|
223
226
|
"model": model.name,
|
@@ -242,6 +245,7 @@ class BaseStep(metaclass=BaseStepMeta):
|
|
242
245
|
on_failure=on_failure,
|
243
246
|
on_success=on_success,
|
244
247
|
model=model,
|
248
|
+
retry=retry,
|
245
249
|
)
|
246
250
|
self._verify_and_apply_init_params(*args, **kwargs)
|
247
251
|
|
@@ -475,7 +479,7 @@ class BaseStep(metaclass=BaseStepMeta):
|
|
475
479
|
bound_args = signature.bind_partial(*args, **kwargs)
|
476
480
|
except TypeError as e:
|
477
481
|
raise StepInterfaceError(
|
478
|
-
f"Wrong arguments when calling step
|
482
|
+
f"Wrong arguments when calling step `{self.name}`: {e}"
|
479
483
|
) from e
|
480
484
|
|
481
485
|
artifacts = {}
|
@@ -696,6 +700,7 @@ class BaseStep(metaclass=BaseStepMeta):
|
|
696
700
|
on_success: Optional["HookSpecification"] = None,
|
697
701
|
model: Optional["Model"] = None,
|
698
702
|
merge: bool = True,
|
703
|
+
retry: Optional[StepRetryConfig] = None,
|
699
704
|
) -> T:
|
700
705
|
"""Configures the step.
|
701
706
|
|
@@ -738,6 +743,7 @@ class BaseStep(metaclass=BaseStepMeta):
|
|
738
743
|
configurations. If `False` the given configurations will
|
739
744
|
overwrite all existing ones. See the general description of this
|
740
745
|
method for an example.
|
746
|
+
retry: Configuration for retrying the step in case of failure.
|
741
747
|
|
742
748
|
Returns:
|
743
749
|
The step instance that this method was called on.
|
@@ -807,6 +813,7 @@ class BaseStep(metaclass=BaseStepMeta):
|
|
807
813
|
"failure_hook_source": failure_hook_source,
|
808
814
|
"success_hook_source": success_hook_source,
|
809
815
|
"model": model,
|
816
|
+
"retry": retry,
|
810
817
|
}
|
811
818
|
)
|
812
819
|
config = StepConfigurationUpdate(**values)
|
@@ -1013,7 +1020,7 @@ To avoid this consider setting step parameters only in one place (config or code
|
|
1013
1020
|
if output_name not in allowed_output_names:
|
1014
1021
|
raise StepInterfaceError(
|
1015
1022
|
f"Got unexpected materializers for non-existent "
|
1016
|
-
f"output '{output_name}' in step
|
1023
|
+
f"output '{output_name}' in step `{self.name}`. "
|
1017
1024
|
f"Only materializers for the outputs "
|
1018
1025
|
f"{allowed_output_names} of this step can"
|
1019
1026
|
f" be registered."
|
@@ -1026,7 +1033,7 @@ To avoid this consider setting step parameters only in one place (config or code
|
|
1026
1033
|
):
|
1027
1034
|
raise StepInterfaceError(
|
1028
1035
|
f"Materializer source `{source}` "
|
1029
|
-
f"for output '{output_name}' of step
|
1036
|
+
f"for output '{output_name}' of step `{self.name}` "
|
1030
1037
|
"does not resolve to a `BaseMaterializer` subclass."
|
1031
1038
|
)
|
1032
1039
|
|
zenml/utils/dashboard_utils.py
CHANGED
@@ -42,8 +42,7 @@ def is_cloud_server(server_info: ServerModel) -> bool:
|
|
42
42
|
"""
|
43
43
|
return (
|
44
44
|
"organization_id" in server_info.metadata
|
45
|
-
and
|
46
|
-
and "cloud.zenml.io" in server_info.base_url
|
45
|
+
and "cloud.zenml.io" in server_info.server_url
|
47
46
|
)
|
48
47
|
|
49
48
|
|
@@ -59,7 +58,7 @@ def get_cloud_dashboard_url() -> Optional[str]:
|
|
59
58
|
server_info = client.zen_store.get_store_info()
|
60
59
|
|
61
60
|
if is_cloud_server(server_info):
|
62
|
-
return server_info.
|
61
|
+
return server_info.dashboard_url
|
63
62
|
|
64
63
|
return None
|
65
64
|
|
@@ -80,11 +79,8 @@ def get_server_dashboard_url() -> Tuple[Optional[str], bool]:
|
|
80
79
|
else:
|
81
80
|
suffix = ""
|
82
81
|
|
83
|
-
if server_info.
|
84
|
-
|
85
|
-
# function we want the URL of the dashboard provided by the server
|
86
|
-
# deployment, which for cloud is just the ZenStore URL
|
87
|
-
url = server_info.base_url
|
82
|
+
if server_info.server_url:
|
83
|
+
url = server_info.server_url
|
88
84
|
else:
|
89
85
|
url = client.zen_store.url
|
90
86
|
|
@@ -1 +1 @@
|
|
1
|
-
import{j as e}from"./@tanstack-GFKzItNf.js";import{h as s,r as t}from"./index-
|
1
|
+
import{j as e}from"./@tanstack-GFKzItNf.js";import{h as s,r as t}from"./index-DKgtNG83.js";import{E as r}from"./EmptyState-CPJglRv0.js";import{H as a}from"./help-hEyYkC3q.js";import{L as o}from"./@react-router-CCpyfPW-.js";import"./@radix-BrEjOMvl.js";import"./@reactflow-CF_wPv-n.js";function d(){return e.jsx("div",{className:"flex min-h-screen w-full flex-col",children:e.jsx(r,{icon:e.jsx(a,{className:"h-[120px] w-[120px] fill-neutral-300"}),children:e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"mb-2 text-display-xs font-semibold",children:"We can't find the page you are looking for"}),e.jsx("p",{className:"text-lg text-theme-text-secondary",children:"You can try typing a different URL or we can bring you back to your Homepage."}),e.jsx("div",{className:"mt-5 flex justify-center",children:e.jsx(s,{size:"md",asChild:!0,children:e.jsx(o,{className:"w-min self-center whitespace-nowrap",to:t.home,children:e.jsx("span",{className:"px-0.5",children:"Go to Home"})})})})]})})})}export{d as default};
|