polyaxon 2.4.0rc1__py3-none-any.whl → 2.6.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.
- polyaxon/_auxiliaries/default_scheduling.py +17 -7
- polyaxon/_auxiliaries/init.py +14 -6
- polyaxon/_auxiliaries/sidecar.py +10 -8
- polyaxon/_cli/dashboard.py +2 -5
- polyaxon/_cli/run.py +14 -0
- polyaxon/_cli/version.py +4 -1
- polyaxon/_compiler/contexts/contexts.py +4 -0
- polyaxon/_compiler/resolver/agent.py +10 -9
- polyaxon/_compiler/resolver/runtime.py +4 -0
- polyaxon/_constants/metadata.py +1 -0
- polyaxon/_contexts/keys.py +1 -0
- polyaxon/_deploy/schemas/auth.py +3 -3
- polyaxon/_deploy/schemas/celery.py +10 -8
- polyaxon/_deploy/schemas/deployment.py +148 -116
- polyaxon/_deploy/schemas/email.py +8 -8
- polyaxon/_deploy/schemas/ingress.py +7 -7
- polyaxon/_deploy/schemas/intervals.py +3 -1
- polyaxon/_deploy/schemas/operators.py +8 -8
- polyaxon/_deploy/schemas/proxy.py +9 -9
- polyaxon/_deploy/schemas/rbac.py +1 -1
- polyaxon/_deploy/schemas/root_user.py +5 -5
- polyaxon/_deploy/schemas/security_context.py +25 -15
- polyaxon/_deploy/schemas/service.py +73 -69
- polyaxon/_deploy/schemas/ssl.py +3 -3
- polyaxon/_deploy/schemas/ui.py +10 -6
- polyaxon/_docker/builder/builder.py +4 -1
- polyaxon/_docker/converter/base/containers.py +4 -7
- polyaxon/_docker/converter/base/env_vars.py +5 -5
- polyaxon/_docker/converter/base/mounts.py +2 -2
- polyaxon/_docker/docker_types.py +57 -30
- polyaxon/_env_vars/keys.py +2 -0
- polyaxon/_flow/__init__.py +3 -2
- polyaxon/_flow/builds/__init__.py +8 -8
- polyaxon/_flow/cache/__init__.py +4 -4
- polyaxon/_flow/component/base.py +25 -18
- polyaxon/_flow/component/component.py +4 -3
- polyaxon/_flow/early_stopping/__init__.py +1 -1
- polyaxon/_flow/early_stopping/policies.py +12 -10
- polyaxon/_flow/environment/__init__.py +42 -24
- polyaxon/_flow/events/__init__.py +1 -1
- polyaxon/_flow/hooks/__init__.py +11 -11
- polyaxon/_flow/init/__init__.py +41 -25
- polyaxon/_flow/io/io.py +57 -47
- polyaxon/_flow/joins/__init__.py +5 -5
- polyaxon/_flow/matrix/bayes.py +23 -17
- polyaxon/_flow/matrix/grid_search.py +16 -7
- polyaxon/_flow/matrix/hyperband.py +10 -10
- polyaxon/_flow/matrix/hyperopt.py +14 -9
- polyaxon/_flow/matrix/iterative.py +14 -8
- polyaxon/_flow/matrix/mapping.py +4 -4
- polyaxon/_flow/matrix/params.py +138 -77
- polyaxon/_flow/matrix/random_search.py +10 -5
- polyaxon/_flow/matrix/tuner.py +4 -4
- polyaxon/_flow/mounts/artifacts_mounts.py +1 -1
- polyaxon/_flow/notifications/__init__.py +1 -1
- polyaxon/_flow/operations/base.py +10 -8
- polyaxon/_flow/operations/compiled_operation.py +5 -4
- polyaxon/_flow/operations/operation.py +30 -22
- polyaxon/_flow/optimization/__init__.py +2 -2
- polyaxon/_flow/params/params.py +10 -9
- polyaxon/_flow/plugins/__init__.py +19 -13
- polyaxon/_flow/run/dag.py +12 -9
- polyaxon/_flow/run/dask/dask.py +4 -4
- polyaxon/_flow/run/dask/replica.py +17 -11
- polyaxon/_flow/run/job.py +17 -11
- polyaxon/_flow/run/kubeflow/mpi_job.py +10 -5
- polyaxon/_flow/run/kubeflow/mx_job.py +25 -9
- polyaxon/_flow/run/kubeflow/paddle_job.py +16 -9
- polyaxon/_flow/run/kubeflow/pytorch_job.py +24 -17
- polyaxon/_flow/run/kubeflow/replica.py +17 -11
- polyaxon/_flow/run/kubeflow/scheduling_policy.py +7 -5
- polyaxon/_flow/run/kubeflow/tf_job.py +15 -8
- polyaxon/_flow/run/kubeflow/xgboost_job.py +9 -4
- polyaxon/_flow/run/ray/ray.py +9 -6
- polyaxon/_flow/run/ray/replica.py +25 -16
- polyaxon/_flow/run/resources.py +14 -13
- polyaxon/_flow/run/service.py +4 -4
- polyaxon/_flow/schedules/cron.py +4 -4
- polyaxon/_flow/schedules/interval.py +4 -4
- polyaxon/_flow/templates/__init__.py +3 -3
- polyaxon/_flow/termination/__init__.py +3 -3
- polyaxon/_fs/async_manager.py +1 -1
- polyaxon/_fs/watcher.py +26 -27
- polyaxon/_k8s/k8s_validation.py +1 -1
- polyaxon/_k8s/logging/async_monitor.py +18 -3
- polyaxon/_local_process/converter/base/containers.py +4 -7
- polyaxon/_local_process/converter/base/env_vars.py +5 -5
- polyaxon/_local_process/process_types.py +15 -12
- polyaxon/_polyaxonfile/specs/compiled_operation.py +1 -1
- polyaxon/_polyaxonfile/specs/libs/parser.py +1 -1
- polyaxon/_polyaxonfile/specs/libs/validator.py +1 -1
- polyaxon/_polyaxonfile/specs/operation.py +1 -1
- polyaxon/_polyaxonfile/specs/sections.py +8 -0
- polyaxon/_runner/agent/async_agent.py +9 -6
- polyaxon/_runner/agent/base_agent.py +8 -5
- polyaxon/_runner/agent/sync_agent.py +8 -5
- polyaxon/_runner/converter/converter.py +12 -4
- polyaxon/_schemas/agent.py +69 -37
- polyaxon/_schemas/authentication.py +4 -4
- polyaxon/_schemas/base.py +26 -2
- polyaxon/_schemas/checks.py +3 -3
- polyaxon/_schemas/cli.py +4 -6
- polyaxon/_schemas/client.py +20 -18
- polyaxon/_schemas/compatibility.py +4 -4
- polyaxon/_schemas/container_resources.py +1 -1
- polyaxon/_schemas/home.py +3 -3
- polyaxon/_schemas/installation.py +13 -9
- polyaxon/_schemas/lifecycle.py +23 -23
- polyaxon/_schemas/log_handler.py +2 -2
- polyaxon/_schemas/services.py +26 -14
- polyaxon/_schemas/types/artifacts.py +3 -3
- polyaxon/_schemas/types/dockerfile.py +14 -12
- polyaxon/_schemas/types/event.py +2 -2
- polyaxon/_schemas/types/file.py +3 -3
- polyaxon/_schemas/types/git.py +12 -4
- polyaxon/_schemas/types/tensorboard.py +14 -8
- polyaxon/_schemas/user.py +3 -3
- polyaxon/_schemas/version.py +2 -2
- polyaxon/_sdk/api/agents_v1_api.py +45 -45
- polyaxon/_sdk/api/artifacts_stores_v1_api.py +3 -3
- polyaxon/_sdk/api/auth_v1_api.py +13 -13
- polyaxon/_sdk/api/connections_v1_api.py +15 -15
- polyaxon/_sdk/api/dashboards_v1_api.py +15 -15
- polyaxon/_sdk/api/organizations_v1_api.py +77 -77
- polyaxon/_sdk/api/presets_v1_api.py +15 -15
- polyaxon/_sdk/api/project_dashboards_v1_api.py +17 -17
- polyaxon/_sdk/api/project_searches_v1_api.py +17 -17
- polyaxon/_sdk/api/projects_v1_api.py +65 -65
- polyaxon/_sdk/api/queues_v1_api.py +19 -19
- polyaxon/_sdk/api/runs_v1_api.py +127 -127
- polyaxon/_sdk/api/searches_v1_api.py +15 -15
- polyaxon/_sdk/api/service_accounts_v1_api.py +27 -27
- polyaxon/_sdk/api/tags_v1_api.py +17 -17
- polyaxon/_sdk/api/teams_v1_api.py +51 -51
- polyaxon/_sdk/api/users_v1_api.py +25 -25
- polyaxon/_sdk/api/versions_v1_api.py +7 -7
- polyaxon/_sdk/schemas/v1_activity.py +8 -8
- polyaxon/_sdk/schemas/v1_agent.py +17 -16
- polyaxon/_sdk/schemas/v1_agent_state_response.py +4 -4
- polyaxon/_sdk/schemas/v1_agent_state_response_agent_state.py +10 -10
- polyaxon/_sdk/schemas/v1_agent_status_body_request.py +3 -3
- polyaxon/_sdk/schemas/v1_analytics_spec.py +4 -4
- polyaxon/_sdk/schemas/v1_artifact_tree.py +3 -3
- polyaxon/_sdk/schemas/v1_auth.py +1 -1
- polyaxon/_sdk/schemas/v1_cloning.py +3 -3
- polyaxon/_sdk/schemas/v1_connection_response.py +9 -9
- polyaxon/_sdk/schemas/v1_dashboard.py +9 -9
- polyaxon/_sdk/schemas/v1_dashboard_spec.py +5 -5
- polyaxon/_sdk/schemas/v1_entities_tags.py +2 -2
- polyaxon/_sdk/schemas/v1_entities_transfer.py +2 -2
- polyaxon/_sdk/schemas/v1_entity_notification_body.py +7 -7
- polyaxon/_sdk/schemas/v1_entity_stage_body_request.py +5 -5
- polyaxon/_sdk/schemas/v1_entity_status_body_request.py +5 -5
- polyaxon/_sdk/schemas/v1_events_response.py +2 -2
- polyaxon/_sdk/schemas/v1_list_activities_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_agents_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_bookmarks_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_connections_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_dashboards_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_organization_members_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_organizations_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_presets_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_project_versions_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_projects_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_queues_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_run_artifacts_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_run_connections_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_run_edges_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_runs_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_searches_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_service_accounts_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_tags_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_team_members_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_teams_response.py +4 -4
- polyaxon/_sdk/schemas/v1_list_token_response.py +4 -4
- polyaxon/_sdk/schemas/v1_operation_body.py +8 -8
- polyaxon/_sdk/schemas/v1_organization.py +16 -16
- polyaxon/_sdk/schemas/v1_organization_member.py +6 -6
- polyaxon/_sdk/schemas/v1_password_change.py +3 -3
- polyaxon/_sdk/schemas/v1_pipeline.py +3 -3
- polyaxon/_sdk/schemas/v1_preset.py +11 -12
- polyaxon/_sdk/schemas/v1_project.py +17 -17
- polyaxon/_sdk/schemas/v1_project_settings.py +11 -11
- polyaxon/_sdk/schemas/v1_project_version.py +20 -20
- polyaxon/_sdk/schemas/v1_queue.py +12 -12
- polyaxon/_sdk/schemas/v1_run.py +38 -38
- polyaxon/_sdk/schemas/v1_run_connection.py +3 -3
- polyaxon/_sdk/schemas/v1_run_edge.py +5 -5
- polyaxon/_sdk/schemas/v1_run_edge_lineage.py +3 -3
- polyaxon/_sdk/schemas/v1_run_edges_graph.py +1 -1
- polyaxon/_sdk/schemas/v1_run_reference_catalog.py +4 -4
- polyaxon/_sdk/schemas/v1_run_settings.py +9 -9
- polyaxon/_sdk/schemas/v1_search.py +10 -10
- polyaxon/_sdk/schemas/v1_search_spec.py +14 -14
- polyaxon/_sdk/schemas/v1_section_spec.py +12 -12
- polyaxon/_sdk/schemas/v1_service_account.py +9 -9
- polyaxon/_sdk/schemas/v1_settings_catalog.py +4 -4
- polyaxon/_sdk/schemas/v1_tag.py +6 -6
- polyaxon/_sdk/schemas/v1_team.py +11 -11
- polyaxon/_sdk/schemas/v1_team_member.py +6 -6
- polyaxon/_sdk/schemas/v1_team_settings.py +2 -2
- polyaxon/_sdk/schemas/v1_token.py +10 -10
- polyaxon/_sdk/schemas/v1_trial_start.py +6 -6
- polyaxon/_sdk/schemas/v1_user.py +6 -6
- polyaxon/_sdk/schemas/v1_user_access.py +7 -7
- polyaxon/_sdk/schemas/v1_user_email.py +1 -1
- polyaxon/_sdk/schemas/v1_user_singup.py +5 -5
- polyaxon/_sdk/schemas/v1_uuids.py +1 -1
- polyaxon/_sidecar/container/__init__.py +13 -8
- polyaxon/_utils/cli_constants.py +2 -0
- polyaxon/_utils/test_utils.py +2 -1
- polyaxon/pkg.py +1 -1
- {polyaxon-2.4.0rc1.dist-info → polyaxon-2.6.0.dist-info}/METADATA +13 -13
- {polyaxon-2.4.0rc1.dist-info → polyaxon-2.6.0.dist-info}/RECORD +218 -218
- {polyaxon-2.4.0rc1.dist-info → polyaxon-2.6.0.dist-info}/WHEEL +1 -1
- {polyaxon-2.4.0rc1.dist-info → polyaxon-2.6.0.dist-info}/LICENSE +0 -0
- {polyaxon-2.4.0rc1.dist-info → polyaxon-2.6.0.dist-info}/entry_points.txt +0 -0
- {polyaxon-2.4.0rc1.dist-info → polyaxon-2.6.0.dist-info}/top_level.txt +0 -0
@@ -6,11 +6,11 @@ from polyaxon._schemas.base import BaseSchemaModel
|
|
6
6
|
|
7
7
|
|
8
8
|
class EmailConfig(BaseSchemaModel):
|
9
|
-
enabled: Optional[bool]
|
10
|
-
email_from: Optional[StrictStr] = Field(alias="from")
|
11
|
-
host: Optional[StrictStr]
|
12
|
-
port: Optional[StrictInt]
|
13
|
-
use_tls: Optional[bool] = Field(alias="useTls")
|
14
|
-
host_user: Optional[StrictStr] = Field(alias="hostUser")
|
15
|
-
host_password: Optional[StrictStr] = Field(alias="hostPassword")
|
16
|
-
backend: Optional[StrictStr]
|
9
|
+
enabled: Optional[bool] = None
|
10
|
+
email_from: Optional[StrictStr] = Field(alias="from", default=None)
|
11
|
+
host: Optional[StrictStr] = None
|
12
|
+
port: Optional[StrictInt] = None
|
13
|
+
use_tls: Optional[bool] = Field(alias="useTls", default=None)
|
14
|
+
host_user: Optional[StrictStr] = Field(alias="hostUser", default=None)
|
15
|
+
host_password: Optional[StrictStr] = Field(alias="hostPassword", default=None)
|
16
|
+
backend: Optional[StrictStr] = None
|
@@ -1,16 +1,16 @@
|
|
1
1
|
from typing import Dict, List, Optional
|
2
2
|
|
3
|
-
from clipped.compact.pydantic import
|
3
|
+
from clipped.compact.pydantic import Field, StrictStr
|
4
4
|
|
5
5
|
from polyaxon._schemas.base import BaseSchemaModel
|
6
6
|
|
7
7
|
|
8
8
|
class IngressConfig(BaseSchemaModel):
|
9
|
-
enabled: Optional[bool]
|
10
|
-
host_name: Optional[StrictStr] = Field(alias="hostName")
|
11
|
-
path: Optional[StrictStr]
|
12
|
-
tls: Optional[List[Dict]]
|
13
|
-
annotations: Optional[Dict]
|
9
|
+
enabled: Optional[bool] = None
|
10
|
+
host_name: Optional[StrictStr] = Field(alias="hostName", default=None)
|
11
|
+
path: Optional[StrictStr] = None
|
12
|
+
tls: Optional[List[Dict]] = None
|
13
|
+
annotations: Optional[Dict] = None
|
14
14
|
|
15
15
|
class Config:
|
16
|
-
extra =
|
16
|
+
extra = "ignore"
|
@@ -6,4 +6,6 @@ from polyaxon._schemas.base import BaseSchemaModel
|
|
6
6
|
|
7
7
|
|
8
8
|
class IntervalsConfig(BaseSchemaModel):
|
9
|
-
compatibility_check: Optional[StrictInt] = Field(
|
9
|
+
compatibility_check: Optional[StrictInt] = Field(
|
10
|
+
alias="compatibilityCheck", default=None
|
11
|
+
)
|
@@ -4,11 +4,11 @@ from polyaxon._schemas.base import BaseSchemaModel
|
|
4
4
|
|
5
5
|
|
6
6
|
class OperatorsConfig(BaseSchemaModel):
|
7
|
-
tfjob: Optional[bool]
|
8
|
-
pytorchjob: Optional[bool]
|
9
|
-
paddlejob: Optional[bool]
|
10
|
-
mpijob: Optional[bool]
|
11
|
-
mxjob: Optional[bool]
|
12
|
-
xgbjob: Optional[bool]
|
13
|
-
daskjob: Optional[bool]
|
14
|
-
rayjob: Optional[bool]
|
7
|
+
tfjob: Optional[bool] = None
|
8
|
+
pytorchjob: Optional[bool] = None
|
9
|
+
paddlejob: Optional[bool] = None
|
10
|
+
mpijob: Optional[bool] = None
|
11
|
+
mxjob: Optional[bool] = None
|
12
|
+
xgbjob: Optional[bool] = None
|
13
|
+
daskjob: Optional[bool] = None
|
14
|
+
rayjob: Optional[bool] = None
|
@@ -6,12 +6,12 @@ from polyaxon._schemas.base import BaseSchemaModel
|
|
6
6
|
|
7
7
|
|
8
8
|
class ProxyConfig(BaseSchemaModel):
|
9
|
-
enabled: Optional[bool]
|
10
|
-
use_in_ops: Optional[bool] = Field(alias="useInOps")
|
11
|
-
http_proxy: Optional[StrictStr] = Field(alias="httpProxy")
|
12
|
-
https_proxy: Optional[StrictStr] = Field(alias="httpsProxy")
|
13
|
-
no_proxy: Optional[StrictStr] = Field(alias="noProxy")
|
14
|
-
port: Optional[StrictInt]
|
15
|
-
host: Optional[StrictStr]
|
16
|
-
protocol: Optional[StrictStr]
|
17
|
-
kind: Optional[StrictStr]
|
9
|
+
enabled: Optional[bool] = None
|
10
|
+
use_in_ops: Optional[bool] = Field(alias="useInOps", default=None)
|
11
|
+
http_proxy: Optional[StrictStr] = Field(alias="httpProxy", default=None)
|
12
|
+
https_proxy: Optional[StrictStr] = Field(alias="httpsProxy", default=None)
|
13
|
+
no_proxy: Optional[StrictStr] = Field(alias="noProxy", default=None)
|
14
|
+
port: Optional[StrictInt] = None
|
15
|
+
host: Optional[StrictStr] = None
|
16
|
+
protocol: Optional[StrictStr] = None
|
17
|
+
kind: Optional[StrictStr] = None
|
polyaxon/_deploy/schemas/rbac.py
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
from typing import Optional
|
2
2
|
|
3
|
-
from clipped.compact.pydantic import StrictStr,
|
3
|
+
from clipped.compact.pydantic import NAME_REGEX, StrictStr, patter_constr
|
4
4
|
from clipped.types.email import EmailStr
|
5
5
|
|
6
|
-
from polyaxon._schemas.base import
|
6
|
+
from polyaxon._schemas.base import BaseSchemaModel
|
7
7
|
|
8
8
|
|
9
9
|
class RootUserConfig(BaseSchemaModel):
|
10
|
-
username: Optional[
|
11
|
-
password: Optional[StrictStr]
|
12
|
-
email: Optional[EmailStr]
|
10
|
+
username: Optional[patter_constr(pattern=NAME_REGEX)] = None # type: ignore[valid-type]
|
11
|
+
password: Optional[StrictStr] = None
|
12
|
+
email: Optional[EmailStr] = None
|
@@ -1,27 +1,37 @@
|
|
1
1
|
from typing import Optional
|
2
2
|
|
3
|
-
from clipped.compact.pydantic import
|
3
|
+
from clipped.compact.pydantic import (
|
4
|
+
Field,
|
5
|
+
StrictInt,
|
6
|
+
StrictStr,
|
7
|
+
model_validator,
|
8
|
+
validation_after,
|
9
|
+
)
|
4
10
|
from clipped.config.schema import skip_partial
|
5
11
|
|
6
12
|
from polyaxon._schemas.base import BaseSchemaModel
|
7
13
|
|
8
14
|
|
9
|
-
def validate_security_context(user, group):
|
10
|
-
if any([user, group]) and not all([user, group]):
|
11
|
-
raise ValueError("Security context requires both `user` and `group` or none.")
|
12
|
-
|
13
|
-
|
14
15
|
class SecurityContextConfig(BaseSchemaModel):
|
15
|
-
enabled: Optional[bool]
|
16
|
-
run_as_user: Optional[StrictInt] = Field(alias="runAsUser")
|
17
|
-
run_as_group: Optional[StrictInt] = Field(alias="runAsGroup")
|
18
|
-
fs_group: Optional[StrictInt] = Field(alias="fsGroup")
|
19
|
-
fs_group_change_policy: Optional[StrictStr] = Field(
|
20
|
-
|
21
|
-
|
16
|
+
enabled: Optional[bool] = None
|
17
|
+
run_as_user: Optional[StrictInt] = Field(alias="runAsUser", default=None)
|
18
|
+
run_as_group: Optional[StrictInt] = Field(alias="runAsGroup", default=None)
|
19
|
+
fs_group: Optional[StrictInt] = Field(alias="fsGroup", default=None)
|
20
|
+
fs_group_change_policy: Optional[StrictStr] = Field(
|
21
|
+
alias="fsGroupChangePolicy", default=None
|
22
|
+
)
|
23
|
+
allow_privilege_escalation: Optional[bool] = Field(
|
24
|
+
alias="allowPrivilegeEscalation", default=None
|
25
|
+
)
|
26
|
+
run_as_non_root: Optional[bool] = Field(alias="runAsNonRoot", default=None)
|
22
27
|
|
23
|
-
@
|
28
|
+
@model_validator(**validation_after)
|
24
29
|
@skip_partial
|
25
30
|
def validate_security_context(cls, values):
|
26
|
-
|
31
|
+
user = cls.get_value_for_key("run_as_user", values)
|
32
|
+
group = cls.get_value_for_key("run_as_group", values)
|
33
|
+
if any([user, group]) and not all([user, group]):
|
34
|
+
raise ValueError(
|
35
|
+
"Security context requires both `user` and `group` or none."
|
36
|
+
)
|
27
37
|
return values
|
@@ -1,6 +1,6 @@
|
|
1
1
|
from typing import Dict, List, Optional
|
2
2
|
|
3
|
-
from clipped.compact.pydantic import
|
3
|
+
from clipped.compact.pydantic import Field, StrictInt, StrictStr
|
4
4
|
|
5
5
|
from polyaxon._deploy.schemas.celery import CeleryConfig
|
6
6
|
from polyaxon._deploy.schemas.service_types import ServiceTypes
|
@@ -9,119 +9,123 @@ from polyaxon._schemas.services import BaseServiceConfig
|
|
9
9
|
|
10
10
|
|
11
11
|
class DeploymentService(BaseServiceConfig):
|
12
|
-
enabled: Optional[bool]
|
13
|
-
replicas: Optional[StrictInt]
|
14
|
-
concurrency: Optional[StrictInt]
|
15
|
-
per_core: Optional[bool] = Field(alias="perCore")
|
16
|
-
scheme: Optional[StrictStr]
|
12
|
+
enabled: Optional[bool] = None
|
13
|
+
replicas: Optional[StrictInt] = None
|
14
|
+
concurrency: Optional[StrictInt] = None
|
15
|
+
per_core: Optional[bool] = Field(alias="perCore", default=None)
|
16
|
+
scheme: Optional[StrictStr] = None
|
17
17
|
|
18
18
|
|
19
19
|
class WorkerServiceConfig(DeploymentService):
|
20
|
-
celery: Optional[CeleryConfig]
|
20
|
+
celery: Optional[CeleryConfig] = None
|
21
21
|
|
22
22
|
|
23
23
|
class AgentServiceConfig(DeploymentService):
|
24
|
-
instance: Optional[StrictStr]
|
25
|
-
token: Optional[StrictStr]
|
26
|
-
watch_cluster: Optional[bool] = Field(alias="watchCluster")
|
27
|
-
additional_namespaces: Optional[List[str]] = Field(
|
24
|
+
instance: Optional[StrictStr] = None
|
25
|
+
token: Optional[StrictStr] = None
|
26
|
+
watch_cluster: Optional[bool] = Field(alias="watchCluster", default=None)
|
27
|
+
additional_namespaces: Optional[List[str]] = Field(
|
28
|
+
alias="additionalNamespaces", default=None
|
29
|
+
)
|
28
30
|
service_account_annotations: Optional[Dict] = Field(
|
29
|
-
alias="serviceAccountAnnotations"
|
31
|
+
alias="serviceAccountAnnotations", default=None
|
30
32
|
)
|
31
|
-
is_replica: Optional[bool] = Field(alias="isReplica")
|
33
|
+
is_replica: Optional[bool] = Field(alias="isReplica", default=None)
|
32
34
|
|
33
35
|
|
34
36
|
class OperatorServiceConfig(DeploymentService):
|
35
|
-
skip_crd: Optional[bool] = Field(alias="skipCRD")
|
37
|
+
skip_crd: Optional[bool] = Field(alias="skipCRD", default=None)
|
36
38
|
|
37
39
|
|
38
40
|
class BaseService(BaseSchemaModel):
|
39
|
-
name: Optional[StrictStr]
|
40
|
-
type: Optional[ServiceTypes]
|
41
|
-
port: Optional[StrictInt]
|
42
|
-
target_port: Optional[StrictInt] = Field(alias="targetPort")
|
43
|
-
node_port: Optional[StrictInt] = Field(alias="nodePort")
|
44
|
-
annotations: Optional[Dict]
|
41
|
+
name: Optional[StrictStr] = None
|
42
|
+
type: Optional[ServiceTypes] = None
|
43
|
+
port: Optional[StrictInt] = None
|
44
|
+
target_port: Optional[StrictInt] = Field(alias="targetPort", default=None)
|
45
|
+
node_port: Optional[StrictInt] = Field(alias="nodePort", default=None)
|
46
|
+
annotations: Optional[Dict] = None
|
45
47
|
|
46
48
|
class Config:
|
47
|
-
extra =
|
49
|
+
extra = "allow"
|
48
50
|
|
49
51
|
|
50
52
|
class ApiServiceConfig(DeploymentService):
|
51
|
-
service: Optional[BaseService]
|
53
|
+
service: Optional[BaseService] = None
|
52
54
|
|
53
55
|
|
54
56
|
class HooksConfig(DeploymentService):
|
55
|
-
load_fixtures: Optional[bool] = Field(alias="loadFixtures")
|
56
|
-
tables: Optional[bool] = Field(alias="tables")
|
57
|
-
sync_db: Optional[bool] = Field(alias="syncdb")
|
58
|
-
admin_user: Optional[bool] = Field(alias="adminUser")
|
59
|
-
default_org: Optional[bool] = Field(alias="defaultOrg")
|
57
|
+
load_fixtures: Optional[bool] = Field(alias="loadFixtures", default=None)
|
58
|
+
tables: Optional[bool] = Field(alias="tables", default=None)
|
59
|
+
sync_db: Optional[bool] = Field(alias="syncdb", default=None)
|
60
|
+
admin_user: Optional[bool] = Field(alias="adminUser", default=None)
|
61
|
+
default_org: Optional[bool] = Field(alias="defaultOrg", default=None)
|
60
62
|
|
61
63
|
|
62
64
|
class ThirdPartyService(DeploymentService):
|
63
|
-
persistence: Optional[Dict]
|
65
|
+
persistence: Optional[Dict] = None
|
64
66
|
|
65
67
|
class Config:
|
66
|
-
extra =
|
68
|
+
extra = "allow"
|
67
69
|
|
68
70
|
|
69
71
|
class PostgresqlConfig(ThirdPartyService):
|
70
|
-
auth: Optional[Dict]
|
71
|
-
conn_max_age: Optional[StrictInt] = Field(alias="connMaxAge")
|
72
|
+
auth: Optional[Dict] = None
|
73
|
+
conn_max_age: Optional[StrictInt] = Field(alias="connMaxAge", default=None)
|
72
74
|
|
73
75
|
|
74
76
|
class RedisConfig(ThirdPartyService):
|
75
|
-
image: Optional[Dict] # type: ignore[assignment]
|
76
|
-
non_broker: Optional[bool] = Field(alias="nonBroker")
|
77
|
-
use_password: Optional[bool] = Field(alias="usePassword")
|
78
|
-
auth: Optional[Dict]
|
77
|
+
image: Optional[Dict] = None # type: ignore[assignment]
|
78
|
+
non_broker: Optional[bool] = Field(alias="nonBroker", default=None)
|
79
|
+
use_password: Optional[bool] = Field(alias="usePassword", default=None)
|
80
|
+
auth: Optional[Dict] = None
|
79
81
|
|
80
82
|
|
81
83
|
class RabbitmqConfig(ThirdPartyService):
|
82
|
-
auth: Optional[Dict]
|
84
|
+
auth: Optional[Dict] = None
|
83
85
|
|
84
86
|
|
85
87
|
class ExternalService(BaseSchemaModel):
|
86
|
-
user: Optional[StrictStr]
|
87
|
-
password: Optional[StrictStr]
|
88
|
-
host: Optional[StrictStr]
|
89
|
-
port: Optional[StrictInt]
|
90
|
-
database: Optional[StrictStr]
|
91
|
-
use_password: Optional[bool] = Field(alias="usePassword")
|
92
|
-
conn_max_age: Optional[StrictInt] = Field(alias="connMaxAge")
|
93
|
-
pgbouncer: Optional[Dict]
|
94
|
-
options: Optional[Dict]
|
95
|
-
use_resolver: Optional[bool] = Field(alias="useResolver")
|
96
|
-
corporate_proxy: Optional[StrictStr] = Field(alias="corporateProxy")
|
88
|
+
user: Optional[StrictStr] = None
|
89
|
+
password: Optional[StrictStr] = None
|
90
|
+
host: Optional[StrictStr] = None
|
91
|
+
port: Optional[StrictInt] = None
|
92
|
+
database: Optional[StrictStr] = None
|
93
|
+
use_password: Optional[bool] = Field(alias="usePassword", default=None)
|
94
|
+
conn_max_age: Optional[StrictInt] = Field(alias="connMaxAge", default=None)
|
95
|
+
pgbouncer: Optional[Dict] = None
|
96
|
+
options: Optional[Dict] = None
|
97
|
+
use_resolver: Optional[bool] = Field(alias="useResolver", default=None)
|
98
|
+
corporate_proxy: Optional[StrictStr] = Field(alias="corporateProxy", default=None)
|
97
99
|
|
98
100
|
|
99
101
|
class ExternalBackend(BaseSchemaModel):
|
100
|
-
enabled: Optional[bool]
|
101
|
-
backend: Optional[StrictStr]
|
102
|
-
url: Optional[StrictStr]
|
103
|
-
options: Optional[Dict]
|
102
|
+
enabled: Optional[bool] = None
|
103
|
+
backend: Optional[StrictStr] = None
|
104
|
+
url: Optional[StrictStr] = None
|
105
|
+
options: Optional[Dict] = None
|
104
106
|
|
105
107
|
|
106
108
|
class AuthServicesConfig(BaseSchemaModel):
|
107
|
-
github: Optional[ExternalBackend]
|
108
|
-
gitlab: Optional[ExternalBackend]
|
109
|
-
bitbucket: Optional[ExternalBackend]
|
110
|
-
google: Optional[ExternalBackend]
|
111
|
-
okta: Optional[ExternalBackend]
|
112
|
-
onelogin: Optional[ExternalBackend]
|
113
|
-
azuread: Optional[ExternalBackend]
|
109
|
+
github: Optional[ExternalBackend] = None
|
110
|
+
gitlab: Optional[ExternalBackend] = None
|
111
|
+
bitbucket: Optional[ExternalBackend] = None
|
112
|
+
google: Optional[ExternalBackend] = None
|
113
|
+
okta: Optional[ExternalBackend] = None
|
114
|
+
onelogin: Optional[ExternalBackend] = None
|
115
|
+
azuread: Optional[ExternalBackend] = None
|
114
116
|
|
115
117
|
|
116
118
|
class ExternalServicesConfig(BaseSchemaModel):
|
117
|
-
redis: Optional[ExternalService]
|
118
|
-
rabbitmq: Optional[ExternalService]
|
119
|
-
postgresql: Optional[ExternalService]
|
120
|
-
gateway: Optional[ExternalService]
|
121
|
-
api: Optional[ExternalService]
|
122
|
-
transactions: Optional[ExternalBackend]
|
123
|
-
analytics: Optional[ExternalBackend]
|
124
|
-
metrics: Optional[ExternalBackend]
|
125
|
-
errors: Optional[ExternalBackend]
|
126
|
-
auth: Optional[AuthServicesConfig]
|
127
|
-
allowed_versions: Optional[List[StrictStr]] = Field(
|
119
|
+
redis: Optional[ExternalService] = None
|
120
|
+
rabbitmq: Optional[ExternalService] = None
|
121
|
+
postgresql: Optional[ExternalService] = None
|
122
|
+
gateway: Optional[ExternalService] = None
|
123
|
+
api: Optional[ExternalService] = None
|
124
|
+
transactions: Optional[ExternalBackend] = None
|
125
|
+
analytics: Optional[ExternalBackend] = None
|
126
|
+
metrics: Optional[ExternalBackend] = None
|
127
|
+
errors: Optional[ExternalBackend] = None
|
128
|
+
auth: Optional[AuthServicesConfig] = None
|
129
|
+
allowed_versions: Optional[List[StrictStr]] = Field(
|
130
|
+
alias="allowedVersions", default=None
|
131
|
+
)
|
polyaxon/_deploy/schemas/ssl.py
CHANGED
@@ -6,6 +6,6 @@ from polyaxon._schemas.base import BaseSchemaModel
|
|
6
6
|
|
7
7
|
|
8
8
|
class SSLConfig(BaseSchemaModel):
|
9
|
-
enabled: Optional[bool]
|
10
|
-
secret_name: Optional[StrictStr] = Field(alias="secretName")
|
11
|
-
path: Optional[StrictStr]
|
9
|
+
enabled: Optional[bool] = None
|
10
|
+
secret_name: Optional[StrictStr] = Field(alias="secretName", default=None)
|
11
|
+
path: Optional[StrictStr] = None
|
polyaxon/_deploy/schemas/ui.py
CHANGED
@@ -6,9 +6,13 @@ from polyaxon._schemas.base import BaseSchemaModel
|
|
6
6
|
|
7
7
|
|
8
8
|
class UIConfig(BaseSchemaModel):
|
9
|
-
enabled: Optional[bool]
|
10
|
-
offline: Optional[bool]
|
11
|
-
static_url: Optional[StrictStr] = Field(alias="staticUrl")
|
12
|
-
base_url: Optional[StrictStr] = Field(alias="baseUrl")
|
13
|
-
assets_version: Optional[StrictStr] = Field(alias="assetsVersion")
|
14
|
-
admin_enabled: Optional[bool] = Field(alias="adminEnabled")
|
9
|
+
enabled: Optional[bool] = None
|
10
|
+
offline: Optional[bool] = None
|
11
|
+
static_url: Optional[StrictStr] = Field(alias="staticUrl", default=None)
|
12
|
+
base_url: Optional[StrictStr] = Field(alias="baseUrl", default=None)
|
13
|
+
assets_version: Optional[StrictStr] = Field(alias="assetsVersion", default=None)
|
14
|
+
admin_enabled: Optional[bool] = Field(alias="adminEnabled", default=None)
|
15
|
+
single_url: Optional[bool] = Field(alias="singleUrl", default=None)
|
16
|
+
default_streams_url: Optional[StrictStr] = Field(
|
17
|
+
alias="defaultStreamsUrl", default=None
|
18
|
+
)
|
@@ -120,8 +120,11 @@ class DockerBuilder(DockerMixin):
|
|
120
120
|
if not self.registries:
|
121
121
|
return
|
122
122
|
for registry in self.registries:
|
123
|
+
username = (
|
124
|
+
registry.username if hasattr(registry, "username") else registry.user
|
125
|
+
)
|
123
126
|
self.docker.login(
|
124
|
-
username=
|
127
|
+
username=username,
|
125
128
|
password=registry.password,
|
126
129
|
registry=registry.host_port,
|
127
130
|
reauth=True,
|
@@ -49,11 +49,8 @@ class ContainerMixin(BaseConverter):
|
|
49
49
|
env: List[docker_types.V1EnvVar],
|
50
50
|
) -> List[docker_types.V1EnvVar]:
|
51
51
|
def sanitize_env_dict(d: Dict):
|
52
|
-
return docker_types.V1EnvVar(
|
53
|
-
|
54
|
-
d_k: sanitize_value(d_v, handle_dict=False)
|
55
|
-
for d_k, d_v in d.items()
|
56
|
-
}
|
52
|
+
return docker_types.V1EnvVar.make(
|
53
|
+
{d_k: sanitize_value(d_v, handle_dict=False) for d_k, d_v in d.items()}
|
57
54
|
)
|
58
55
|
|
59
56
|
results = []
|
@@ -63,8 +60,8 @@ class ContainerMixin(BaseConverter):
|
|
63
60
|
results.append(e)
|
64
61
|
elif isinstance(e, tuple):
|
65
62
|
if e[1] is not None:
|
66
|
-
e = docker_types.V1EnvVar(
|
67
|
-
|
63
|
+
e = docker_types.V1EnvVar.make(
|
64
|
+
(e[0], sanitize_value(e[1], handle_dict=False))
|
68
65
|
)
|
69
66
|
results.append(e)
|
70
67
|
elif isinstance(e, docker_types.V1EnvVar):
|
@@ -42,7 +42,7 @@ class EnvMixin(BaseConverter):
|
|
42
42
|
except (ValueError, TypeError) as e:
|
43
43
|
raise PolyaxonConverterError(e)
|
44
44
|
|
45
|
-
return docker_types.V1EnvVar(
|
45
|
+
return docker_types.V1EnvVar.make((name, value))
|
46
46
|
|
47
47
|
@staticmethod
|
48
48
|
def _get_from_json_resource(
|
@@ -59,7 +59,7 @@ class EnvMixin(BaseConverter):
|
|
59
59
|
except Exception as e:
|
60
60
|
raise PolyaxonConverterError from e
|
61
61
|
|
62
|
-
return [docker_types.V1EnvVar(
|
62
|
+
return [docker_types.V1EnvVar.make(k) for k in (secret_value.items())]
|
63
63
|
|
64
64
|
@classmethod
|
65
65
|
def _get_env_from_json_resources(
|
@@ -82,10 +82,10 @@ class EnvMixin(BaseConverter):
|
|
82
82
|
try:
|
83
83
|
secret_value = orjson_loads(secret)
|
84
84
|
except orjson.JSONDecodeError:
|
85
|
-
return docker_types.V1EnvVar(
|
85
|
+
return docker_types.V1EnvVar.make((key, secret))
|
86
86
|
|
87
87
|
value = secret_value.get(key)
|
88
|
-
return docker_types.V1EnvVar(
|
88
|
+
return docker_types.V1EnvVar.make((key, value))
|
89
89
|
|
90
90
|
@classmethod
|
91
91
|
def _get_items_from_json_resource(
|
@@ -104,7 +104,7 @@ class EnvMixin(BaseConverter):
|
|
104
104
|
for item in resource.items:
|
105
105
|
value = secret_value.get(item)
|
106
106
|
if value:
|
107
|
-
items_from.append(docker_types.V1EnvVar(
|
107
|
+
items_from.append(docker_types.V1EnvVar.make((item, value)))
|
108
108
|
return items_from
|
109
109
|
|
110
110
|
@classmethod
|
@@ -14,7 +14,7 @@ class MountsMixin(BaseConverter):
|
|
14
14
|
volume = f"{host_path}:{mount_path}"
|
15
15
|
if read_only:
|
16
16
|
volume += ":ro"
|
17
|
-
return docker_types.V1VolumeMount(
|
17
|
+
return docker_types.V1VolumeMount.make(("-v", volume))
|
18
18
|
|
19
19
|
@staticmethod
|
20
20
|
def _get_docker_mount(
|
@@ -23,7 +23,7 @@ class MountsMixin(BaseConverter):
|
|
23
23
|
mount = f"type=tmpfs,destination={mount_path}"
|
24
24
|
if read_only:
|
25
25
|
mount += ",ro"
|
26
|
-
return docker_types.V1VolumeMount(
|
26
|
+
return docker_types.V1VolumeMount.make(("--mount", mount))
|
27
27
|
|
28
28
|
@classmethod
|
29
29
|
def _get_config_volume(cls) -> docker_types.V1VolumeMount:
|
polyaxon/_docker/docker_types.py
CHANGED
@@ -1,47 +1,72 @@
|
|
1
1
|
from typing import Dict, List, Optional, Tuple, Union
|
2
2
|
|
3
|
-
from clipped.compact.pydantic import
|
3
|
+
from clipped.compact.pydantic import (
|
4
|
+
PYDANTIC_VERSION,
|
5
|
+
Field,
|
6
|
+
field_validator,
|
7
|
+
validation_always,
|
8
|
+
)
|
4
9
|
from clipped.utils.units import to_cpu_value, to_memory_bytes, to_unit_memory
|
5
10
|
|
6
|
-
from polyaxon._schemas.base import BaseSchemaModel
|
11
|
+
from polyaxon._schemas.base import BaseSchemaModel, RootModel
|
7
12
|
|
8
13
|
|
9
|
-
class V1EnvVar(
|
10
|
-
|
14
|
+
class V1EnvVar(RootModel):
|
15
|
+
if PYDANTIC_VERSION.startswith("2."):
|
16
|
+
root: Union[Tuple[str, str], Dict[str, str]]
|
17
|
+
else:
|
18
|
+
__root__: Union[Tuple[str, str], Dict[str, str]]
|
11
19
|
|
12
20
|
def to_cmd(self):
|
13
|
-
|
14
|
-
value = self.__root__
|
15
|
-
else:
|
16
|
-
value = self.__root__.items()
|
21
|
+
value = self.get_root()
|
17
22
|
return [f"{value[0]}={value[1]}"]
|
18
23
|
|
19
24
|
|
20
|
-
class V1VolumeMount(
|
21
|
-
|
25
|
+
class V1VolumeMount(RootModel):
|
26
|
+
if PYDANTIC_VERSION.startswith("2."):
|
27
|
+
root: Tuple[str, str]
|
28
|
+
else:
|
29
|
+
__root__: Tuple[str, str]
|
22
30
|
|
23
31
|
def to_cmd(self):
|
24
|
-
return list(self.
|
32
|
+
return list(self.get_root())
|
33
|
+
|
25
34
|
|
35
|
+
ROOT_TYPE = Union[
|
36
|
+
int,
|
37
|
+
str,
|
38
|
+
List[Union[int, str]],
|
39
|
+
Tuple[Union[int, str], Union[int, str]],
|
40
|
+
Dict[Union[int, str], Union[Union[int, str], Union[int, str]]],
|
41
|
+
]
|
26
42
|
|
27
|
-
|
28
|
-
|
43
|
+
|
44
|
+
class V1ContainerPort(RootModel):
|
45
|
+
if PYDANTIC_VERSION.startswith("2."):
|
46
|
+
root: ROOT_TYPE
|
47
|
+
else:
|
48
|
+
__root__: ROOT_TYPE
|
29
49
|
|
30
50
|
def to_cmd(self):
|
31
|
-
|
32
|
-
|
51
|
+
root = self.get_root()
|
52
|
+
if isinstance(root, (str, int)):
|
53
|
+
return [root]
|
33
54
|
|
34
|
-
if isinstance(
|
35
|
-
value =
|
55
|
+
if isinstance(root, (list, tuple)):
|
56
|
+
value = root
|
36
57
|
else:
|
37
|
-
value =
|
58
|
+
value = root.items()
|
38
59
|
return list(value[0])
|
39
60
|
|
40
61
|
|
41
62
|
class V1ResourceRequirements(BaseSchemaModel):
|
42
|
-
cpus: Optional[str]
|
43
|
-
memory: Optional[str]
|
44
|
-
gpus: Optional[str]
|
63
|
+
cpus: Optional[Union[str, float, int]] = None
|
64
|
+
memory: Optional[Union[str, float, int]] = None
|
65
|
+
gpus: Optional[str] = None
|
66
|
+
|
67
|
+
@field_validator("cpus", "memory", **validation_always)
|
68
|
+
def value_to_str(cls, v):
|
69
|
+
return str(v)
|
45
70
|
|
46
71
|
@staticmethod
|
47
72
|
def from_k8s_cpu(cpu: str) -> Union[str, float]:
|
@@ -68,15 +93,17 @@ class V1ResourceRequirements(BaseSchemaModel):
|
|
68
93
|
|
69
94
|
|
70
95
|
class V1Container(BaseSchemaModel):
|
71
|
-
image: Optional[str]
|
72
|
-
name: Optional[str]
|
73
|
-
command: Optional[List[str]]
|
74
|
-
args: Optional[List[str]]
|
75
|
-
env: Optional[List[V1EnvVar]]
|
76
|
-
volume_mounts: Optional[List[V1VolumeMount]] = Field(
|
77
|
-
|
78
|
-
|
79
|
-
|
96
|
+
image: Optional[str] = None
|
97
|
+
name: Optional[str] = None
|
98
|
+
command: Optional[List[str]] = None
|
99
|
+
args: Optional[List[str]] = None
|
100
|
+
env: Optional[List[V1EnvVar]] = None
|
101
|
+
volume_mounts: Optional[List[V1VolumeMount]] = Field(
|
102
|
+
alias="volumeMounts", default=None
|
103
|
+
)
|
104
|
+
resources: Optional[V1ResourceRequirements] = None
|
105
|
+
ports: Optional[List[V1ContainerPort]] = None
|
106
|
+
working_dir: Optional[str] = Field(alias="workingDir", default=None)
|
80
107
|
|
81
108
|
def get_cmd_args(self):
|
82
109
|
cmd_args = ["run", "--rm"]
|
polyaxon/_env_vars/keys.py
CHANGED
@@ -149,6 +149,8 @@ ENV_KEYS_UI_ASSETS_VERSION = "POLYAXON_UI_ASSETS_VERSION"
|
|
149
149
|
ENV_KEYS_UI_ENABLED = "POLYAXON_UI_ENABLED"
|
150
150
|
ENV_KEYS_UI_OFFLINE = "POLYAXON_UI_OFFLINE"
|
151
151
|
ENV_KEYS_UI_BASE_URL = "POLYAXON_UI_BASE_URL"
|
152
|
+
ENV_KEYS_UI_SINGLE_URL = "POLYAXON_UI_SINGLE_URL"
|
153
|
+
ENV_KEYS_UI_DEFAULT_STREAMS_URL = "POLYAXON_UI_DEFAULT_STREAMS_URL"
|
152
154
|
ENV_KEYS_STATIC_URL = "POLYAXON_STATIC_URL"
|
153
155
|
ENV_KEYS_DNS_USE_RESOLVER = "POLYAXON_DNS_USE_RESOLVER"
|
154
156
|
ENV_KEYS_DNS_CUSTOM_CLUSTER = "POLYAXON_DNS_CUSTOM_CLUSTER"
|
polyaxon/_flow/__init__.py
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
from clipped.compact.pydantic import model_rebuild
|
2
|
+
|
1
3
|
from polyaxon._flow.builds import V1Build
|
2
4
|
from polyaxon._flow.cache import V1Cache
|
3
5
|
from polyaxon._flow.component import V1Component
|
@@ -106,5 +108,4 @@ from polyaxon._flow.termination import V1Termination
|
|
106
108
|
from polyaxon._flow.trigger_policies import V1TriggerPolicy
|
107
109
|
|
108
110
|
# Forward references for operations and components
|
109
|
-
V1Dag
|
110
|
-
V1Dag.update_forward_refs(V1Component=V1Component)
|
111
|
+
model_rebuild(V1Dag, V1Operation=V1Operation, V1Component=V1Component)
|