polyaxon 2.0.0rc27__py3-none-any.whl → 2.0.0rc29__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/api.py +4 -0
- polyaxon/auxiliaries/default_scheduling.py +1 -1
- polyaxon/auxiliaries/init.py +1 -1
- polyaxon/auxiliaries/sidecar.py +1 -1
- polyaxon/cli/operations.py +18 -2
- polyaxon/cli/services/docker.py +1 -1
- polyaxon/cli/services/initializer.py +1 -1
- polyaxon/client/run.py +23 -26
- polyaxon/compiler/contexts/contexts.py +0 -2
- polyaxon/compiler/contexts/service.py +14 -9
- polyaxon/compiler/resolver/agent.py +1 -1
- polyaxon/compiler/resolver/runtime.py +0 -1
- polyaxon/constants/metadata.py +1 -0
- polyaxon/deploy/schemas/auth.py +1 -1
- polyaxon/deploy/schemas/celery.py +1 -1
- polyaxon/deploy/schemas/deployment.py +7 -1
- polyaxon/deploy/schemas/email.py +1 -1
- polyaxon/deploy/schemas/ingress.py +1 -1
- polyaxon/deploy/schemas/intervals.py +1 -1
- polyaxon/deploy/schemas/operators.py +0 -1
- polyaxon/deploy/schemas/proxy.py +1 -1
- polyaxon/deploy/schemas/root_user.py +1 -1
- polyaxon/deploy/schemas/security_context.py +1 -1
- polyaxon/deploy/schemas/service.py +1 -1
- polyaxon/deploy/schemas/ssl.py +1 -1
- polyaxon/deploy/schemas/ui.py +1 -1
- polyaxon/docker/docker_types.py +1 -1
- polyaxon/env_vars/keys.py +0 -2
- polyaxon/k8s/converter/converters/__init__.py +0 -2
- polyaxon/k8s/converter/converters/dask_job.py +3 -0
- polyaxon/k8s/converter/mixins.py +0 -7
- polyaxon/k8s/custom_resources/dask_job.py +14 -2
- polyaxon/lifecycle.py +1 -1
- polyaxon/pkg.py +1 -1
- polyaxon/polyflow/__init__.py +0 -4
- polyaxon/polyflow/builds/__init__.py +1 -1
- polyaxon/polyflow/cache/__init__.py +1 -1
- polyaxon/polyflow/component/base.py +1 -1
- polyaxon/polyflow/component/component.py +1 -2
- polyaxon/polyflow/component/component_reference.py +1 -1
- polyaxon/polyflow/early_stopping/__init__.py +1 -1
- polyaxon/polyflow/early_stopping/policies.py +1 -1
- polyaxon/polyflow/environment/__init__.py +1 -1
- polyaxon/polyflow/events/__init__.py +1 -1
- polyaxon/polyflow/hooks/__init__.py +1 -1
- polyaxon/polyflow/init/__init__.py +1 -1
- polyaxon/polyflow/io/io.py +1 -1
- polyaxon/polyflow/joins/__init__.py +1 -1
- polyaxon/polyflow/matrix/__init__.py +1 -1
- polyaxon/polyflow/matrix/bayes.py +7 -1
- polyaxon/polyflow/matrix/grid_search.py +1 -1
- polyaxon/polyflow/matrix/hyperband.py +1 -1
- polyaxon/polyflow/matrix/hyperopt.py +1 -1
- polyaxon/polyflow/matrix/iterative.py +1 -1
- polyaxon/polyflow/matrix/mapping.py +1 -1
- polyaxon/polyflow/matrix/params.py +2 -2
- polyaxon/polyflow/matrix/random_search.py +1 -1
- polyaxon/polyflow/matrix/tuner.py +1 -1
- polyaxon/polyflow/mounts/artifacts_mounts.py +1 -1
- polyaxon/polyflow/notifications/__init__.py +1 -1
- polyaxon/polyflow/operations/base.py +1 -1
- polyaxon/polyflow/operations/operation.py +1 -2
- polyaxon/polyflow/optimization/__init__.py +1 -1
- polyaxon/polyflow/params/params.py +1 -1
- polyaxon/polyflow/plugins/__init__.py +1 -1
- polyaxon/polyflow/references/dag.py +1 -1
- polyaxon/polyflow/references/hub.py +1 -1
- polyaxon/polyflow/references/path.py +1 -1
- polyaxon/polyflow/references/url.py +1 -1
- polyaxon/polyflow/run/__init__.py +1 -13
- polyaxon/polyflow/run/dag.py +7 -1
- polyaxon/polyflow/run/dask/replica.py +1 -1
- polyaxon/polyflow/run/job.py +1 -1
- polyaxon/polyflow/run/kinds.py +14 -1
- polyaxon/polyflow/run/kubeflow/mpi_job.py +1 -1
- polyaxon/polyflow/run/kubeflow/mx_job.py +1 -1
- polyaxon/polyflow/run/kubeflow/paddle_job.py +1 -1
- polyaxon/polyflow/run/kubeflow/pytorch_job.py +1 -1
- polyaxon/polyflow/run/kubeflow/replica.py +1 -1
- polyaxon/polyflow/run/kubeflow/scheduling_policy.py +1 -1
- polyaxon/polyflow/run/kubeflow/tf_job.py +1 -1
- polyaxon/polyflow/run/kubeflow/xgboost_job.py +1 -1
- polyaxon/polyflow/run/patch.py +1 -7
- polyaxon/polyflow/run/ray/ray.py +1 -1
- polyaxon/polyflow/run/ray/replica.py +1 -1
- polyaxon/polyflow/run/resources.py +1 -1
- polyaxon/polyflow/run/service.py +1 -1
- polyaxon/polyflow/schedules/__init__.py +1 -1
- polyaxon/polyflow/schedules/cron.py +1 -1
- polyaxon/polyflow/schedules/datetime.py +1 -1
- polyaxon/polyflow/schedules/interval.py +1 -1
- polyaxon/polyflow/templates/__init__.py +1 -1
- polyaxon/polyflow/termination/__init__.py +2 -2
- polyaxon/schemas/api/authentication.py +1 -1
- polyaxon/schemas/api/home.py +1 -1
- polyaxon/schemas/api/installation.py +1 -1
- polyaxon/schemas/api/log_handler.py +1 -1
- polyaxon/schemas/api/resources.py +1 -1
- polyaxon/schemas/api/user.py +1 -1
- polyaxon/schemas/api/version.py +1 -1
- polyaxon/schemas/base.py +1 -1
- polyaxon/schemas/cli/agent_config.py +1 -1
- polyaxon/schemas/cli/cli_config.py +1 -1
- polyaxon/schemas/cli/client_config.py +1 -1
- polyaxon/schemas/responses/v1_activity.py +1 -1
- polyaxon/schemas/responses/v1_agent.py +1 -1
- polyaxon/schemas/responses/v1_agent_status_body_request.py +1 -1
- polyaxon/schemas/responses/v1_analytics_spec.py +1 -1
- polyaxon/schemas/responses/v1_artifact_tree.py +1 -1
- polyaxon/schemas/responses/v1_auth.py +1 -1
- polyaxon/schemas/responses/v1_cloning.py +1 -1
- polyaxon/schemas/responses/v1_connection_response.py +1 -1
- polyaxon/schemas/responses/v1_dashboard.py +1 -1
- polyaxon/schemas/responses/v1_entities_tags.py +1 -1
- polyaxon/schemas/responses/v1_entities_transfer.py +1 -1
- polyaxon/schemas/responses/v1_entity_notification_body.py +1 -1
- polyaxon/schemas/responses/v1_entity_stage_body_request.py +1 -1
- polyaxon/schemas/responses/v1_entity_status_body_request.py +1 -1
- polyaxon/schemas/responses/v1_list_activities_response.py +1 -1
- polyaxon/schemas/responses/v1_list_agents_response.py +1 -1
- polyaxon/schemas/responses/v1_list_bookmarks_response.py +1 -1
- polyaxon/schemas/responses/v1_list_connections_response.py +1 -1
- polyaxon/schemas/responses/v1_list_dashboards_response.py +1 -1
- polyaxon/schemas/responses/v1_list_organization_members_response.py +1 -1
- polyaxon/schemas/responses/v1_list_organizations_response.py +1 -1
- polyaxon/schemas/responses/v1_list_presets_response.py +1 -1
- polyaxon/schemas/responses/v1_list_project_versions_response.py +1 -1
- polyaxon/schemas/responses/v1_list_projects_response.py +1 -1
- polyaxon/schemas/responses/v1_list_queues_response.py +1 -1
- polyaxon/schemas/responses/v1_list_run_artifacts_response.py +1 -1
- polyaxon/schemas/responses/v1_list_run_connections_response.py +1 -1
- polyaxon/schemas/responses/v1_list_run_edges_response.py +1 -1
- polyaxon/schemas/responses/v1_list_runs_response.py +1 -1
- polyaxon/schemas/responses/v1_list_searches_response.py +1 -1
- polyaxon/schemas/responses/v1_list_service_accounts_response.py +1 -1
- polyaxon/schemas/responses/v1_list_tags_response.py +1 -1
- polyaxon/schemas/responses/v1_list_team_members_response.py +1 -1
- polyaxon/schemas/responses/v1_list_teams_response.py +1 -1
- polyaxon/schemas/responses/v1_list_token_response.py +1 -1
- polyaxon/schemas/responses/v1_operation_body.py +1 -1
- polyaxon/schemas/responses/v1_organization.py +1 -1
- polyaxon/schemas/responses/v1_organization_member.py +1 -1
- polyaxon/schemas/responses/v1_password_change.py +1 -1
- polyaxon/schemas/responses/v1_pipeline.py +1 -1
- polyaxon/schemas/responses/v1_preset.py +1 -1
- polyaxon/schemas/responses/v1_project.py +1 -1
- polyaxon/schemas/responses/v1_project_settings.py +1 -1
- polyaxon/schemas/responses/v1_project_user_access.py +1 -1
- polyaxon/schemas/responses/v1_project_version.py +1 -1
- polyaxon/schemas/responses/v1_queue.py +1 -1
- polyaxon/schemas/responses/v1_run.py +1 -1
- polyaxon/schemas/responses/v1_run_connection.py +1 -1
- polyaxon/schemas/responses/v1_run_reference_catalog.py +1 -1
- polyaxon/schemas/responses/v1_run_settings.py +1 -1
- polyaxon/schemas/responses/v1_search.py +1 -1
- polyaxon/schemas/responses/v1_search_spec.py +1 -1
- polyaxon/schemas/responses/v1_section_spec.py +1 -1
- polyaxon/schemas/responses/v1_service_account.py +1 -1
- polyaxon/schemas/responses/v1_settings_catalog.py +2 -1
- polyaxon/schemas/responses/v1_tag.py +1 -1
- polyaxon/schemas/responses/v1_team.py +1 -1
- polyaxon/schemas/responses/v1_team_member.py +1 -1
- polyaxon/schemas/responses/v1_token.py +1 -1
- polyaxon/schemas/responses/v1_trial_start.py +1 -1
- polyaxon/schemas/responses/v1_user.py +1 -1
- polyaxon/schemas/responses/v1_user_singup.py +1 -1
- polyaxon/schemas/services.py +1 -1
- polyaxon/schemas/types/artifacts.py +1 -1
- polyaxon/schemas/types/dockerfile.py +1 -1
- polyaxon/schemas/types/event.py +1 -1
- polyaxon/schemas/types/file.py +1 -1
- polyaxon/schemas/types/git.py +1 -1
- polyaxon/schemas/types/tensorboard.py +1 -1
- polyaxon/sdk/api/agents_v1_api.py +1 -1
- polyaxon/sdk/api/artifacts_stores_v1_api.py +1 -1
- polyaxon/sdk/api/auth_v1_api.py +1 -1
- polyaxon/sdk/api/connections_v1_api.py +1 -1
- polyaxon/sdk/api/dashboards_v1_api.py +1 -1
- polyaxon/sdk/api/organizations_v1_api.py +1 -1
- polyaxon/sdk/api/presets_v1_api.py +1 -1
- polyaxon/sdk/api/project_dashboards_v1_api.py +1 -1
- polyaxon/sdk/api/project_searches_v1_api.py +1 -1
- polyaxon/sdk/api/projects_v1_api.py +1 -1
- polyaxon/sdk/api/queues_v1_api.py +1 -1
- polyaxon/sdk/api/runs_v1_api.py +88 -10
- polyaxon/sdk/api/searches_v1_api.py +1 -1
- polyaxon/sdk/api/service_accounts_v1_api.py +1 -1
- polyaxon/sdk/api/tags_v1_api.py +1 -1
- polyaxon/sdk/api/teams_v1_api.py +1 -1
- polyaxon/sdk/api/users_v1_api.py +1 -1
- polyaxon/sdk/api/versions_v1_api.py +1 -1
- polyaxon/settings.py +1 -1
- polyaxon/utils/urls_utils.py +3 -1
- {polyaxon-2.0.0rc27.dist-info → polyaxon-2.0.0rc29.dist-info}/METADATA +31 -31
- {polyaxon-2.0.0rc27.dist-info → polyaxon-2.0.0rc29.dist-info}/RECORD +199 -205
- {polyaxon-2.0.0rc27.dist-info → polyaxon-2.0.0rc29.dist-info}/WHEEL +1 -1
- polyaxon/compiler/contexts/spark_job.py +0 -39
- polyaxon/k8s/converter/converters/spark_job.py +0 -64
- polyaxon/k8s/custom_resources/spark_job.py +0 -97
- polyaxon/polyflow/run/spark/__init__.py +0 -2
- polyaxon/polyflow/run/spark/replica.py +0 -165
- polyaxon/polyflow/run/spark/spark.py +0 -341
- {polyaxon-2.0.0rc27.dist-info → polyaxon-2.0.0rc29.dist-info}/LICENSE +0 -0
- {polyaxon-2.0.0rc27.dist-info → polyaxon-2.0.0rc29.dist-info}/entry_points.txt +0 -0
- {polyaxon-2.0.0rc27.dist-info → polyaxon-2.0.0rc29.dist-info}/top_level.txt +0 -0
polyaxon/api.py
CHANGED
@@ -7,6 +7,8 @@ INTERNAL_V1 = "internal/{}".format(VERSION_V1)
|
|
7
7
|
AUTH_REQUEST_V1 = "auth-request/{}".format(VERSION_V1)
|
8
8
|
SERVICES_V1 = "services/{}".format(VERSION_V1)
|
9
9
|
REWRITE_SERVICES_V1 = "rewrite-services/{}".format(VERSION_V1)
|
10
|
+
MONITORS_V1 = "monitors/{}".format(VERSION_V1)
|
11
|
+
REWRITE_MONITORS_V1 = "rewrite-monitors/{}".format(VERSION_V1)
|
10
12
|
EXTERNAL_V1 = "external/{}".format(VERSION_V1)
|
11
13
|
REWRITE_EXTERNAL_V1 = "rewrite-external/{}".format(VERSION_V1)
|
12
14
|
K8S_V1 = "k8s/{}".format(VERSION_V1)
|
@@ -28,6 +30,8 @@ SSO_V1_LOCATION = "/" + SSO_V1 + "/"
|
|
28
30
|
EVENTS_V1_LOCATION = "/" + EVENTS_V1 + "/"
|
29
31
|
SERVICES_V1_LOCATION = "/" + SERVICES_V1 + "/"
|
30
32
|
REWRITE_SERVICES_V1_LOCATION = "/" + REWRITE_SERVICES_V1 + "/"
|
33
|
+
MONITORS_V1_LOCATION = "/" + MONITORS_V1 + "/"
|
34
|
+
REWRITE_MONITORS_V1_LOCATION = "/" + REWRITE_MONITORS_V1 + "/"
|
31
35
|
EXTERNAL_V1_LOCATION = "/" + EXTERNAL_V1 + "/"
|
32
36
|
REWRITE_EXTERNAL_V1_LOCATION = "/" + REWRITE_EXTERNAL_V1 + "/"
|
33
37
|
K8S_V1_LOCATION = "/" + K8S_V1 + "/"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
|
2
2
|
|
3
|
-
from pydantic import Field, StrictStr, validator
|
3
|
+
from clipped.compact.pydantic import Field, StrictStr, validator
|
4
4
|
|
5
5
|
from polyaxon.k8s import k8s_schemas, k8s_validation
|
6
6
|
from polyaxon.schemas.base import BaseSchemaModel
|
polyaxon/auxiliaries/init.py
CHANGED
polyaxon/auxiliaries/sidecar.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
from typing import Any, Dict, Optional, Union
|
2
2
|
|
3
|
+
from clipped.compact.pydantic import Field, StrictStr
|
3
4
|
from clipped.types.ref_or_obj import BoolOrRef, IntOrRef, RefField
|
4
|
-
from pydantic import Field, StrictStr
|
5
5
|
|
6
6
|
from polyaxon import pkg
|
7
7
|
from polyaxon.containers.pull_policy import PullPolicy
|
polyaxon/cli/operations.py
CHANGED
@@ -17,6 +17,7 @@ from clipped.utils.json import orjson_dumps
|
|
17
17
|
from clipped.utils.lists import to_list
|
18
18
|
from clipped.utils.responses import get_meta_response
|
19
19
|
from clipped.utils.validation import validate_tags
|
20
|
+
from clipped.utils.versions import compare_versions
|
20
21
|
from urllib3.exceptions import HTTPError
|
21
22
|
|
22
23
|
from polyaxon import settings
|
@@ -38,7 +39,7 @@ from polyaxon.cli.options import (
|
|
38
39
|
)
|
39
40
|
from polyaxon.cli.utils import handle_output
|
40
41
|
from polyaxon.client import RunClient, get_run_logs
|
41
|
-
from polyaxon.constants.metadata import META_IS_EXTERNAL, META_REWRITE_PATH
|
42
|
+
from polyaxon.constants.metadata import META_IS_EXTERNAL, META_PORTS, META_REWRITE_PATH
|
42
43
|
from polyaxon.contexts import paths as ctx_paths
|
43
44
|
from polyaxon.env_vars.getters import get_project_or_local, get_project_run_or_local
|
44
45
|
from polyaxon.exceptions import (
|
@@ -1963,9 +1964,24 @@ def service(ctx, project, uid, yes, external, url):
|
|
1963
1964
|
service_endpoint = EXTERNAL_V1 if is_external else SERVICES_V1
|
1964
1965
|
if rewrite_path:
|
1965
1966
|
service_endpoint = REWRITE_EXTERNAL_V1 if is_external else REWRITE_SERVICES_V1
|
1967
|
+
|
1968
|
+
service_subpath = "{}/{}/{}/runs/{}/".format(
|
1969
|
+
namespace, owner, project_name, run_uuid
|
1970
|
+
)
|
1971
|
+
port = 80
|
1972
|
+
if client.settings and client.settings.agent:
|
1973
|
+
version = client.settings.agent.version
|
1974
|
+
if version and compare_versions(version, "2.0.0", ">="):
|
1975
|
+
ports = client.run_data.meta_info.get(META_PORTS, [])
|
1976
|
+
port = ports[0] if ports else 80
|
1977
|
+
else:
|
1978
|
+
port = None
|
1979
|
+
if port:
|
1980
|
+
service_subpath = "{}{}/".format(service_subpath, port)
|
1981
|
+
|
1966
1982
|
external_run_url = get_dashboard_url(
|
1967
1983
|
base=service_endpoint,
|
1968
|
-
subpath=
|
1984
|
+
subpath=service_subpath,
|
1969
1985
|
)
|
1970
1986
|
|
1971
1987
|
if url:
|
polyaxon/cli/services/docker.py
CHANGED
@@ -2,10 +2,10 @@ import sys
|
|
2
2
|
|
3
3
|
import click
|
4
4
|
|
5
|
+
from clipped.compact.pydantic import ValidationError
|
5
6
|
from clipped.formatting import Printer
|
6
7
|
from clipped.types.docker_image import validate_image
|
7
8
|
from clipped.utils.paths import copy_file
|
8
|
-
from pydantic import ValidationError
|
9
9
|
|
10
10
|
from polyaxon.cli.check import check_polyaxonfile
|
11
11
|
from polyaxon.cli.errors import handle_cli_error
|
@@ -4,10 +4,10 @@ import sys
|
|
4
4
|
|
5
5
|
import click
|
6
6
|
|
7
|
+
from clipped.compact.pydantic import ValidationError
|
7
8
|
from clipped.formatting import Printer
|
8
9
|
from clipped.utils.lists import to_list
|
9
10
|
from clipped.utils.paths import check_or_create_path, copy_file
|
10
|
-
from pydantic import ValidationError
|
11
11
|
|
12
12
|
from polyaxon.config.spec import ConfigSpec
|
13
13
|
from polyaxon.connections import V1ConnectionKind
|
polyaxon/client/run.py
CHANGED
@@ -22,7 +22,11 @@ from clipped.utils.paths import (
|
|
22
22
|
get_dirs_under_path,
|
23
23
|
get_files_in_path_context,
|
24
24
|
)
|
25
|
-
from clipped.utils.query_params import
|
25
|
+
from clipped.utils.query_params import (
|
26
|
+
get_logs_params,
|
27
|
+
get_query_params,
|
28
|
+
get_streams_params,
|
29
|
+
)
|
26
30
|
from clipped.utils.tz import now
|
27
31
|
from clipped.utils.validation import validate_tags
|
28
32
|
from urllib3.exceptions import HTTPError
|
@@ -896,8 +900,11 @@ class RunClient:
|
|
896
900
|
|
897
901
|
@client_handler(check_no_op=True, check_offline=True)
|
898
902
|
def inspect(self):
|
903
|
+
if not self.settings:
|
904
|
+
self.refresh_data()
|
905
|
+
params = get_streams_params(connection=self.artifacts_store, status=self.status)
|
899
906
|
return self.client.runs_v1.inspect_run(
|
900
|
-
self.namespace, self.owner, self.project, self.run_uuid
|
907
|
+
self.namespace, self.owner, self.project, self.run_uuid, **params
|
901
908
|
)
|
902
909
|
|
903
910
|
@client_handler(check_no_op=True, check_offline=True)
|
@@ -1013,7 +1020,7 @@ class RunClient:
|
|
1013
1020
|
"""
|
1014
1021
|
if not self.settings:
|
1015
1022
|
self.refresh_data()
|
1016
|
-
params =
|
1023
|
+
params = get_streams_params(self.artifacts_store)
|
1017
1024
|
return self.client.runs_v1.get_run_events(
|
1018
1025
|
self.namespace,
|
1019
1026
|
self.owner,
|
@@ -1048,7 +1055,7 @@ class RunClient:
|
|
1048
1055
|
"""
|
1049
1056
|
if not self.settings:
|
1050
1057
|
self.refresh_data()
|
1051
|
-
params =
|
1058
|
+
params = get_streams_params(self.artifacts_store)
|
1052
1059
|
return self.client.runs_v1.get_multi_run_events(
|
1053
1060
|
self.namespace,
|
1054
1061
|
self.owner,
|
@@ -1137,7 +1144,7 @@ class RunClient:
|
|
1137
1144
|
"""
|
1138
1145
|
if not self.settings:
|
1139
1146
|
self.refresh_data()
|
1140
|
-
params =
|
1147
|
+
params = get_streams_params(self.artifacts_store)
|
1141
1148
|
return self.client.runs_v1.get_run_artifact(
|
1142
1149
|
namespace=self.namespace,
|
1143
1150
|
owner=self.owner,
|
@@ -1196,11 +1203,10 @@ class RunClient:
|
|
1196
1203
|
subpath="events/{}".format(lineage.kind),
|
1197
1204
|
)
|
1198
1205
|
url = absolute_uri(url=url, host=self.client.config.host)
|
1199
|
-
params =
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
params["connection"] = self.artifacts_store
|
1206
|
+
params = get_streams_params(
|
1207
|
+
connection=self.artifacts_store, force=force
|
1208
|
+
)
|
1209
|
+
params.update({"names": lineage.name, "pkg_assets": True})
|
1204
1210
|
|
1205
1211
|
return self.store.download_file(
|
1206
1212
|
url=url,
|
@@ -1258,12 +1264,7 @@ class RunClient:
|
|
1258
1264
|
subpath="artifact",
|
1259
1265
|
)
|
1260
1266
|
url = absolute_uri(url=url, host=self.client.config.host)
|
1261
|
-
params =
|
1262
|
-
if force:
|
1263
|
-
params["force"] = True
|
1264
|
-
if self.artifacts_store:
|
1265
|
-
params["connection"] = self.artifacts_store
|
1266
|
-
|
1267
|
+
params = get_streams_params(connection=self.artifacts_store, force=force)
|
1267
1268
|
return self.store.download_file(
|
1268
1269
|
url=url, path=path, path_to=path_to, params=params
|
1269
1270
|
)
|
@@ -1302,11 +1303,9 @@ class RunClient:
|
|
1302
1303
|
subpath="artifacts",
|
1303
1304
|
)
|
1304
1305
|
url = absolute_uri(url=url, host=self.client.config.host)
|
1305
|
-
params =
|
1306
|
+
params = get_streams_params(connection=self.artifacts_store)
|
1306
1307
|
if check_path:
|
1307
1308
|
params["check_path"] = True
|
1308
|
-
if self.artifacts_store:
|
1309
|
-
params["connection"] = self.artifacts_store
|
1310
1309
|
|
1311
1310
|
return self.store.download_file(
|
1312
1311
|
url=url,
|
@@ -1343,8 +1342,7 @@ class RunClient:
|
|
1343
1342
|
if not self.settings:
|
1344
1343
|
self.refresh_data()
|
1345
1344
|
|
1346
|
-
params =
|
1347
|
-
|
1345
|
+
params = get_streams_params(connection=self.artifacts_store)
|
1348
1346
|
url = get_proxy_run_url(
|
1349
1347
|
service=STREAMS_V1_LOCATION,
|
1350
1348
|
namespace=self.namespace,
|
@@ -1433,8 +1431,7 @@ class RunClient:
|
|
1433
1431
|
if not self.settings:
|
1434
1432
|
self.refresh_data()
|
1435
1433
|
|
1436
|
-
params =
|
1437
|
-
|
1434
|
+
params = get_streams_params(connection=self.artifacts_store)
|
1438
1435
|
url = get_proxy_run_url(
|
1439
1436
|
service=STREAMS_V1_LOCATION,
|
1440
1437
|
namespace=self.namespace,
|
@@ -1463,7 +1460,7 @@ class RunClient:
|
|
1463
1460
|
"""
|
1464
1461
|
if not self.settings:
|
1465
1462
|
self.refresh_data()
|
1466
|
-
params =
|
1463
|
+
params = get_streams_params(connection=self.artifacts_store)
|
1467
1464
|
self.client.runs_v1.delete_run_artifact(
|
1468
1465
|
namespace=self.namespace,
|
1469
1466
|
owner=self.owner,
|
@@ -1482,7 +1479,7 @@ class RunClient:
|
|
1482
1479
|
"""
|
1483
1480
|
if not self.settings:
|
1484
1481
|
self.refresh_data()
|
1485
|
-
params =
|
1482
|
+
params = get_streams_params(connection=self.artifacts_store)
|
1486
1483
|
return self.client.runs_v1.delete_run_artifacts(
|
1487
1484
|
namespace=self.namespace,
|
1488
1485
|
owner=self.owner,
|
@@ -1504,7 +1501,7 @@ class RunClient:
|
|
1504
1501
|
"""
|
1505
1502
|
if not self.settings:
|
1506
1503
|
self.refresh_data()
|
1507
|
-
params =
|
1504
|
+
params = get_streams_params(connection=self.artifacts_store)
|
1508
1505
|
return self.client.runs_v1.get_run_artifacts_tree(
|
1509
1506
|
namespace=self.namespace,
|
1510
1507
|
owner=self.owner,
|
@@ -15,7 +15,6 @@ from polyaxon.compiler.contexts.kubeflow import (
|
|
15
15
|
)
|
16
16
|
from polyaxon.compiler.contexts.ray_job import RayJobContextsManager
|
17
17
|
from polyaxon.compiler.contexts.service import ServiceContextsManager
|
18
|
-
from polyaxon.compiler.contexts.spark_job import SparkJobContextsManager
|
19
18
|
from polyaxon.connections import V1Connection
|
20
19
|
from polyaxon.contexts import keys as ctx_keys
|
21
20
|
from polyaxon.contexts import paths as ctx_paths
|
@@ -39,7 +38,6 @@ CONTEXTS_MANAGERS = {
|
|
39
38
|
V1RunKind.PADDLEJOB: PaddleJobContextsManager,
|
40
39
|
V1RunKind.RAYJOB: RayJobContextsManager,
|
41
40
|
V1RunKind.DASKJOB: DaskJobContextsManager,
|
42
|
-
V1RunKind.SPARKJOB: SparkJobContextsManager,
|
43
41
|
}
|
44
42
|
|
45
43
|
|
@@ -44,13 +44,18 @@ class ServiceContextsManager(BaseContextsManager):
|
|
44
44
|
if compiled_operation.run.rewrite_path
|
45
45
|
else SERVICES_V1_LOCATION
|
46
46
|
)
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
47
|
+
ports = compiled_operation.run.ports or [80]
|
48
|
+
base_urls = []
|
49
|
+
for port in ports:
|
50
|
+
base_url = get_proxy_run_url(
|
51
|
+
service=service,
|
52
|
+
namespace=namespace,
|
53
|
+
owner=owner_name,
|
54
|
+
project=project_name,
|
55
|
+
run_uuid=run_uuid,
|
56
|
+
port=port,
|
57
|
+
)
|
58
|
+
base_urls.append(base_url)
|
59
|
+
contexts["globals"]["base_url"] = base_urls[0]
|
60
|
+
contexts["globals"]["base_urls"] = base_urls
|
56
61
|
return contexts
|
polyaxon/constants/metadata.py
CHANGED
@@ -3,6 +3,7 @@ META_ITERATION = "iteration"
|
|
3
3
|
META_BRACKET_ITERATION = "bracket_iteration"
|
4
4
|
META_REWRITE_PATH = "rewrite_path"
|
5
5
|
META_IS_EXTERNAL = "is_external"
|
6
|
+
META_PORTS = "ports"
|
6
7
|
META_HAS_EARLY_STOPPING = "has_early_stopping"
|
7
8
|
META_HAS_JOBS = "has_jobs"
|
8
9
|
META_HAS_SERVICES = "has_services"
|
polyaxon/deploy/schemas/auth.py
CHANGED
@@ -1,8 +1,14 @@
|
|
1
1
|
from typing import Dict, List, Optional, Union
|
2
2
|
from typing_extensions import Literal
|
3
3
|
|
4
|
+
from clipped.compact.pydantic import (
|
5
|
+
Field,
|
6
|
+
StrictInt,
|
7
|
+
StrictStr,
|
8
|
+
root_validator,
|
9
|
+
validator,
|
10
|
+
)
|
4
11
|
from clipped.formatting import Printer
|
5
|
-
from pydantic import Field, StrictInt, StrictStr, root_validator, validator
|
6
12
|
|
7
13
|
from polyaxon.auxiliaries import (
|
8
14
|
V1PolyaxonCleaner,
|
polyaxon/deploy/schemas/email.py
CHANGED
polyaxon/deploy/schemas/proxy.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
from typing import Optional
|
2
2
|
|
3
|
+
from clipped.compact.pydantic import Field, StrictInt, StrictStr, root_validator
|
3
4
|
from clipped.config.schema import skip_partial
|
4
|
-
from pydantic import Field, StrictInt, StrictStr, root_validator
|
5
5
|
|
6
6
|
from polyaxon.schemas.base import BaseSchemaModel
|
7
7
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
from typing import Dict, List, Optional
|
2
2
|
|
3
|
-
from pydantic import Extra, Field, StrictInt, StrictStr
|
3
|
+
from clipped.compact.pydantic import Extra, Field, StrictInt, StrictStr
|
4
4
|
|
5
5
|
from polyaxon.deploy.schemas.celery import CeleryConfig
|
6
6
|
from polyaxon.deploy.schemas.service_types import ServiceTypes
|
polyaxon/deploy/schemas/ssl.py
CHANGED
polyaxon/deploy/schemas/ui.py
CHANGED
polyaxon/docker/docker_types.py
CHANGED
polyaxon/env_vars/keys.py
CHANGED
@@ -102,7 +102,6 @@ EV_KEYS_MXJOB_ENABLED = "POLYAXON_MXJOB_ENABLED"
|
|
102
102
|
EV_KEYS_XGBOOST_JOB_ENABLED = "POLYAXON_XGBOOST_JOB_ENABLED"
|
103
103
|
EV_KEYS_MPIJOB_ENABLED = "POLYAXON_MPIJOB_ENABLED"
|
104
104
|
EV_KEYS_RAYJOB_ENABLED = "POLYAXON_RAYJOB_ENABLED"
|
105
|
-
EV_KEYS_SPARKJOB_ENABLED = "POLYAXON_SPARKJOB_ENABLED"
|
106
105
|
EV_KEYS_DASKJOB_ENABLED = "POLYAXON_DASKJOB_ENABLED"
|
107
106
|
|
108
107
|
# Sandbox
|
@@ -128,7 +127,6 @@ EV_KEYS_PROXY_API_TARGET_PORT = "POLYAXON_PROXY_API_TARGET_PORT"
|
|
128
127
|
EV_KEYS_PROXY_API_HOST = "POLYAXON_PROXY_API_HOST"
|
129
128
|
EV_KEYS_PROXY_LOCAL_PORT = "POLYAXON_PROXY_LOCAL_PORT"
|
130
129
|
EV_KEYS_PROXY_API_USE_RESOLVER = "POLYAXON_PROXY_API_USE_RESOLVER"
|
131
|
-
EV_KEYS_PROXY_SERVICES_PORT = "POLYAXON_PROXY_SERVICES_PORT"
|
132
130
|
EV_KEYS_PROXY_SSL_PATH = "POLYAXON_PROXY_SSL_PATH"
|
133
131
|
EV_KEYS_PROXY_SSL_ENABLED = "POLYAXON_PROXY_SSL_ENABLED"
|
134
132
|
EV_KEYS_PROXY_AUTH_ENABLED = "POLYAXON_PROXY_AUTH_ENABLED"
|
@@ -15,7 +15,6 @@ from polyaxon.k8s.converter.converters.kubeflow import (
|
|
15
15
|
)
|
16
16
|
from polyaxon.k8s.converter.converters.ray_job import RayJobConverter
|
17
17
|
from polyaxon.k8s.converter.converters.service import ServiceConverter
|
18
|
-
from polyaxon.k8s.converter.converters.spark_job import SparkJobConverter
|
19
18
|
from polyaxon.polyflow import V1RunKind
|
20
19
|
|
21
20
|
CONVERTERS = {
|
@@ -32,5 +31,4 @@ CONVERTERS = {
|
|
32
31
|
V1RunKind.XGBJOB: XGBoostJobConverter,
|
33
32
|
V1RunKind.RAYJOB: RayJobConverter,
|
34
33
|
V1RunKind.DASKJOB: DaskJobConverter,
|
35
|
-
V1RunKind.SPARKJOB: SparkJobConverter,
|
36
34
|
}
|
@@ -53,6 +53,9 @@ class DaskJobConverter(DaskJobMixin, BaseConverter):
|
|
53
53
|
|
54
54
|
return get_dask_job_custom_resource(
|
55
55
|
namespace=self.namespace,
|
56
|
+
owner_name=self.owner_name,
|
57
|
+
project_name=self.project_name,
|
58
|
+
run_uuid=self.run_uuid,
|
56
59
|
resource_name=self.resource_name,
|
57
60
|
job=job_replica,
|
58
61
|
worker=worker,
|
polyaxon/k8s/converter/mixins.py
CHANGED
@@ -98,12 +98,6 @@ class DaskJobMixin(BaseMixin):
|
|
98
98
|
MAIN_CONTAINER_ID = MAIN_JOB_CONTAINER
|
99
99
|
|
100
100
|
|
101
|
-
class SparkJobMixin(BaseMixin):
|
102
|
-
K8S_ANNOTATIONS_KIND = V1RunKind.SPARKJOB
|
103
|
-
K8S_LABELS_COMPONENT = "polyaxon-spark-jobs"
|
104
|
-
MAIN_CONTAINER_ID = MAIN_JOB_CONTAINER
|
105
|
-
|
106
|
-
|
107
101
|
MIXIN_MAPPING: Dict = {
|
108
102
|
V1RunKind.JOB: JobMixin,
|
109
103
|
V1RunKind.NOTIFIER: NotifierMixin,
|
@@ -118,5 +112,4 @@ MIXIN_MAPPING: Dict = {
|
|
118
112
|
V1RunKind.MPIJOB: MPIJobMixin,
|
119
113
|
V1RunKind.RAYJOB: RayJobMixin,
|
120
114
|
V1RunKind.DASKJOB: DaskJobMixin,
|
121
|
-
V1RunKind.SPARKJOB: SparkJobMixin,
|
122
115
|
}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
from typing import Dict, List, Optional
|
2
2
|
|
3
|
+
from clipped.utils.lists import to_list
|
3
4
|
from kubernetes import client
|
4
5
|
|
5
6
|
from polyaxon.k8s import k8s_schemas
|
@@ -24,6 +25,7 @@ def get_dask_replicas_template(
|
|
24
25
|
annotations: Dict[str, str],
|
25
26
|
template_spec: Dict,
|
26
27
|
args: Optional[List[str]] = None,
|
28
|
+
additional_args: Optional[List[str]] = None,
|
27
29
|
ports: Optional[List[k8s_schemas.V1ContainerPort]] = None,
|
28
30
|
readiness_probe: Optional[client.V1Probe] = None,
|
29
31
|
liveness_probe: Optional[client.V1Probe] = None,
|
@@ -35,6 +37,10 @@ def get_dask_replicas_template(
|
|
35
37
|
replica.main_container.ports = ports
|
36
38
|
if args and replica.main_container.args is None:
|
37
39
|
replica.main_container.args = args
|
40
|
+
if additional_args:
|
41
|
+
replica.main_container.args = (
|
42
|
+
to_list(replica.main_container.args, check_none=True) + additional_args
|
43
|
+
)
|
38
44
|
if readiness_probe and replica.main_container.readiness_probe is None:
|
39
45
|
replica.main_container.readiness_probe = readiness_probe
|
40
46
|
if liveness_probe and replica.main_container.liveness_probe is None:
|
@@ -61,6 +67,9 @@ def get_dask_replicas_template(
|
|
61
67
|
|
62
68
|
def get_dask_job_custom_resource(
|
63
69
|
resource_name: str,
|
70
|
+
owner_name: str,
|
71
|
+
project_name: str,
|
72
|
+
run_uuid: str,
|
64
73
|
namespace: str,
|
65
74
|
job: Optional[ReplicaSpec],
|
66
75
|
worker: Optional[ReplicaSpec],
|
@@ -105,6 +114,8 @@ def get_dask_job_custom_resource(
|
|
105
114
|
)
|
106
115
|
],
|
107
116
|
)
|
117
|
+
dash_prefix = f"/monitors/v1/{namespace}/{owner_name}/{project_name}/runs/{run_uuid}/plx-operation-{run_uuid}-scheduler/8787"
|
118
|
+
health_path = "{}/health".format(dash_prefix)
|
108
119
|
get_dask_replicas_template(
|
109
120
|
replica_name="Scheduler",
|
110
121
|
replica=scheduler,
|
@@ -114,6 +125,7 @@ def get_dask_job_custom_resource(
|
|
114
125
|
annotations=annotations,
|
115
126
|
template_spec=template_spec,
|
116
127
|
args=["dask-scheduler"],
|
128
|
+
additional_args=["--dashboard-prefix", dash_prefix],
|
117
129
|
ports=[
|
118
130
|
k8s_schemas.V1ContainerPort(
|
119
131
|
name="tcp-comm", container_port=8786, protocol="TCP"
|
@@ -123,12 +135,12 @@ def get_dask_job_custom_resource(
|
|
123
135
|
),
|
124
136
|
],
|
125
137
|
readiness_probe=client.V1Probe(
|
126
|
-
http_get=client.V1HTTPGetAction(path=
|
138
|
+
http_get=client.V1HTTPGetAction(path=health_path, port="http-dashboard"),
|
127
139
|
initial_delay_seconds=5,
|
128
140
|
period_seconds=5,
|
129
141
|
),
|
130
142
|
liveness_probe=client.V1Probe(
|
131
|
-
http_get=client.V1HTTPGetAction(path=
|
143
|
+
http_get=client.V1HTTPGetAction(path=health_path, port="http-dashboard"),
|
132
144
|
initial_delay_seconds=15,
|
133
145
|
period_seconds=15,
|
134
146
|
),
|
polyaxon/lifecycle.py
CHANGED
@@ -2,10 +2,10 @@ import datetime
|
|
2
2
|
|
3
3
|
from typing import Any, Dict, List, Optional, Union
|
4
4
|
|
5
|
+
from clipped.compact.pydantic import StrictStr
|
5
6
|
from clipped.utils.dates import parse_datetime
|
6
7
|
from clipped.utils.enums import PEnum
|
7
8
|
from clipped.utils.tz import now
|
8
|
-
from pydantic import StrictStr
|
9
9
|
|
10
10
|
from polyaxon.schemas.base import BaseSchemaModel
|
11
11
|
|
polyaxon/pkg.py
CHANGED
polyaxon/polyflow/__init__.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
from typing import Any, Dict, List, Optional, Union
|
2
2
|
|
3
|
+
from clipped.compact.pydantic import Field, StrictStr
|
3
4
|
from clipped.config.patch_strategy import PatchStrategy
|
4
5
|
from clipped.types.ref_or_obj import RefField
|
5
|
-
from pydantic import Field, StrictStr
|
6
6
|
|
7
7
|
from polyaxon.polyflow.cache import V1Cache
|
8
8
|
from polyaxon.polyflow.params import V1Param
|
@@ -1,8 +1,8 @@
|
|
1
1
|
from typing import List, Optional, Union
|
2
2
|
|
3
|
+
from clipped.compact.pydantic import StrictStr
|
3
4
|
from clipped.types.ref_or_obj import BoolOrRef, IntOrRef, RefField
|
4
5
|
from clipped.utils.enums import PEnum
|
5
|
-
from pydantic import StrictStr
|
6
6
|
|
7
7
|
from polyaxon.schemas.base import BaseSchemaModel
|
8
8
|
|