zenml-nightly 0.72.0.dev20250121__py3-none-any.whl → 0.73.0.dev20250124__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/cli/login.py +2 -0
- zenml/cli/server.py +1 -0
- zenml/cli/service_connectors.py +8 -4
- zenml/cli/stack.py +2 -2
- zenml/config/pipeline_configurations.py +2 -2
- zenml/config/server_config.py +20 -0
- zenml/enums.py +1 -0
- zenml/event_hub/base_event_hub.py +2 -2
- zenml/integrations/airflow/orchestrators/airflow_orchestrator.py +4 -2
- zenml/integrations/aws/__init__.py +2 -1
- zenml/integrations/aws/flavors/sagemaker_orchestrator_flavor.py +15 -0
- zenml/integrations/aws/orchestrators/sagemaker_orchestrator.py +308 -70
- zenml/integrations/gcp/__init__.py +3 -0
- zenml/integrations/gcp/experiment_trackers/__init__.py +18 -0
- zenml/integrations/gcp/experiment_trackers/vertex_experiment_tracker.py +214 -0
- zenml/integrations/gcp/flavors/__init__.py +6 -0
- zenml/integrations/gcp/flavors/vertex_experiment_tracker_flavor.py +199 -0
- zenml/integrations/huggingface/__init__.py +1 -6
- zenml/integrations/kubernetes/orchestrators/kube_utils.py +2 -2
- zenml/integrations/mlflow/experiment_trackers/mlflow_experiment_tracker.py +0 -1
- zenml/integrations/whylogs/data_validators/whylogs_data_validator.py +3 -1
- zenml/models/v2/core/api_key.py +2 -2
- zenml/models/v2/core/schedule.py +16 -1
- zenml/orchestrators/publish_utils.py +4 -4
- zenml/orchestrators/step_launcher.py +3 -3
- zenml/orchestrators/step_run_utils.py +2 -2
- zenml/pipelines/run_utils.py +2 -2
- zenml/service_connectors/service_connector.py +2 -2
- zenml/stack/stack.py +3 -3
- zenml/stack/stack_component.py +10 -2
- zenml/stack_deployments/stack_deployment.py +5 -0
- zenml/utils/git_utils.py +1 -1
- zenml/utils/string_utils.py +2 -2
- zenml/zen_server/auth.py +13 -6
- zenml/zen_server/dashboard/assets/{404-Dfq64Boz.js → 404-c8OuXDAT.js} +1 -1
- zenml/zen_server/dashboard/assets/{@reactflow-BUNIMFeC.js → @reactflow-6JPoencd.js} +1 -1
- zenml/zen_server/dashboard/assets/{AlertDialogDropdownItem-B73Vs10T.js → AlertDialogDropdownItem-8yPFDxEI.js} +1 -1
- zenml/zen_server/dashboard/assets/{CodeSnippet-DIJRT2NT.js → CodeSnippet-Qh1ae_DJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{CollapsibleCard-BzUHGZOU.js → CollapsibleCard-TiI4lId1.js} +1 -1
- zenml/zen_server/dashboard/assets/{Commands-BEGyld4c.js → Commands-BcR2Arie.js} +1 -1
- zenml/zen_server/dashboard/assets/{ComponentBadge-xyKiek1s.js → ComponentBadge-BqQNUZgb.js} +1 -1
- zenml/zen_server/dashboard/assets/{CopyButton-DhW-mapu.js → CopyButton-DCiXO3JC.js} +1 -1
- zenml/zen_server/dashboard/assets/{CsvVizualization-D8oazBiE.js → CsvVizualization-O9cVIaL8.js} +1 -1
- zenml/zen_server/dashboard/assets/{DeleteAlertDialog-WkSIIgfy.js → DeleteAlertDialog-DrPjHtXX.js} +1 -1
- zenml/zen_server/dashboard/assets/{DialogItem-Bgroeg29.js → DialogItem-BYG7d_M2.js} +1 -1
- zenml/zen_server/dashboard/assets/{Error-CY5tlu17.js → Error-C1zbWr19.js} +1 -1
- zenml/zen_server/dashboard/assets/{ExecutionStatus-G8mjIaeA.js → ExecutionStatus-Ct9srgHC.js} +1 -1
- zenml/zen_server/dashboard/assets/{Helpbox-Bb1ed--O.js → Helpbox-Bm_1Zx9f.js} +1 -1
- zenml/zen_server/dashboard/assets/{Infobox-Da6-76M2.js → Infobox-OQdkCLSP.js} +1 -1
- zenml/zen_server/dashboard/assets/{InlineAvatar-DqnZaBNq.js → InlineAvatar-CQNjKoEQ.js} +1 -1
- zenml/zen_server/dashboard/assets/{NestedCollapsible-aK5ojKoF.js → NestedCollapsible-DDgd2SGb.js} +1 -1
- zenml/zen_server/dashboard/assets/Partials-MD3e95Dk.js +1 -0
- zenml/zen_server/dashboard/assets/{ProBadge-B4tRUYve.js → ProBadge-D784iVNC.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProCta-CZuP29Qz.js → ProCta-W2PEvNow.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderIcon-Bd7GUQ1_.js → ProviderIcon-DfDUOeAy.js} +1 -1
- zenml/zen_server/dashboard/assets/{ProviderRadio-mstdqzsS.js → ProviderRadio-B81Elxrc.js} +1 -1
- zenml/zen_server/dashboard/assets/{RunSelector-CsruSB4i.js → RunSelector-DOXgdry5.js} +1 -1
- zenml/zen_server/dashboard/assets/{RunsBody-DxxtWVYz.js → RunsBody-Bnx2fxub.js} +1 -1
- zenml/zen_server/dashboard/assets/SearchField-Yjv-KRW4.js +1 -0
- zenml/zen_server/dashboard/assets/{SecretTooltip-CLzJIYW_.js → SecretTooltip-EKpMlG2f.js} +1 -1
- zenml/zen_server/dashboard/assets/{SetPassword-Yn50ooBC.js → SetPassword-CDLy57PZ.js} +1 -1
- zenml/zen_server/dashboard/assets/StackList-DKQaLDo4.js +1 -0
- zenml/zen_server/dashboard/assets/{Tabs-CNv-eTYM.js → Tabs-B5E-o_h6.js} +1 -1
- zenml/zen_server/dashboard/assets/{Tick-jEIevzVf.js → Tick-DSYBiuXU.js} +1 -1
- zenml/zen_server/dashboard/assets/{UpdatePasswordSchemas-C16GW-kX.js → UpdatePasswordSchemas-HBNOeyoP.js} +1 -1
- zenml/zen_server/dashboard/assets/{UsageReason-Bf2tzhv1.js → UsageReason-DXtPS5nE.js} +1 -1
- zenml/zen_server/dashboard/assets/{WizardFooter-D6i-AP1K.js → WizardFooter-_1VSMZ_c.js} +1 -1
- zenml/zen_server/dashboard/assets/{all-pipeline-runs-query-DUti43aF.js → all-pipeline-runs-query-D0qDLdKB.js} +1 -1
- zenml/zen_server/dashboard/assets/{create-stack-Ch2WPs9U.js → create-stack-7JzgAYAm.js} +1 -1
- zenml/zen_server/dashboard/assets/{delete-run-Byf9hTjA.js → delete-run-CUdtYFLl.js} +1 -1
- zenml/zen_server/dashboard/assets/{form-schemas-BZqKBPBF.js → form-schemas-B6PCV3Y4.js} +1 -1
- zenml/zen_server/dashboard/assets/index-B6U0OkEN.css +1 -0
- zenml/zen_server/dashboard/assets/{index-CyBKZcpO.js → index-CJ5IfeAl.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-CtdYkjUi.js → index-Ceyzb1yI.js} +1 -1
- zenml/zen_server/dashboard/assets/{index-CE0aQlv8.js → index-CxO6541P.js} +3 -3
- zenml/zen_server/dashboard/assets/{index-v6gQjDEo.js → index-D4yoZ_gH.js} +1 -1
- zenml/zen_server/dashboard/assets/{login-mutation-DNDVp_2H.js → login-mutation-BaeJ7MAg.js} +1 -1
- zenml/zen_server/dashboard/assets/{not-found-Bmup4ctE.js → not-found-MGptrNBk.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DGlm1RVc.js → page-Aeu3v0MQ.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CltCNL0T.js → page-BCgEdmhP.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Hn8q9iJZ.js → page-BKwwfTNy.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BNxYrN0q.js → page-BUjw8Tp1.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BYJfqgLN.js → page-BXgXP-Qj.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DN4BVIOL.js → page-BXrtxEbw.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CHRn1fQm.js → page-BaUDR9Ri.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DlIi5ThM.js → page-BbljjC-k.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BrmJp1Wt.js → page-BhOXn-s9.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Cc8ZEuj4.js → page-C37IDa-Q.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Dif8CWyZ.js → page-C4JpDeUM.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-BC27C_OI.js → page-CB2_GdBA.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-B5Sr8pib.js → page-CBiT2Ox9.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-IhckKFnD.js → page-CXPc-HN1.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-Dth9X1Ih.js → page-CbwI6emp.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DweqqCkF.js → page-CeNL9JWi.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-LyZ_l8vR.js → page-CkPwPmLZ.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-C70wZtV2.js → page-CmJU3Gqo.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-D9Oh05fl.js → page-CoFVtzhG.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-PamGpk0j.js → page-D-KPzeQb.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DoW7YxTu.js → page-DKQ3wZgr.js} +1 -1
- zenml/zen_server/dashboard/assets/page-DWWhxCoF.js +1 -0
- zenml/zen_server/dashboard/assets/{page-CmlYj7Nl.js → page-DbW8MfQ4.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CWr96ZKN.js → page-Dv5lN2w7.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-ANYGfEUL.js → page-Dvbq1BoF.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-D6Ev5P8V.js → page-DyAuja95.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-DyOJ_pq3.js → page-DzrdL2v1.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-CXAbSyp9.js → page-I2B4Ocv8.js} +1 -1
- zenml/zen_server/dashboard/assets/page-OdjGauvw.js +2 -0
- zenml/zen_server/dashboard/assets/{page-CaeI9ptC.js → page-Ox-eC1ik.js} +1 -1
- zenml/zen_server/dashboard/assets/{page-B_0XkV48.js → page-khp8QJ6b.js} +1 -1
- zenml/zen_server/dashboard/assets/{page--XLMzHrn.js → page-yNh6PQKt.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-vP0-Xl4f.js → persist-DBTFy--v.js} +1 -1
- zenml/zen_server/dashboard/assets/{persist-DeXRG61d.js → persist-K7AY0ju4.js} +1 -1
- zenml/zen_server/dashboard/assets/{service-DH_oUqQj.js → service-BvOYLH5b.js} +1 -1
- zenml/zen_server/dashboard/assets/{sharedSchema-Bw1_Wa7l.js → sharedSchema-xJDsJNgJ.js} +1 -1
- zenml/zen_server/dashboard/assets/{stack-detail-query-B_0R_fd6.js → stack-detail-query-DMJoxwgv.js} +1 -1
- zenml/zen_server/dashboard/assets/{update-server-settings-mutation-D9qYhfaN.js → update-server-settings-mutation-ATZDNNZk.js} +1 -1
- zenml/zen_server/dashboard/assets/{url-Dh93fvh0.js → url-BWJXzuI4.js} +1 -1
- zenml/zen_server/dashboard/index.html +4 -4
- zenml/zen_server/deploy/helm/Chart.yaml +1 -1
- zenml/zen_server/deploy/helm/README.md +2 -2
- zenml/zen_server/deploy/helm/templates/server-db-job.yaml +5 -3
- zenml/zen_server/deploy/helm/values.yaml +4 -0
- zenml/zen_server/routers/devices_endpoints.py +4 -2
- zenml/zen_server/routers/workspaces_endpoints.py +2 -0
- zenml/zen_stores/migrations/versions/0.73.0_release.py +23 -0
- zenml/zen_stores/migrations/versions/25155145c545_separate_actions_and_triggers.py +2 -2
- zenml/zen_stores/migrations/versions/46506f72f0ed_add_server_settings.py +2 -2
- zenml/zen_stores/migrations/versions/5994f9ad0489_introduce_role_permissions.py +6 -6
- zenml/zen_stores/migrations/versions/7500f434b71c_remove_shared_columns.py +2 -2
- zenml/zen_stores/migrations/versions/a91762e6be36_artifact_version_table.py +3 -3
- zenml/zen_stores/schemas/action_schemas.py +2 -2
- zenml/zen_stores/schemas/api_key_schemas.py +4 -4
- zenml/zen_stores/schemas/artifact_schemas.py +3 -3
- zenml/zen_stores/schemas/base_schemas.py +7 -3
- zenml/zen_stores/schemas/code_repository_schemas.py +2 -2
- zenml/zen_stores/schemas/component_schemas.py +2 -2
- zenml/zen_stores/schemas/device_schemas.py +4 -4
- zenml/zen_stores/schemas/event_source_schemas.py +2 -2
- zenml/zen_stores/schemas/flavor_schemas.py +2 -2
- zenml/zen_stores/schemas/model_schemas.py +3 -3
- zenml/zen_stores/schemas/pipeline_run_schemas.py +10 -3
- zenml/zen_stores/schemas/pipeline_schemas.py +2 -2
- zenml/zen_stores/schemas/run_template_schemas.py +2 -2
- zenml/zen_stores/schemas/schedule_schema.py +19 -4
- zenml/zen_stores/schemas/secret_schemas.py +2 -2
- zenml/zen_stores/schemas/server_settings_schemas.py +9 -5
- zenml/zen_stores/schemas/service_connector_schemas.py +2 -2
- zenml/zen_stores/schemas/service_schemas.py +2 -2
- zenml/zen_stores/schemas/stack_schemas.py +2 -2
- zenml/zen_stores/schemas/step_run_schemas.py +2 -2
- zenml/zen_stores/schemas/tag_schemas.py +2 -2
- zenml/zen_stores/schemas/trigger_schemas.py +2 -2
- zenml/zen_stores/schemas/user_schemas.py +3 -3
- zenml/zen_stores/schemas/workspace_schemas.py +2 -2
- zenml/zen_stores/sql_zen_store.py +10 -1
- {zenml_nightly-0.72.0.dev20250121.dist-info → zenml_nightly-0.73.0.dev20250124.dist-info}/METADATA +3 -3
- {zenml_nightly-0.72.0.dev20250121.dist-info → zenml_nightly-0.73.0.dev20250124.dist-info}/RECORD +161 -157
- zenml/zen_server/dashboard/assets/Partials-CqZp5NMX.js +0 -1
- zenml/zen_server/dashboard/assets/SearchField-D6tPxyqw.js +0 -1
- zenml/zen_server/dashboard/assets/StackList-U537qoYd.js +0 -1
- zenml/zen_server/dashboard/assets/index-DXvT1_Um.css +0 -1
- zenml/zen_server/dashboard/assets/page-C2nU3Gxn.js +0 -1
- zenml/zen_server/dashboard/assets/page-PxOWfKgF.js +0 -2
- {zenml_nightly-0.72.0.dev20250121.dist-info → zenml_nightly-0.73.0.dev20250124.dist-info}/LICENSE +0 -0
- {zenml_nightly-0.72.0.dev20250121.dist-info → zenml_nightly-0.73.0.dev20250124.dist-info}/WHEEL +0 -0
- {zenml_nightly-0.72.0.dev20250121.dist-info → zenml_nightly-0.73.0.dev20250124.dist-info}/entry_points.txt +0 -0
zenml/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.73.0.dev20250124
|
zenml/cli/login.py
CHANGED
@@ -249,6 +249,7 @@ def connect_to_pro_server(
|
|
249
249
|
from zenml.login.pro.tenant.models import TenantStatus
|
250
250
|
|
251
251
|
pro_api_url = pro_api_url or ZENML_PRO_API_URL
|
252
|
+
pro_api_url = pro_api_url.rstrip("/")
|
252
253
|
|
253
254
|
server_id, server_url, server_name = None, None, None
|
254
255
|
login = False
|
@@ -434,6 +435,7 @@ def is_pro_server(
|
|
434
435
|
from zenml.login.credentials_store import get_credentials_store
|
435
436
|
from zenml.login.server_info import get_server_info
|
436
437
|
|
438
|
+
url = url.rstrip("/")
|
437
439
|
# First, check the credentials store
|
438
440
|
credentials_store = get_credentials_store()
|
439
441
|
credentials = credentials_store.get_credentials(url)
|
zenml/cli/server.py
CHANGED
@@ -578,6 +578,7 @@ def server_list(
|
|
578
578
|
from zenml.login.pro.tenant.models import TenantRead, TenantStatus
|
579
579
|
|
580
580
|
pro_api_url = pro_api_url or ZENML_PRO_API_URL
|
581
|
+
pro_api_url = pro_api_url.rstrip("/")
|
581
582
|
|
582
583
|
credentials_store = get_credentials_store()
|
583
584
|
pro_token = credentials_store.get_pro_token(
|
zenml/cli/service_connectors.py
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
# permissions and limitations under the License.
|
14
14
|
"""Service connector CLI commands."""
|
15
15
|
|
16
|
-
from datetime import datetime
|
16
|
+
from datetime import datetime, timezone
|
17
17
|
from typing import Any, Dict, List, Optional, Union, cast
|
18
18
|
from uuid import UUID
|
19
19
|
|
@@ -291,7 +291,9 @@ def prompt_expires_at(
|
|
291
291
|
while True:
|
292
292
|
default_str = ""
|
293
293
|
if default is not None:
|
294
|
-
seconds = int(
|
294
|
+
seconds = int(
|
295
|
+
(default - datetime.now(timezone.utc)).total_seconds()
|
296
|
+
)
|
295
297
|
default_str = (
|
296
298
|
f" [{str(default)} i.e. in "
|
297
299
|
f"{seconds_to_human_readable(seconds)}]"
|
@@ -307,14 +309,16 @@ def prompt_expires_at(
|
|
307
309
|
|
308
310
|
assert expires_at is not None
|
309
311
|
assert isinstance(expires_at, datetime)
|
310
|
-
if expires_at < datetime.
|
312
|
+
if expires_at < datetime.now(timezone.utc):
|
311
313
|
cli_utils.warning(
|
312
314
|
"The expiration time must be in the future. Please enter a "
|
313
315
|
"later date and time."
|
314
316
|
)
|
315
317
|
continue
|
316
318
|
|
317
|
-
seconds = int(
|
319
|
+
seconds = int(
|
320
|
+
(expires_at - datetime.now(timezone.utc)).total_seconds()
|
321
|
+
)
|
318
322
|
|
319
323
|
confirm = click.confirm(
|
320
324
|
f"Credentials will be valid until {str(expires_at)} UTC (i.e. "
|
zenml/cli/stack.py
CHANGED
@@ -17,7 +17,7 @@ import getpass
|
|
17
17
|
import re
|
18
18
|
import time
|
19
19
|
import webbrowser
|
20
|
-
from datetime import datetime
|
20
|
+
from datetime import datetime, timezone
|
21
21
|
from typing import (
|
22
22
|
TYPE_CHECKING,
|
23
23
|
Any,
|
@@ -1575,7 +1575,7 @@ def deploy(
|
|
1575
1575
|
):
|
1576
1576
|
raise click.Abort()
|
1577
1577
|
|
1578
|
-
date_start = datetime.
|
1578
|
+
date_start = datetime.now(timezone.utc)
|
1579
1579
|
|
1580
1580
|
webbrowser.open(deployment_config.deployment_url)
|
1581
1581
|
console.print(
|
@@ -13,7 +13,7 @@
|
|
13
13
|
# permissions and limitations under the License.
|
14
14
|
"""Pipeline configuration classes."""
|
15
15
|
|
16
|
-
from datetime import datetime
|
16
|
+
from datetime import datetime, timezone
|
17
17
|
from typing import TYPE_CHECKING, Any, Dict, List, Optional
|
18
18
|
|
19
19
|
from pydantic import SerializeAsAny, field_validator
|
@@ -61,7 +61,7 @@ class PipelineConfigurationUpdate(StrictBaseModel):
|
|
61
61
|
The full substitutions dict including date and time.
|
62
62
|
"""
|
63
63
|
if start_time is None:
|
64
|
-
start_time = datetime.
|
64
|
+
start_time = datetime.now(timezone.utc)
|
65
65
|
ret = self.substitutions.copy()
|
66
66
|
ret.setdefault("date", start_time.strftime("%Y_%m_%d"))
|
67
67
|
ret.setdefault("time", start_time.strftime("%H_%M_%S_%f"))
|
zenml/config/server_config.py
CHANGED
@@ -432,6 +432,26 @@ class ServerConfiguration(BaseModel):
|
|
432
432
|
|
433
433
|
return data
|
434
434
|
|
435
|
+
@field_validator("reportable_resources", mode="before")
|
436
|
+
@classmethod
|
437
|
+
def _convert_reportable_resources(cls, value: Any) -> Any:
|
438
|
+
"""Convert reportable resources value if necessary.
|
439
|
+
|
440
|
+
This was previously set via an environment variable as a JSON-formatted
|
441
|
+
string. In case this still exists somewhere, this method converts the
|
442
|
+
JSON string to a list.
|
443
|
+
|
444
|
+
Args:
|
445
|
+
value: The reportable resources values.
|
446
|
+
|
447
|
+
Returns:
|
448
|
+
The potentially converted value.
|
449
|
+
"""
|
450
|
+
if isinstance(value, str):
|
451
|
+
value = json.loads(value)
|
452
|
+
|
453
|
+
return value
|
454
|
+
|
435
455
|
@property
|
436
456
|
def deployment_id(self) -> UUID:
|
437
457
|
"""Get the ZenML server deployment ID.
|
zenml/enums.py
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
"""Base class for event hub implementations."""
|
15
15
|
|
16
16
|
from abc import ABC, abstractmethod
|
17
|
-
from datetime import datetime, timedelta
|
17
|
+
from datetime import datetime, timedelta, timezone
|
18
18
|
from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Tuple
|
19
19
|
|
20
20
|
from zenml import EventSourceResponse
|
@@ -134,7 +134,7 @@ class BaseEventHub(ABC):
|
|
134
134
|
)
|
135
135
|
expires: Optional[datetime] = None
|
136
136
|
if trigger.action.auth_window:
|
137
|
-
expires = datetime.
|
137
|
+
expires = datetime.now(timezone.utc) + timedelta(
|
138
138
|
minutes=trigger.action.auth_window
|
139
139
|
)
|
140
140
|
encoded_token = token.encode(expires=expires)
|
@@ -408,7 +408,8 @@ class AirflowOrchestrator(ContainerizedOrchestrator):
|
|
408
408
|
if schedule:
|
409
409
|
if schedule.cron_expression:
|
410
410
|
start_time = schedule.start_time or (
|
411
|
-
datetime.datetime.
|
411
|
+
datetime.datetime.now(datetime.timezone.utc)
|
412
|
+
- datetime.timedelta(7)
|
412
413
|
)
|
413
414
|
return {
|
414
415
|
"schedule": schedule.cron_expression,
|
@@ -428,6 +429,7 @@ class AirflowOrchestrator(ContainerizedOrchestrator):
|
|
428
429
|
"schedule": "@once",
|
429
430
|
# set a start time in the past and disable catchup so airflow
|
430
431
|
# runs the dag immediately
|
431
|
-
"start_date": datetime.datetime.
|
432
|
+
"start_date": datetime.datetime.now(datetime.timezone.utc)
|
433
|
+
- datetime.timedelta(7),
|
432
434
|
"catchup": False,
|
433
435
|
}
|
@@ -35,12 +35,13 @@ AWS_RESOURCE_TYPE = "aws-generic"
|
|
35
35
|
S3_RESOURCE_TYPE = "s3-bucket"
|
36
36
|
AWS_IMAGE_BUILDER_FLAVOR = "aws"
|
37
37
|
|
38
|
+
|
38
39
|
class AWSIntegration(Integration):
|
39
40
|
"""Definition of AWS integration for ZenML."""
|
40
41
|
|
41
42
|
NAME = AWS
|
42
43
|
REQUIREMENTS = [
|
43
|
-
"sagemaker>=2.
|
44
|
+
"sagemaker>=2.199.0",
|
44
45
|
"kubernetes",
|
45
46
|
"aws-profile-manager",
|
46
47
|
]
|
@@ -85,6 +85,7 @@ class SagemakerOrchestratorSettings(BaseSettings):
|
|
85
85
|
to the container is configured with input_data_s3_mode. Two possible
|
86
86
|
input types:
|
87
87
|
- str: S3 location where training data is saved.
|
88
|
+
- Dict[str, str]: (ChannelName, S3Location) which represent
|
88
89
|
- Dict[str, str]: (ChannelName, S3Location) which represent
|
89
90
|
channels (e.g. training, validation, testing) where
|
90
91
|
specific parts of the data are saved in S3.
|
@@ -184,6 +185,10 @@ class SagemakerOrchestratorConfig(
|
|
184
185
|
|
185
186
|
Attributes:
|
186
187
|
execution_role: The IAM role ARN to use for the pipeline.
|
188
|
+
scheduler_role: The ARN of the IAM role that will be assumed by
|
189
|
+
the EventBridge service to launch Sagemaker pipelines
|
190
|
+
(For more details regarding the required permissions, please check:
|
191
|
+
https://docs.zenml.io/stack-components/orchestrators/sagemaker#required-iam-permissions-for-schedules)
|
187
192
|
aws_access_key_id: The AWS access key ID to use to authenticate to AWS.
|
188
193
|
If not provided, the value from the default AWS config will be used.
|
189
194
|
aws_secret_access_key: The AWS secret access key to use to authenticate
|
@@ -203,6 +208,7 @@ class SagemakerOrchestratorConfig(
|
|
203
208
|
"""
|
204
209
|
|
205
210
|
execution_role: str
|
211
|
+
scheduler_role: Optional[str] = None
|
206
212
|
aws_access_key_id: Optional[str] = SecretField(default=None)
|
207
213
|
aws_secret_access_key: Optional[str] = SecretField(default=None)
|
208
214
|
aws_profile: Optional[str] = None
|
@@ -232,6 +238,15 @@ class SagemakerOrchestratorConfig(
|
|
232
238
|
"""
|
233
239
|
return self.synchronous
|
234
240
|
|
241
|
+
@property
|
242
|
+
def is_schedulable(self) -> bool:
|
243
|
+
"""Whether the orchestrator is schedulable or not.
|
244
|
+
|
245
|
+
Returns:
|
246
|
+
Whether the orchestrator is schedulable or not.
|
247
|
+
"""
|
248
|
+
return True
|
249
|
+
|
235
250
|
|
236
251
|
class SagemakerOrchestratorFlavor(BaseOrchestratorFlavor):
|
237
252
|
"""Flavor for the Sagemaker orchestrator."""
|