polyaxon 2.1.0rc9__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/artifacts.py +96 -11
- polyaxon/_cli/components.py +96 -11
- polyaxon/_cli/config.py +31 -0
- polyaxon/_cli/dashboard.py +12 -2
- polyaxon/_cli/init.py +1 -1
- polyaxon/_cli/models.py +96 -11
- polyaxon/_cli/operations.py +133 -58
- polyaxon/_cli/project_versions.py +139 -6
- polyaxon/_cli/projects.py +23 -9
- polyaxon/_cli/run.py +43 -9
- polyaxon/_cli/services/agent.py +2 -2
- polyaxon/_cli/version.py +4 -1
- polyaxon/_client/mixin.py +39 -0
- polyaxon/_client/project.py +218 -23
- polyaxon/_client/run.py +84 -27
- polyaxon/_compiler/contexts/contexts.py +4 -0
- polyaxon/_compiler/contexts/ray_job.py +4 -2
- polyaxon/_compiler/resolver/agent.py +22 -10
- polyaxon/_compiler/resolver/runtime.py +7 -3
- polyaxon/_constants/metadata.py +1 -0
- polyaxon/_contexts/keys.py +1 -0
- polyaxon/_contexts/paths.py +1 -1
- polyaxon/_deploy/operators/compose.py +1 -27
- polyaxon/_deploy/schemas/auth.py +3 -3
- polyaxon/_deploy/schemas/celery.py +10 -8
- polyaxon/_deploy/schemas/deployment.py +148 -115
- polyaxon/_deploy/schemas/email.py +8 -8
- polyaxon/_deploy/schemas/ingress.py +7 -7
- polyaxon/_deploy/schemas/intervals.py +2 -7
- polyaxon/_deploy/schemas/operators.py +8 -8
- polyaxon/_deploy/schemas/proxy.py +9 -8
- 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 +75 -66
- 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/getters/owner_entity.py +4 -2
- polyaxon/_env_vars/getters/project.py +4 -2
- polyaxon/_env_vars/getters/run.py +5 -2
- polyaxon/_env_vars/keys.py +3 -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 +43 -25
- 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 +57 -41
- 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/fs.py +1 -1
- polyaxon/_fs/watcher.py +26 -27
- polyaxon/_k8s/converter/base/base.py +2 -1
- polyaxon/_k8s/converter/base/main.py +1 -0
- polyaxon/_k8s/converter/common/accelerators.py +7 -4
- polyaxon/_k8s/converter/converters/ray_job.py +4 -2
- polyaxon/_k8s/custom_resources/dask_job.py +3 -0
- polyaxon/_k8s/custom_resources/kubeflow/common.py +4 -1
- polyaxon/_k8s/custom_resources/ray_job.py +3 -0
- polyaxon/_k8s/custom_resources/setter.py +1 -1
- polyaxon/_k8s/executor/async_executor.py +2 -0
- polyaxon/_k8s/k8s_validation.py +1 -1
- polyaxon/_k8s/logging/async_monitor.py +82 -11
- polyaxon/_k8s/manager/async_manager.py +15 -0
- polyaxon/_k8s/manager/manager.py +16 -1
- polyaxon/_local_process/__init__.py +0 -0
- polyaxon/_local_process/agent.py +6 -0
- polyaxon/_local_process/converter/__init__.py +1 -0
- polyaxon/_local_process/converter/base/__init__.py +1 -0
- polyaxon/_local_process/converter/base/base.py +140 -0
- polyaxon/_local_process/converter/base/containers.py +66 -0
- polyaxon/_local_process/converter/base/env_vars.py +253 -0
- polyaxon/_local_process/converter/base/init.py +414 -0
- polyaxon/_local_process/converter/base/main.py +74 -0
- polyaxon/_local_process/converter/base/mounts.py +82 -0
- polyaxon/_local_process/converter/converters/__init__.py +8 -0
- polyaxon/_local_process/converter/converters/job.py +40 -0
- polyaxon/_local_process/converter/converters/service.py +41 -0
- polyaxon/_local_process/converter/mixins.py +38 -0
- polyaxon/_local_process/executor.py +132 -0
- polyaxon/_local_process/process_types.py +42 -0
- 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/_pql/manager.py +1 -1
- polyaxon/_runner/agent/async_agent.py +25 -11
- polyaxon/_runner/agent/base_agent.py +19 -10
- polyaxon/_runner/agent/sync_agent.py +24 -10
- polyaxon/_runner/converter/converter.py +12 -4
- polyaxon/_runner/executor.py +1 -1
- 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 +222 -43
- 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 +85 -85
- polyaxon/_sdk/api/presets_v1_api.py +15 -15
- polyaxon/_sdk/api/project_dashboards_v1_api.py +29 -29
- polyaxon/_sdk/api/project_searches_v1_api.py +29 -29
- polyaxon/_sdk/api/projects_v1_api.py +284 -107
- polyaxon/_sdk/api/queues_v1_api.py +19 -19
- polyaxon/_sdk/api/runs_v1_api.py +313 -359
- polyaxon/_sdk/api/searches_v1_api.py +15 -15
- polyaxon/_sdk/api/service_accounts_v1_api.py +31 -31
- polyaxon/_sdk/api/tags_v1_api.py +17 -17
- polyaxon/_sdk/api/teams_v1_api.py +2854 -402
- polyaxon/_sdk/api/users_v1_api.py +254 -78
- polyaxon/_sdk/api/versions_v1_api.py +7 -7
- polyaxon/_sdk/async_client/api_client.py +4 -0
- polyaxon/_sdk/schemas/__init__.py +1 -1
- polyaxon/_sdk/schemas/v1_activity.py +8 -8
- polyaxon/_sdk/schemas/v1_agent.py +18 -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 -1
- 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 +16 -9
- polyaxon/_sdk/schemas/v1_project.py +17 -17
- polyaxon/_sdk/schemas/v1_project_settings.py +12 -10
- 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 -7
- polyaxon/_sdk/schemas/v1_service_account.py +9 -9
- polyaxon/_sdk/schemas/v1_settings_catalog.py +4 -3
- polyaxon/_sdk/schemas/v1_tag.py +6 -6
- polyaxon/_sdk/schemas/v1_team.py +11 -8
- 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 -7
- polyaxon/_sdk/schemas/v1_user_access.py +17 -0
- 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 +39 -20
- polyaxon/_sidecar/container/monitors/logs.py +10 -13
- polyaxon/_sidecar/ignore.py +0 -1
- polyaxon/_utils/cli_constants.py +2 -0
- polyaxon/_utils/fqn_utils.py +25 -2
- polyaxon/_utils/test_utils.py +2 -1
- polyaxon/pkg.py +1 -1
- polyaxon/schemas.py +1 -1
- {polyaxon-2.1.0rc9.dist-info → polyaxon-2.6.0.dist-info}/METADATA +43 -43
- {polyaxon-2.1.0rc9.dist-info → polyaxon-2.6.0.dist-info}/RECORD +269 -252
- {polyaxon-2.1.0rc9.dist-info → polyaxon-2.6.0.dist-info}/WHEEL +1 -1
- polyaxon/_sdk/schemas/v1_project_user_access.py +0 -10
- {polyaxon-2.1.0rc9.dist-info → polyaxon-2.6.0.dist-info}/LICENSE +0 -0
- {polyaxon-2.1.0rc9.dist-info → polyaxon-2.6.0.dist-info}/entry_points.txt +0 -0
- {polyaxon-2.1.0rc9.dist-info → polyaxon-2.6.0.dist-info}/top_level.txt +0 -0
@@ -61,6 +61,7 @@ def resolve_globals_contexts(
|
|
61
61
|
cloning_kind: V1CloningKind = None,
|
62
62
|
original_uuid: Optional[str] = None,
|
63
63
|
is_independent: bool = True,
|
64
|
+
username: Optional[str] = None,
|
64
65
|
) -> Dict:
|
65
66
|
resolved_contexts = {
|
66
67
|
ctx_sections.GLOBALS: {
|
@@ -70,6 +71,7 @@ def resolve_globals_contexts(
|
|
70
71
|
owner_name, project_name
|
71
72
|
),
|
72
73
|
ctx_keys.PROJECT_UUID: project_uuid,
|
74
|
+
ctx_keys.USERNAME: username,
|
73
75
|
ctx_keys.RUN_INFO: get_run_instance(owner_name, project_name, run_uuid),
|
74
76
|
ctx_keys.NAME: run_name,
|
75
77
|
ctx_keys.UUID: run_uuid,
|
@@ -138,6 +140,7 @@ def resolve_contexts(
|
|
138
140
|
cloning_kind: V1CloningKind = None,
|
139
141
|
original_uuid: Optional[str] = None,
|
140
142
|
is_independent: bool = True,
|
143
|
+
username: Optional[str] = None,
|
141
144
|
) -> Dict:
|
142
145
|
run_kind = compiled_operation.get_run_kind()
|
143
146
|
if run_kind not in CONTEXTS_MANAGERS:
|
@@ -168,6 +171,7 @@ def resolve_contexts(
|
|
168
171
|
cloning_kind=cloning_kind,
|
169
172
|
original_uuid=original_uuid,
|
170
173
|
is_independent=is_independent,
|
174
|
+
username=username,
|
171
175
|
)
|
172
176
|
|
173
177
|
return CONTEXTS_MANAGERS[run_kind].resolve(
|
@@ -33,7 +33,9 @@ class RayJobContextsManager(BaseContextsManager):
|
|
33
33
|
connection_by_names=connection_by_names,
|
34
34
|
)
|
35
35
|
|
36
|
-
|
36
|
+
data = {
|
37
37
|
"head": _get_replica(job.head),
|
38
|
-
"workers": {wn: _get_replica(job.workers[wn]) for wn in job.workers},
|
39
38
|
}
|
39
|
+
if job.workers:
|
40
|
+
data["workers"] = {wn: _get_replica(job.workers[wn]) for wn in job.workers}
|
41
|
+
return data
|
@@ -1,7 +1,8 @@
|
|
1
|
-
from typing import Dict, List, Optional
|
1
|
+
from typing import Dict, List, Optional, Union
|
2
2
|
|
3
3
|
from clipped.compact.pydantic import Field
|
4
4
|
from clipped.utils.lists import to_list
|
5
|
+
from vents.connections import Connection, ConnectionResource
|
5
6
|
|
6
7
|
from polyaxon import settings
|
7
8
|
from polyaxon._auxiliaries import (
|
@@ -18,14 +19,14 @@ from polyaxon.exceptions import PolyaxonCompilerError
|
|
18
19
|
|
19
20
|
|
20
21
|
class AgentResolver(BaseSchemaModel):
|
21
|
-
polyaxon_sidecar: Optional[V1PolyaxonSidecarContainer]
|
22
|
-
polyaxon_init: Optional[V1PolyaxonInitContainer]
|
23
|
-
namespace: Optional[str]
|
24
|
-
secrets: Optional[List[V1ConnectionResource]]
|
25
|
-
config_maps: Optional[List[V1ConnectionResource]]
|
26
|
-
connection_by_names: Optional[Dict[str, V1Connection]]
|
27
|
-
artifacts_store: Optional[V1Connection]
|
28
|
-
default_sa: Optional[str]
|
22
|
+
polyaxon_sidecar: Optional[V1PolyaxonSidecarContainer] = None
|
23
|
+
polyaxon_init: Optional[V1PolyaxonInitContainer] = None
|
24
|
+
namespace: Optional[str] = None
|
25
|
+
secrets: Optional[List[Union[V1ConnectionResource, ConnectionResource]]] = None
|
26
|
+
config_maps: Optional[List[Union[V1ConnectionResource, ConnectionResource]]] = None
|
27
|
+
connection_by_names: Optional[Dict[str, Union[V1Connection, Connection]]] = None
|
28
|
+
artifacts_store: Optional[Union[V1Connection, Connection]] = None
|
29
|
+
default_sa: Optional[str] = None
|
29
30
|
internal_auth: Optional[bool] = Field(default=False)
|
30
31
|
|
31
32
|
def resolve(
|
@@ -49,7 +50,18 @@ class AgentResolver(BaseSchemaModel):
|
|
49
50
|
|
50
51
|
self.polyaxon_sidecar = agent_config.sidecar or get_default_sidecar_container()
|
51
52
|
self.polyaxon_init = agent_config.init or get_default_init_container()
|
52
|
-
|
53
|
+
if compiled_operation.namespace:
|
54
|
+
namespaces = agent_config.additional_namespaces or []
|
55
|
+
namespaces.append(agent_config.namespace)
|
56
|
+
if compiled_operation.namespace not in namespaces:
|
57
|
+
raise PolyaxonCompilerError(
|
58
|
+
"The provided namespace `{}` is not managed by the agent.".format(
|
59
|
+
compiled_operation.namespace
|
60
|
+
)
|
61
|
+
)
|
62
|
+
self.namespace = compiled_operation.namespace
|
63
|
+
else:
|
64
|
+
self.namespace = agent_config.namespace
|
53
65
|
|
54
66
|
def _resolve_run_connections(
|
55
67
|
self, compiled_operation: V1CompiledOperation, agent_config: AgentConfig
|
@@ -46,12 +46,14 @@ class BaseResolver:
|
|
46
46
|
cloning_kind: V1CloningKind = None,
|
47
47
|
original_uuid: Optional[str] = None,
|
48
48
|
is_independent: bool = True,
|
49
|
+
username: Optional[str] = None,
|
49
50
|
):
|
50
51
|
if not compiled_operation:
|
51
52
|
raise PolyaxonCompilerError("A run spec is required for resolution.")
|
52
53
|
self.run = run
|
53
54
|
self.compiled_operation = compiled_operation
|
54
55
|
self.owner_name = owner_name
|
56
|
+
self.username = username
|
55
57
|
self.project_name = project_name
|
56
58
|
self.project_uuid = project_uuid
|
57
59
|
self.project_uuid = project_uuid or project_name
|
@@ -105,6 +107,7 @@ class BaseResolver:
|
|
105
107
|
owner_name=self.owner_name,
|
106
108
|
project_name=self.project_name,
|
107
109
|
project_uuid=self.project_uuid,
|
110
|
+
username=self.username,
|
108
111
|
run_uuid=self.run_uuid,
|
109
112
|
run_name=self.run_name,
|
110
113
|
run_path=self.run_path,
|
@@ -174,14 +177,14 @@ class BaseResolver:
|
|
174
177
|
def resolve_access(self):
|
175
178
|
pass
|
176
179
|
|
177
|
-
def
|
180
|
+
def resolve_agent_environment(self):
|
178
181
|
agent_env = AgentResolver.construct()
|
179
182
|
agent_env.resolve(
|
180
183
|
compiled_operation=self.compiled_operation, agent_config=self.agent_config
|
181
184
|
)
|
182
185
|
self.polyaxon_sidecar = agent_env.polyaxon_sidecar
|
183
186
|
self.polyaxon_init = agent_env.polyaxon_init
|
184
|
-
self.namespace =
|
187
|
+
self.namespace = agent_env.namespace
|
185
188
|
self.secrets = agent_env.secrets
|
186
189
|
self.config_maps = agent_env.config_maps
|
187
190
|
self.connection_by_names = agent_env.connection_by_names
|
@@ -232,6 +235,7 @@ class BaseResolver:
|
|
232
235
|
cloning_kind=self.cloning_kind,
|
233
236
|
original_uuid=self.original_uuid,
|
234
237
|
is_independent=self.is_independent,
|
238
|
+
username=self.username,
|
235
239
|
)
|
236
240
|
|
237
241
|
def _apply_runtime_contexts(self):
|
@@ -281,8 +285,8 @@ class BaseResolver:
|
|
281
285
|
self.apply_operation_contexts()
|
282
286
|
self.resolve_io()
|
283
287
|
self.resolve_init_refs()
|
288
|
+
self.resolve_agent_environment()
|
284
289
|
self.resolve_access()
|
285
|
-
self.resolve_connections()
|
286
290
|
self.resolve_artifacts_lineage()
|
287
291
|
self.clean_init_refs()
|
288
292
|
self.resolve_state()
|
polyaxon/_constants/metadata.py
CHANGED
polyaxon/_contexts/keys.py
CHANGED
polyaxon/_contexts/paths.py
CHANGED
@@ -18,7 +18,7 @@ CONTEXT_RELATED_RUNS = "_related_runs"
|
|
18
18
|
CONTEXT_LOCAL_LINEAGES = "lineages.plx.json"
|
19
19
|
CONTEXT_LOCAL_CONTENT = "content.plx.json"
|
20
20
|
CONTEXT_LOCAL_README = "readme.plx.md"
|
21
|
-
CONTEXT_LOCAL_POLYAXONFILE = "polyaxonfile.plx.
|
21
|
+
CONTEXT_LOCAL_POLYAXONFILE = "polyaxonfile.plx.json"
|
22
22
|
CONTEXT_LOCAL_PROJECT = "project.plx.json"
|
23
23
|
CONTEXT_LOCAL_RUN = "run.plx.json"
|
24
24
|
CONTEXT_LOCAL_VERSION = "version.plx.json"
|
@@ -5,7 +5,7 @@ from polyaxon._env_vars.keys import ENV_KEYS_LOG_LEVEL, ENV_KEYS_SECRET_KEY
|
|
5
5
|
|
6
6
|
|
7
7
|
class ComposeOperator(CmdOperator):
|
8
|
-
CMD = "docker
|
8
|
+
CMD = "docker compose"
|
9
9
|
|
10
10
|
@classmethod
|
11
11
|
def params(cls, args):
|
@@ -112,30 +112,6 @@ class ComposeOperator(CmdOperator):
|
|
112
112
|
)
|
113
113
|
return env
|
114
114
|
|
115
|
-
@staticmethod
|
116
|
-
def _generate_intervals(config):
|
117
|
-
template = "{}={}"
|
118
|
-
env = []
|
119
|
-
if config.intervals:
|
120
|
-
env.append(
|
121
|
-
template.format(
|
122
|
-
"POLYAXON_INTERVALS_RUNS_SCHEDULER", config.intervals.runs_scheduler
|
123
|
-
)
|
124
|
-
)
|
125
|
-
env.append(
|
126
|
-
template.format(
|
127
|
-
"POLYAXON_INTERVALS_OPERATIONS_DEFAULT_RETRY_DELAY",
|
128
|
-
config.intervals.operations_default_retry_delay,
|
129
|
-
)
|
130
|
-
)
|
131
|
-
env.append(
|
132
|
-
template.format(
|
133
|
-
"POLYAXON_INTERVALS_OPERATIONS_MAX_RETRY_DELAY",
|
134
|
-
config.intervals.operations_max_retry_delay,
|
135
|
-
)
|
136
|
-
)
|
137
|
-
return env
|
138
|
-
|
139
115
|
@staticmethod
|
140
116
|
def _generate_email(config):
|
141
117
|
template = "{}={}"
|
@@ -195,8 +171,6 @@ class ComposeOperator(CmdOperator):
|
|
195
171
|
if config.allowed_hosts:
|
196
172
|
env.append(template.format("POLYAXON_ALLOWED_HOSTS", config.allowed_hosts))
|
197
173
|
|
198
|
-
env += cls._generate_intervals(config)
|
199
|
-
|
200
174
|
if config.log_level:
|
201
175
|
env.append(template.format(ENV_KEYS_LOG_LEVEL, config.log_level))
|
202
176
|
env += cls._generate_postgres(config)
|
polyaxon/_deploy/schemas/auth.py
CHANGED
@@ -6,6 +6,6 @@ from polyaxon._schemas.base import BaseSchemaModel
|
|
6
6
|
|
7
7
|
|
8
8
|
class AuthConfig(BaseSchemaModel):
|
9
|
-
enabled: Optional[bool]
|
10
|
-
external: Optional[StrictStr]
|
11
|
-
use_resolver: Optional[bool] = Field(alias="useResolver")
|
9
|
+
enabled: Optional[bool] = None
|
10
|
+
external: Optional[StrictStr] = None
|
11
|
+
use_resolver: Optional[bool] = Field(alias="useResolver", default=None)
|
@@ -6,17 +6,19 @@ from polyaxon._schemas.base import BaseSchemaModel
|
|
6
6
|
|
7
7
|
|
8
8
|
class CeleryConfig(BaseSchemaModel):
|
9
|
-
enabled: Optional[bool]
|
10
|
-
task_track_started: Optional[bool] = Field(alias="taskTrackStarted")
|
11
|
-
broker_pool_limit: Optional[StrictInt] = Field(
|
12
|
-
|
9
|
+
enabled: Optional[bool] = None
|
10
|
+
task_track_started: Optional[bool] = Field(alias="taskTrackStarted", default=None)
|
11
|
+
broker_pool_limit: Optional[StrictInt] = Field(
|
12
|
+
alias="brokerPoolLimit", default=None
|
13
|
+
)
|
14
|
+
confirm_publish: Optional[bool] = Field(alias="confirmPublish", default=None)
|
13
15
|
worker_prefetch_multiplier: Optional[StrictInt] = Field(
|
14
|
-
alias="workerPrefetchMultiplier"
|
16
|
+
alias="workerPrefetchMultiplier", default=None
|
15
17
|
)
|
16
18
|
worker_max_tasks_per_child: Optional[StrictInt] = Field(
|
17
|
-
alias="workerMaxTasksPerChild"
|
19
|
+
alias="workerMaxTasksPerChild", default=None
|
18
20
|
)
|
19
21
|
worker_max_memory_per_child: Optional[StrictInt] = Field(
|
20
|
-
alias="workerMaxMemoryPerChild"
|
22
|
+
alias="workerMaxMemoryPerChild", default=None
|
21
23
|
)
|
22
|
-
task_always_eager: Optional[bool] = Field(alias="taskAlwaysEager")
|
24
|
+
task_always_eager: Optional[bool] = Field(alias="taskAlwaysEager", default=None)
|
@@ -5,8 +5,11 @@ from clipped.compact.pydantic import (
|
|
5
5
|
Field,
|
6
6
|
StrictInt,
|
7
7
|
StrictStr,
|
8
|
-
|
9
|
-
|
8
|
+
field_validator,
|
9
|
+
model_validator,
|
10
|
+
validation_after,
|
11
|
+
validation_always,
|
12
|
+
validation_before,
|
10
13
|
)
|
11
14
|
from clipped.formatting import Printer
|
12
15
|
|
@@ -187,145 +190,175 @@ class DeploymentConfig(BaseSchemaModel):
|
|
187
190
|
"celeryAffinity",
|
188
191
|
]
|
189
192
|
|
190
|
-
deployment_type: Optional[DeploymentTypes] = Field(
|
193
|
+
deployment_type: Optional[DeploymentTypes] = Field(
|
194
|
+
alias="deploymentType", default=None
|
195
|
+
)
|
191
196
|
deployment_chart: Optional[DeploymentCharts] = Field(
|
192
197
|
default=DeploymentCharts.PLATFORM, alias="deploymentChart"
|
193
198
|
)
|
194
|
-
deployment_version: Optional[StrictStr] = Field(
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
199
|
+
deployment_version: Optional[StrictStr] = Field(
|
200
|
+
alias="deploymentVersion", default=None
|
201
|
+
)
|
202
|
+
release_name: Optional[StrictStr] = Field(alias="releaseName", default=None)
|
203
|
+
namespace: Optional[StrictStr] = Field(default=None)
|
204
|
+
rbac: Optional[RBACConfig] = None
|
205
|
+
polyaxon_secret: Optional[StrictStr] = Field(alias="polyaxonSecret", default=None)
|
206
|
+
internal_token: Optional[StrictStr] = Field(alias="internalToken", default=None)
|
207
|
+
password_length: Optional[StrictInt] = Field(alias="passwordLength", default=None)
|
208
|
+
password_auth: Optional[bool] = Field(alias="passwordAuth", default=None)
|
209
|
+
ssl: Optional[SSLConfig] = None
|
210
|
+
encryption_secret: Optional[StrictStr] = Field(
|
211
|
+
alias="encryptionSecret", default=None
|
212
|
+
)
|
213
|
+
platform_secret: Optional[StrictStr] = Field(alias="platformSecret", default=None)
|
214
|
+
agent_secret: Optional[StrictStr] = Field(alias="agentSecret", default=None)
|
215
|
+
timezone: Optional[StrictStr] = Field(default=None)
|
216
|
+
environment: Optional[StrictStr] = Field(default=None)
|
217
|
+
ingress: Optional[IngressConfig] = None
|
218
|
+
user: Optional[RootUserConfig] = None
|
219
|
+
node_selector: Optional[Dict[StrictStr, StrictStr]] = Field(
|
220
|
+
alias="nodeSelector", default=None
|
221
|
+
)
|
222
|
+
tolerations: Optional[List[Union[k8s_schemas.V1Toleration, Dict]]] = None
|
223
|
+
affinity: Optional[Union[k8s_schemas.V1Affinity, Dict]] = None
|
224
|
+
labels: Optional[Dict[StrictStr, StrictStr]] = Field(alias="labels", default=None)
|
225
|
+
annotations: Optional[Dict[StrictStr, StrictStr]] = Field(
|
226
|
+
alias="annotations", default=None
|
227
|
+
)
|
228
|
+
priority_class_name: Optional[StrictStr] = Field(
|
229
|
+
alias="priorityClassName", default=None
|
230
|
+
)
|
216
231
|
celery_node_selector: Optional[Dict[StrictStr, StrictStr]] = Field(
|
217
|
-
alias="celeryNodeSelector"
|
232
|
+
alias="celeryNodeSelector", default=None
|
218
233
|
)
|
219
234
|
celery_tolerations: Optional[List[Union[k8s_schemas.V1Toleration, Dict]]] = Field(
|
220
|
-
alias="celeryTolerations"
|
235
|
+
alias="celeryTolerations", default=None
|
221
236
|
)
|
222
237
|
celery_affinity: Optional[Union[k8s_schemas.V1Affinity, Dict]] = Field(
|
223
|
-
alias="celeryAffinity"
|
238
|
+
alias="celeryAffinity", default=None
|
239
|
+
)
|
240
|
+
limit_resources: Optional[bool] = Field(alias="limitResources", default=None)
|
241
|
+
global_replicas: Optional[StrictInt] = Field(alias="globalReplicas", default=None)
|
242
|
+
global_concurrency: Optional[StrictInt] = Field(
|
243
|
+
alias="globalConcurrency", default=None
|
244
|
+
)
|
245
|
+
gateway: Optional[ApiServiceConfig] = None
|
246
|
+
scheduler: Optional[WorkerServiceConfig] = None
|
247
|
+
compiler: Optional[WorkerServiceConfig] = None
|
248
|
+
worker: Optional[WorkerServiceConfig] = None
|
249
|
+
beat: Optional[DeploymentService] = None
|
250
|
+
agent: Optional[AgentServiceConfig] = None
|
251
|
+
operator: Optional[OperatorServiceConfig] = None
|
252
|
+
init: Optional[V1PolyaxonInitContainer] = None
|
253
|
+
sidecar: Optional[V1PolyaxonSidecarContainer] = None
|
254
|
+
notifier: Optional[V1PolyaxonNotifier] = None
|
255
|
+
cleaner: Optional[V1PolyaxonCleaner] = None
|
256
|
+
default_scheduling: Optional[V1DefaultScheduling] = Field(
|
257
|
+
alias="defaultScheduling", default=None
|
224
258
|
)
|
225
|
-
limit_resources: Optional[bool] = Field(alias="limitResources")
|
226
|
-
global_replicas: Optional[StrictInt] = Field(alias="globalReplicas")
|
227
|
-
global_concurrency: Optional[StrictInt] = Field(alias="globalConcurrency")
|
228
|
-
gateway: Optional[ApiServiceConfig]
|
229
|
-
scheduler: Optional[WorkerServiceConfig]
|
230
|
-
compiler: Optional[WorkerServiceConfig]
|
231
|
-
worker: Optional[WorkerServiceConfig]
|
232
|
-
beat: Optional[DeploymentService]
|
233
|
-
agent: Optional[AgentServiceConfig]
|
234
|
-
operator: Optional[OperatorServiceConfig]
|
235
|
-
init: Optional[V1PolyaxonInitContainer]
|
236
|
-
sidecar: Optional[V1PolyaxonSidecarContainer]
|
237
|
-
notifier: Optional[V1PolyaxonNotifier]
|
238
|
-
cleaner: Optional[V1PolyaxonCleaner]
|
239
|
-
default_scheduling: Optional[V1DefaultScheduling] = Field(alias="defaultScheduling")
|
240
259
|
default_image_pull_secrets: Optional[List[StrictStr]] = Field(
|
241
|
-
alias="defaultImagePullSecrets"
|
260
|
+
alias="defaultImagePullSecrets", default=None
|
261
|
+
)
|
262
|
+
clean_hooks: Optional[HooksConfig] = Field(alias="cleanHooks", default=None)
|
263
|
+
api_hooks: Optional[HooksConfig] = Field(alias="apiHooks", default=None)
|
264
|
+
flower: Optional[DeploymentService] = None
|
265
|
+
postgresql: Optional[PostgresqlConfig] = None
|
266
|
+
redis: Optional[RedisConfig] = None
|
267
|
+
rabbitmq: Optional[RabbitmqConfig] = None
|
268
|
+
broker: Optional[Literal["redis", "rabbitmq"]] = None
|
269
|
+
email: Optional[EmailConfig] = None
|
270
|
+
ldap: Optional[Dict] = None
|
271
|
+
metrics: Optional[Dict] = None
|
272
|
+
image_pull_secrets: Optional[List[StrictStr]] = Field(
|
273
|
+
alias="imagePullSecrets", default=None
|
274
|
+
)
|
275
|
+
host_name: Optional[StrictStr] = Field(alias="hostName", default=None)
|
276
|
+
allowed_hosts: Optional[List[StrictStr]] = Field(alias="allowedHosts", default=None)
|
277
|
+
include_host_ips: Optional[bool] = Field(alias="includeHostIps", default=None)
|
278
|
+
intervals: Optional[IntervalsConfig] = None
|
279
|
+
cleaning_intervals: Optional[Dict] = Field(alias="cleaningIntervals", default=None)
|
280
|
+
artifacts_store: Optional[V1Connection] = Field(
|
281
|
+
alias="artifactsStore", default=None
|
282
|
+
)
|
283
|
+
connections: Optional[List[V1Connection]] = Field(default=None)
|
284
|
+
mount_connections: Optional[List[str]] = Field(
|
285
|
+
alias="mountConnections", default=None
|
286
|
+
)
|
287
|
+
log_level: Optional[StrictStr] = Field(alias="logLevel", default=None)
|
288
|
+
security_context: Optional[SecurityContextConfig] = Field(
|
289
|
+
alias="securityContext", default=None
|
242
290
|
)
|
243
|
-
clean_hooks: Optional[HooksConfig] = Field(alias="cleanHooks")
|
244
|
-
api_hooks: Optional[HooksConfig] = Field(alias="apiHooks")
|
245
|
-
flower: Optional[DeploymentService]
|
246
|
-
postgresql: Optional[PostgresqlConfig]
|
247
|
-
redis: Optional[RedisConfig]
|
248
|
-
rabbitmq: Optional[RabbitmqConfig]
|
249
|
-
broker: Optional[Literal["redis", "rabbitmq"]]
|
250
|
-
email: Optional[EmailConfig]
|
251
|
-
ldap: Optional[Dict]
|
252
|
-
metrics: Optional[Dict]
|
253
|
-
image_pull_secrets: Optional[List[StrictStr]] = Field(alias="imagePullSecrets")
|
254
|
-
host_name: Optional[StrictStr] = Field(alias="hostName")
|
255
|
-
allowed_hosts: Optional[List[StrictStr]] = Field(alias="allowedHosts")
|
256
|
-
include_host_ips: Optional[bool] = Field(alias="includeHostIps")
|
257
|
-
intervals: Optional[IntervalsConfig]
|
258
|
-
artifacts_store: Optional[V1Connection] = Field(alias="artifactsStore")
|
259
|
-
connections: Optional[List[V1Connection]]
|
260
|
-
mount_connections: Optional[List[str]] = Field(alias="mountConnections")
|
261
|
-
log_level: Optional[StrictStr] = Field(alias="logLevel")
|
262
|
-
security_context: Optional[SecurityContextConfig] = Field(alias="securityContext")
|
263
291
|
external_services: Optional[ExternalServicesConfig] = Field(
|
264
|
-
alias="externalServices"
|
292
|
+
alias="externalServices", default=None
|
265
293
|
)
|
266
|
-
debug_mode: Optional[bool] = Field(alias="debugMode")
|
267
|
-
organization_key: Optional[StrictStr] = Field(alias="organizationKey")
|
268
|
-
auth: Optional[AuthConfig]
|
269
|
-
proxy: Optional[ProxyConfig]
|
270
|
-
ui: Optional[UIConfig]
|
271
|
-
include_chart_revision: Optional[bool] = Field(
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
294
|
+
debug_mode: Optional[bool] = Field(alias="debugMode", default=None)
|
295
|
+
organization_key: Optional[StrictStr] = Field(alias="organizationKey", default=None)
|
296
|
+
auth: Optional[AuthConfig] = None
|
297
|
+
proxy: Optional[ProxyConfig] = None
|
298
|
+
ui: Optional[UIConfig] = None
|
299
|
+
include_chart_revision: Optional[bool] = Field(
|
300
|
+
alias="includeChartRevision", default=None
|
301
|
+
)
|
302
|
+
operators: Optional[OperatorsConfig] = None
|
303
|
+
istio: Optional[Dict] = None
|
304
|
+
dns: Optional[Dict] = None
|
305
|
+
|
306
|
+
@model_validator(**validation_after)
|
277
307
|
def validate_deployment(cls, values):
|
278
308
|
validate_deployment_chart(
|
279
|
-
deployment_chart=
|
280
|
-
agent=
|
281
|
-
environment=
|
309
|
+
deployment_chart=cls.get_value_for_key("deployment_chart", values),
|
310
|
+
agent=cls.get_value_for_key("agent", values),
|
311
|
+
environment=cls.get_value_for_key("environment", values),
|
282
312
|
)
|
283
313
|
validate_platform_deployment(
|
284
|
-
postgresql=
|
285
|
-
redis=
|
286
|
-
rabbitmq=
|
287
|
-
broker=
|
288
|
-
scheduler=
|
289
|
-
compiler=
|
290
|
-
worker=
|
291
|
-
beat=
|
292
|
-
external_services=
|
314
|
+
postgresql=cls.get_value_for_key("postgresql", values),
|
315
|
+
redis=cls.get_value_for_key("redis", values),
|
316
|
+
rabbitmq=cls.get_value_for_key("rabbitmq", values),
|
317
|
+
broker=cls.get_value_for_key("broker", values),
|
318
|
+
scheduler=cls.get_value_for_key("scheduler", values),
|
319
|
+
compiler=cls.get_value_for_key("compiler", values),
|
320
|
+
worker=cls.get_value_for_key("worker", values),
|
321
|
+
beat=cls.get_value_for_key("beat", values),
|
322
|
+
external_services=cls.get_value_for_key("external_services", values),
|
293
323
|
)
|
294
|
-
if
|
324
|
+
if cls.get_value_for_key("deployment_chart", values) == DeploymentCharts.AGENT:
|
295
325
|
wrong_agent_deployment_keys(
|
296
|
-
password_length=
|
297
|
-
password_auth=
|
298
|
-
platform_secret=
|
299
|
-
encryption_secret=
|
300
|
-
user=
|
301
|
-
global_replicas=
|
302
|
-
global_concurrency=
|
303
|
-
scheduler=
|
304
|
-
compiler=
|
305
|
-
worker=
|
306
|
-
beat=
|
307
|
-
clean_hook=
|
308
|
-
api_hooks=
|
309
|
-
flower=
|
310
|
-
postgresql=
|
311
|
-
redis=
|
312
|
-
rabbitmq=
|
313
|
-
broker=
|
314
|
-
email=
|
315
|
-
ldap=
|
316
|
-
intervals=
|
317
|
-
metrics=
|
318
|
-
organization_key=
|
319
|
-
ui=values.get("ui"),
|
326
|
+
password_length=cls.get_value_for_key("password_length", values),
|
327
|
+
password_auth=cls.get_value_for_key("password_auth", values),
|
328
|
+
platform_secret=cls.get_value_for_key("platform_secret", values),
|
329
|
+
encryption_secret=cls.get_value_for_key("encryption_secret", values),
|
330
|
+
user=cls.get_value_for_key("user", values),
|
331
|
+
global_replicas=cls.get_value_for_key("global_replicas", values),
|
332
|
+
global_concurrency=cls.get_value_for_key("global_concurrency", values),
|
333
|
+
scheduler=cls.get_value_for_key("scheduler", values),
|
334
|
+
compiler=cls.get_value_for_key("compiler", values),
|
335
|
+
worker=cls.get_value_for_key("worker", values),
|
336
|
+
beat=cls.get_value_for_key("beat", values),
|
337
|
+
clean_hook=cls.get_value_for_key("clean_hook", values),
|
338
|
+
api_hooks=cls.get_value_for_key("api_hooks", values),
|
339
|
+
flower=cls.get_value_for_key("flower", values),
|
340
|
+
postgresql=cls.get_value_for_key("postgresql", values),
|
341
|
+
redis=cls.get_value_for_key("redis", values),
|
342
|
+
rabbitmq=cls.get_value_for_key("rabbitmq", values),
|
343
|
+
broker=cls.get_value_for_key("broker", values),
|
344
|
+
email=cls.get_value_for_key("email", values),
|
345
|
+
ldap=cls.get_value_for_key("ldap", values),
|
346
|
+
intervals=cls.get_value_for_key("intervals", values),
|
347
|
+
metrics=cls.get_value_for_key("metrics", values),
|
348
|
+
organization_key=cls.get_value_for_key("organization_key", values),
|
320
349
|
)
|
321
350
|
|
322
351
|
return values
|
323
352
|
|
324
|
-
@
|
353
|
+
@field_validator(
|
354
|
+
"affinity", "celery_affinity", **validation_always, **validation_before
|
355
|
+
)
|
325
356
|
def validate_affinity(cls, v):
|
326
357
|
return k8s_validation.validate_k8s_affinity(v)
|
327
358
|
|
328
|
-
@
|
359
|
+
@field_validator(
|
360
|
+
"tolerations", "celery_tolerations", **validation_always, **validation_before
|
361
|
+
)
|
329
362
|
def validate_tolerations(cls, v):
|
330
363
|
if not v:
|
331
364
|
return v
|
@@ -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,11 +6,6 @@ from polyaxon._schemas.base import BaseSchemaModel
|
|
6
6
|
|
7
7
|
|
8
8
|
class IntervalsConfig(BaseSchemaModel):
|
9
|
-
|
10
|
-
|
11
|
-
alias="operationsDefaultRetryDelay"
|
9
|
+
compatibility_check: Optional[StrictInt] = Field(
|
10
|
+
alias="compatibilityCheck", default=None
|
12
11
|
)
|
13
|
-
operations_max_retry_delay: Optional[StrictInt] = Field(
|
14
|
-
alias="operationsMaxRetryDelay"
|
15
|
-
)
|
16
|
-
compatibility_check: Optional[StrictInt] = Field(alias="compatibilityCheck")
|