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
@@ -1,6 +1,12 @@
|
|
1
1
|
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
|
2
2
|
|
3
|
-
from clipped.compact.pydantic import
|
3
|
+
from clipped.compact.pydantic import (
|
4
|
+
Field,
|
5
|
+
StrictStr,
|
6
|
+
field_validator,
|
7
|
+
validation_always,
|
8
|
+
validation_before,
|
9
|
+
)
|
4
10
|
|
5
11
|
from polyaxon._k8s import k8s_schemas, k8s_validation
|
6
12
|
from polyaxon._schemas.base import BaseSchemaModel
|
@@ -13,16 +19,20 @@ class V1DefaultScheduling(BaseSchemaModel):
|
|
13
19
|
_IDENTIFIER = "default_scheduling"
|
14
20
|
_SWAGGER_FIELDS = ["affinity", "tolerations"]
|
15
21
|
|
16
|
-
node_selector: Optional[Dict[StrictStr, StrictStr]] = Field(
|
17
|
-
|
18
|
-
|
19
|
-
|
22
|
+
node_selector: Optional[Dict[StrictStr, StrictStr]] = Field(
|
23
|
+
alias="nodeSelector", default=None
|
24
|
+
)
|
25
|
+
affinity: Optional[Union[k8s_schemas.V1Affinity, Dict]] = None
|
26
|
+
tolerations: Optional[List[Union[k8s_schemas.V1Toleration, Dict]]] = None
|
27
|
+
image_pull_secrets: Optional[List[StrictStr]] = Field(
|
28
|
+
alias="imagePullSecrets", default=None
|
29
|
+
)
|
20
30
|
|
21
|
-
@
|
31
|
+
@field_validator("affinity", **validation_always, **validation_before)
|
22
32
|
def validate_affinity(cls, v) -> k8s_schemas.V1Affinity:
|
23
33
|
return k8s_validation.validate_k8s_affinity(v)
|
24
34
|
|
25
|
-
@
|
35
|
+
@field_validator("tolerations", **validation_always, **validation_before)
|
26
36
|
def validate_tolerations(cls, v) -> List[k8s_schemas.V1Toleration]:
|
27
37
|
if not v:
|
28
38
|
return v
|
polyaxon/_auxiliaries/init.py
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
from typing import Dict, Optional, Union
|
2
2
|
|
3
|
-
from clipped.compact.pydantic import
|
3
|
+
from clipped.compact.pydantic import (
|
4
|
+
Field,
|
5
|
+
StrictStr,
|
6
|
+
field_validator,
|
7
|
+
validation_always,
|
8
|
+
validation_before,
|
9
|
+
)
|
4
10
|
from clipped.utils.versions import clean_version_post_suffix
|
5
11
|
|
6
12
|
from polyaxon import pkg
|
@@ -93,12 +99,14 @@ class V1PolyaxonInitContainer(BaseSchemaModel):
|
|
93
99
|
_IDENTIFIER = "container"
|
94
100
|
_SWAGGER_FIELDS = ["resources"]
|
95
101
|
|
96
|
-
image: Optional[StrictStr]
|
97
|
-
image_tag: Optional[StrictStr] = Field(alias="imageTag")
|
98
|
-
image_pull_policy: Optional[PullPolicy] = Field(
|
99
|
-
|
102
|
+
image: Optional[StrictStr] = None
|
103
|
+
image_tag: Optional[StrictStr] = Field(alias="imageTag", default=None)
|
104
|
+
image_pull_policy: Optional[PullPolicy] = Field(
|
105
|
+
alias="imagePullPolicy", default=None
|
106
|
+
)
|
107
|
+
resources: Optional[Union[k8s_schemas.V1ResourceRequirements, Dict]] = None
|
100
108
|
|
101
|
-
@
|
109
|
+
@field_validator("resources", **validation_always, **validation_before)
|
102
110
|
def validate_resources(cls, v) -> k8s_schemas.V1ResourceRequirements:
|
103
111
|
return k8s_validation.validate_k8s_resource_requirements(v)
|
104
112
|
|
polyaxon/_auxiliaries/sidecar.py
CHANGED
@@ -147,14 +147,16 @@ class V1PolyaxonSidecarContainer(BaseSchemaModel):
|
|
147
147
|
|
148
148
|
_IDENTIFIER = "polyaxon_sidecar"
|
149
149
|
|
150
|
-
image: Optional[StrictStr]
|
151
|
-
image_tag: Optional[StrictStr] = Field(alias="imageTag")
|
152
|
-
image_pull_policy: Optional[PullPolicy] = Field(
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
150
|
+
image: Optional[StrictStr] = None
|
151
|
+
image_tag: Optional[StrictStr] = Field(alias="imageTag", default=None)
|
152
|
+
image_pull_policy: Optional[PullPolicy] = Field(
|
153
|
+
alias="imagePullPolicy", default=None
|
154
|
+
)
|
155
|
+
sleep_interval: Optional[IntOrRef] = Field(alias="sleepInterval", default=None)
|
156
|
+
sync_interval: Optional[IntOrRef] = Field(alias="syncInterval", default=None)
|
157
|
+
monitor_logs: Optional[BoolOrRef] = Field(alias="monitorLogs", default=None)
|
158
|
+
monitor_spec: Optional[BoolOrRef] = Field(alias="monitorSpec", default=None)
|
159
|
+
resources: Optional[Union[Dict[str, Any], RefField]] = None
|
158
160
|
|
159
161
|
def get_image(self):
|
160
162
|
image = self.image or "polyaxon/polyaxon-sidecar"
|
polyaxon/_cli/artifacts.py
CHANGED
@@ -15,6 +15,7 @@ from polyaxon._cli.project_versions import (
|
|
15
15
|
list_project_versions,
|
16
16
|
open_project_version_dashboard,
|
17
17
|
pull_one_or_many_project_versions,
|
18
|
+
push_one_or_many_project_versions,
|
18
19
|
register_project_version,
|
19
20
|
stage_project_version,
|
20
21
|
transfer_project_version,
|
@@ -72,7 +73,7 @@ def ls(ctx, project, query, sort, limit, offset):
|
|
72
73
|
\b
|
73
74
|
$ polyaxon artifacts ls --project=acme/data-versioning
|
74
75
|
"""
|
75
|
-
owner, project_name = get_project_or_local(
|
76
|
+
owner, _, project_name = get_project_or_local(
|
76
77
|
project or ctx.obj.get("project"), is_cli=True
|
77
78
|
)
|
78
79
|
list_project_versions(
|
@@ -145,11 +146,12 @@ def register(
|
|
145
146
|
$ polyaxon artifacts register -p owner/name -ver v1 --tags="tag1,tag2"
|
146
147
|
"""
|
147
148
|
version = version or ctx.obj.get("version")
|
148
|
-
owner, project_name = get_project_or_local(
|
149
|
+
owner, team, project_name = get_project_or_local(
|
149
150
|
project or ctx.obj.get("project"), is_cli=True
|
150
151
|
)
|
151
152
|
register_project_version(
|
152
153
|
owner=owner,
|
154
|
+
team=team,
|
153
155
|
project_name=project_name,
|
154
156
|
version=version,
|
155
157
|
kind=V1ProjectVersionKind.ARTIFACT,
|
@@ -227,11 +229,12 @@ def copy(
|
|
227
229
|
$ polyaxon artifacts copy -p owner/name -ver v1 --tags="tag1,tag2" --name new-v1
|
228
230
|
"""
|
229
231
|
version = version or ctx.obj.get("version")
|
230
|
-
owner, project_name = get_project_or_local(
|
232
|
+
owner, team, project_name = get_project_or_local(
|
231
233
|
project or ctx.obj.get("project"), is_cli=True
|
232
234
|
)
|
233
235
|
copy_project_version(
|
234
236
|
owner=owner,
|
237
|
+
team=team,
|
235
238
|
project_name=project_name,
|
236
239
|
version=version,
|
237
240
|
kind=V1ProjectVersionKind.ARTIFACT,
|
@@ -265,11 +268,12 @@ def get(ctx, project, version):
|
|
265
268
|
$ polyaxon artifacts get -p owner/data-versioning -ver rc1
|
266
269
|
"""
|
267
270
|
version = version or ctx.obj.get("version") or "latest"
|
268
|
-
owner, project_name = get_project_or_local(
|
271
|
+
owner, team, project_name = get_project_or_local(
|
269
272
|
project or ctx.obj.get("project"), is_cli=True
|
270
273
|
)
|
271
274
|
get_project_version(
|
272
275
|
owner=owner,
|
276
|
+
team=team,
|
273
277
|
project_name=project_name,
|
274
278
|
kind=V1ProjectVersionKind.ARTIFACT,
|
275
279
|
version=version,
|
@@ -296,7 +300,7 @@ def stages(ctx, project, version):
|
|
296
300
|
$ polyaxon artifacts stages -p owner/my-project -ver rc12
|
297
301
|
"""
|
298
302
|
version = version or ctx.obj.get("version") or "latest"
|
299
|
-
owner, project_name = get_project_or_local(
|
303
|
+
owner, _, project_name = get_project_or_local(
|
300
304
|
project or ctx.obj.get("project"), is_cli=True
|
301
305
|
)
|
302
306
|
get_project_version_stages(
|
@@ -332,7 +336,7 @@ def delete(ctx, project, version, yes):
|
|
332
336
|
$ polyaxon artifacts get -p owner/my-project -ver rc12
|
333
337
|
"""
|
334
338
|
version = version or ctx.obj.get("version") or "latest"
|
335
|
-
owner, project_name = get_project_or_local(
|
339
|
+
owner, _, project_name = get_project_or_local(
|
336
340
|
project or ctx.obj.get("project"), is_cli=True
|
337
341
|
)
|
338
342
|
delete_project_version(
|
@@ -375,7 +379,7 @@ def update(ctx, project, version, name, description, tags):
|
|
375
379
|
$ polyaxon artifacts update --tags="foo, bar"
|
376
380
|
"""
|
377
381
|
version = version or ctx.obj.get("version") or "latest"
|
378
|
-
owner, project_name = get_project_or_local(
|
382
|
+
owner, _, project_name = get_project_or_local(
|
379
383
|
project or ctx.obj.get("project"), is_cli=True
|
380
384
|
)
|
381
385
|
update_project_version(
|
@@ -423,7 +427,7 @@ def stage(ctx, project, version, to, reason, message):
|
|
423
427
|
$ polyaxon artifacts stage -p acme/foobar -ver rc12 --to=staging --reason GithubAction --message="Use carefully!"
|
424
428
|
"""
|
425
429
|
version = version or ctx.obj.get("version") or "latest"
|
426
|
-
owner, project_name = get_project_or_local(
|
430
|
+
owner, _, project_name = get_project_or_local(
|
427
431
|
project or ctx.obj.get("project"), is_cli=True
|
428
432
|
)
|
429
433
|
stage_project_version(
|
@@ -461,7 +465,7 @@ def transfer(ctx, project, version, to_project):
|
|
461
465
|
$ polyaxon artifacts transfer -p acme/foobar -ver rc12 --to-project=dest-project
|
462
466
|
"""
|
463
467
|
version = version or ctx.obj.get("version") or "latest"
|
464
|
-
owner, project_name = get_project_or_local(
|
468
|
+
owner, _, project_name = get_project_or_local(
|
465
469
|
project or ctx.obj.get("project"), is_cli=True
|
466
470
|
)
|
467
471
|
transfer_project_version(
|
@@ -530,7 +534,7 @@ def pull(
|
|
530
534
|
\b
|
531
535
|
$ polyaxon artifacts pull -p acme/foobar -a --path /tmp/versions
|
532
536
|
"""
|
533
|
-
owner, project_name = get_project_or_local(
|
537
|
+
owner, _, project_name = get_project_or_local(
|
534
538
|
project or ctx.obj.get("project"), is_cli=True
|
535
539
|
)
|
536
540
|
pull_one_or_many_project_versions(
|
@@ -547,6 +551,86 @@ def pull(
|
|
547
551
|
)
|
548
552
|
|
549
553
|
|
554
|
+
@artifacts.command()
|
555
|
+
@click.option(*OPTIONS_PROJECT["args"], **OPTIONS_PROJECT["kwargs"])
|
556
|
+
@click.option(*OPTIONS_ARTIFACT_VERSION["args"], **OPTIONS_ARTIFACT_VERSION["kwargs"])
|
557
|
+
@click.option(
|
558
|
+
"--all-versions",
|
559
|
+
"-a",
|
560
|
+
is_flag=True,
|
561
|
+
default=False,
|
562
|
+
help="To push all versions.",
|
563
|
+
)
|
564
|
+
@click.option(
|
565
|
+
"--clean",
|
566
|
+
"-c",
|
567
|
+
is_flag=True,
|
568
|
+
default=False,
|
569
|
+
help="To clean the version(s) local data after syncing.",
|
570
|
+
)
|
571
|
+
@click.option(
|
572
|
+
"--path",
|
573
|
+
"--path-from",
|
574
|
+
type=click.Path(exists=False),
|
575
|
+
help="Optional path where the artifact versions are persisted, "
|
576
|
+
"default value is taken from the env var: `POLYAXON_OFFLINE_ROOT`.",
|
577
|
+
)
|
578
|
+
@click.option(
|
579
|
+
"--reset-project",
|
580
|
+
is_flag=True,
|
581
|
+
default=False,
|
582
|
+
help="Optional, to ignore the owner/project of the local "
|
583
|
+
"version and use the owner/project provided or resolved from the current project.",
|
584
|
+
)
|
585
|
+
@click.option(
|
586
|
+
"--force",
|
587
|
+
is_flag=True,
|
588
|
+
default=False,
|
589
|
+
help="Flag to force register if the version already exists.",
|
590
|
+
)
|
591
|
+
@click.pass_context
|
592
|
+
@clean_outputs
|
593
|
+
def push(
|
594
|
+
ctx,
|
595
|
+
project,
|
596
|
+
version,
|
597
|
+
all_versions,
|
598
|
+
clean,
|
599
|
+
path,
|
600
|
+
reset_project,
|
601
|
+
force,
|
602
|
+
):
|
603
|
+
"""Push local packaged artifact version or multiple artifact versions to a remove server.
|
604
|
+
|
605
|
+
Uses /docs/core/cli/#caching
|
606
|
+
|
607
|
+
Examples:
|
608
|
+
|
609
|
+
\b
|
610
|
+
$ polyaxon artifacts push -ver rc12
|
611
|
+
|
612
|
+
\b
|
613
|
+
$ polyaxon artifacts push -p acme/foobar --path /tmp/versions
|
614
|
+
|
615
|
+
\b
|
616
|
+
$ polyaxon artifacts pull -p acme/foobar -a --path /tmp/versions
|
617
|
+
"""
|
618
|
+
owner, _, project_name = get_project_or_local(
|
619
|
+
project or ctx.obj.get("project"), is_cli=True
|
620
|
+
)
|
621
|
+
push_one_or_many_project_versions(
|
622
|
+
owner=owner,
|
623
|
+
project_name=project_name,
|
624
|
+
kind=V1ProjectVersionKind.ARTIFACT,
|
625
|
+
version=version,
|
626
|
+
all_versions=all_versions,
|
627
|
+
path=path,
|
628
|
+
clean=clean,
|
629
|
+
force=force,
|
630
|
+
reset_project=reset_project,
|
631
|
+
)
|
632
|
+
|
633
|
+
|
550
634
|
@artifacts.command()
|
551
635
|
@click.option(*OPTIONS_PROJECT["args"], **OPTIONS_PROJECT["kwargs"])
|
552
636
|
@click.option(*OPTIONS_ARTIFACT_VERSION["args"], **OPTIONS_ARTIFACT_VERSION["kwargs"])
|
@@ -569,11 +653,12 @@ def pull(
|
|
569
653
|
def dashboard(ctx, project, version, yes, url):
|
570
654
|
"""Open this artifact version's dashboard details in browser."""
|
571
655
|
version = version or ctx.obj.get("version") or "latest"
|
572
|
-
owner, project_name = get_project_or_local(
|
656
|
+
owner, team, project_name = get_project_or_local(
|
573
657
|
project or ctx.obj.get("project"), is_cli=True
|
574
658
|
)
|
575
659
|
open_project_version_dashboard(
|
576
660
|
owner=owner,
|
661
|
+
team=team,
|
577
662
|
project_name=project_name,
|
578
663
|
kind=V1ProjectVersionKind.ARTIFACT,
|
579
664
|
version=version,
|
polyaxon/_cli/components.py
CHANGED
@@ -21,6 +21,7 @@ from polyaxon._cli.project_versions import (
|
|
21
21
|
list_project_versions,
|
22
22
|
open_project_version_dashboard,
|
23
23
|
pull_one_or_many_project_versions,
|
24
|
+
push_one_or_many_project_versions,
|
24
25
|
register_project_version,
|
25
26
|
stage_project_version,
|
26
27
|
transfer_project_version,
|
@@ -113,7 +114,7 @@ def ls(ctx, project, query, sort, limit, offset):
|
|
113
114
|
\b
|
114
115
|
$ polyaxon components ls -p=acme/kaniko
|
115
116
|
"""
|
116
|
-
owner, project_name = get_project_or_local(
|
117
|
+
owner, _, project_name = get_project_or_local(
|
117
118
|
project or ctx.obj.get("project"), is_cli=True
|
118
119
|
)
|
119
120
|
polyaxon_client = get_current_or_public_client()
|
@@ -169,7 +170,7 @@ def register(ctx, polyaxonfile, project, version, description, tags, force):
|
|
169
170
|
$ polyaxon components register -f polyaxonfile.yaml -p owner/name -ver v1 --tags="tag1,tag2"
|
170
171
|
"""
|
171
172
|
version = version or ctx.obj.get("version")
|
172
|
-
owner, project_name = get_project_or_local(
|
173
|
+
owner, team, project_name = get_project_or_local(
|
173
174
|
project or ctx.obj.get("project"), is_cli=True
|
174
175
|
)
|
175
176
|
|
@@ -187,6 +188,7 @@ def register(ctx, polyaxonfile, project, version, description, tags, force):
|
|
187
188
|
|
188
189
|
register_project_version(
|
189
190
|
owner=owner,
|
191
|
+
team=team,
|
190
192
|
project_name=project_name,
|
191
193
|
version=version,
|
192
194
|
kind=V1ProjectVersionKind.COMPONENT,
|
@@ -255,11 +257,12 @@ def copy(
|
|
255
257
|
$ polyaxon components copy -p owner/name -ver v1 --tags="tag1,tag2" --name new-v1
|
256
258
|
"""
|
257
259
|
version = version or ctx.obj.get("version")
|
258
|
-
owner, project_name = get_project_or_local(
|
260
|
+
owner, team, project_name = get_project_or_local(
|
259
261
|
project or ctx.obj.get("project"), is_cli=True
|
260
262
|
)
|
261
263
|
copy_project_version(
|
262
264
|
owner=owner,
|
265
|
+
team=team,
|
263
266
|
project_name=project_name,
|
264
267
|
version=version,
|
265
268
|
kind=V1ProjectVersionKind.COMPONENT,
|
@@ -291,13 +294,14 @@ def get(ctx, project, version):
|
|
291
294
|
$ polyaxon components get -p owner/my-project -ver rc12
|
292
295
|
"""
|
293
296
|
version = version or ctx.obj.get("version") or "latest"
|
294
|
-
owner, project_name = get_project_or_local(
|
297
|
+
owner, team, project_name = get_project_or_local(
|
295
298
|
project or ctx.obj.get("project"), is_cli=True
|
296
299
|
)
|
297
300
|
polyaxon_client = get_current_or_public_client()
|
298
301
|
|
299
302
|
get_project_version(
|
300
303
|
owner=owner,
|
304
|
+
team=team,
|
301
305
|
project_name=project_name,
|
302
306
|
kind=V1ProjectVersionKind.COMPONENT,
|
303
307
|
version=version,
|
@@ -326,7 +330,7 @@ def stages(ctx, project, version):
|
|
326
330
|
$ polyaxon components stages -p owner/my-project -ver rc12
|
327
331
|
"""
|
328
332
|
version = version or ctx.obj.get("version") or "latest"
|
329
|
-
owner, project_name = get_project_or_local(
|
333
|
+
owner, _, project_name = get_project_or_local(
|
330
334
|
project or ctx.obj.get("project"), is_cli=True
|
331
335
|
)
|
332
336
|
polyaxon_client = get_current_or_public_client()
|
@@ -368,7 +372,7 @@ def delete(ctx, project, version, yes):
|
|
368
372
|
$ polyaxon components get -p owner/my-project -ver rc12
|
369
373
|
"""
|
370
374
|
version = version or ctx.obj.get("version") or "latest"
|
371
|
-
owner, project_name = get_project_or_local(
|
375
|
+
owner, _, project_name = get_project_or_local(
|
372
376
|
project or ctx.obj.get("project"), is_cli=True
|
373
377
|
)
|
374
378
|
delete_project_version(
|
@@ -411,7 +415,7 @@ def update(ctx, project, version, name, description, tags):
|
|
411
415
|
$ polyaxon components update --tags="foo, bar"
|
412
416
|
"""
|
413
417
|
version = version or ctx.obj.get("version") or "latest"
|
414
|
-
owner, project_name = get_project_or_local(
|
418
|
+
owner, _, project_name = get_project_or_local(
|
415
419
|
project or ctx.obj.get("project"), is_cli=True
|
416
420
|
)
|
417
421
|
update_project_version(
|
@@ -460,7 +464,7 @@ def stage(ctx, project, version, to, reason, message):
|
|
460
464
|
$ polyaxon components stage -p acme/foobar -ver rc12 --to=staging --reason GithubAction --message="Use carefully!"
|
461
465
|
"""
|
462
466
|
version = version or ctx.obj.get("version") or "latest"
|
463
|
-
owner, project_name = get_project_or_local(
|
467
|
+
owner, _, project_name = get_project_or_local(
|
464
468
|
project or ctx.obj.get("project"), is_cli=True
|
465
469
|
)
|
466
470
|
stage_project_version(
|
@@ -498,7 +502,7 @@ def transfer(ctx, project, version, to_project):
|
|
498
502
|
$ polyaxon components transfer -p acme/foobar -ver rc12 --to-project=dest-project
|
499
503
|
"""
|
500
504
|
version = version or ctx.obj.get("version") or "latest"
|
501
|
-
owner, project_name = get_project_or_local(
|
505
|
+
owner, _, project_name = get_project_or_local(
|
502
506
|
project or ctx.obj.get("project"), is_cli=True
|
503
507
|
)
|
504
508
|
transfer_project_version(
|
@@ -559,7 +563,7 @@ def pull(
|
|
559
563
|
\b
|
560
564
|
$ polyaxon components pull -p acme/foobar -a --path /tmp/versions
|
561
565
|
"""
|
562
|
-
owner, project_name = get_project_or_local(
|
566
|
+
owner, _, project_name = get_project_or_local(
|
563
567
|
project or ctx.obj.get("project"), is_cli=True
|
564
568
|
)
|
565
569
|
pull_one_or_many_project_versions(
|
@@ -576,6 +580,86 @@ def pull(
|
|
576
580
|
)
|
577
581
|
|
578
582
|
|
583
|
+
@components.command()
|
584
|
+
@click.option(*OPTIONS_PROJECT["args"], **OPTIONS_PROJECT["kwargs"])
|
585
|
+
@click.option(*OPTIONS_COMPONENT_VERSION["args"], **OPTIONS_COMPONENT_VERSION["kwargs"])
|
586
|
+
@click.option(
|
587
|
+
"--all-versions",
|
588
|
+
"-a",
|
589
|
+
is_flag=True,
|
590
|
+
default=False,
|
591
|
+
help="To push all versions.",
|
592
|
+
)
|
593
|
+
@click.option(
|
594
|
+
"--clean",
|
595
|
+
"-c",
|
596
|
+
is_flag=True,
|
597
|
+
default=False,
|
598
|
+
help="To clean the version(s) local data after syncing.",
|
599
|
+
)
|
600
|
+
@click.option(
|
601
|
+
"--path",
|
602
|
+
"--path-from",
|
603
|
+
type=click.Path(exists=False),
|
604
|
+
help="Optional path where the component versions are persisted, "
|
605
|
+
"default value is taken from the env var: `POLYAXON_OFFLINE_ROOT`.",
|
606
|
+
)
|
607
|
+
@click.option(
|
608
|
+
"--reset-project",
|
609
|
+
is_flag=True,
|
610
|
+
default=False,
|
611
|
+
help="Optional, to ignore the owner/project of the local "
|
612
|
+
"version and use the owner/project provided or resolved from the current project.",
|
613
|
+
)
|
614
|
+
@click.option(
|
615
|
+
"--force",
|
616
|
+
is_flag=True,
|
617
|
+
default=False,
|
618
|
+
help="Flag to force register if the version already exists.",
|
619
|
+
)
|
620
|
+
@click.pass_context
|
621
|
+
@clean_outputs
|
622
|
+
def push(
|
623
|
+
ctx,
|
624
|
+
project,
|
625
|
+
version,
|
626
|
+
all_versions,
|
627
|
+
clean,
|
628
|
+
path,
|
629
|
+
reset_project,
|
630
|
+
force,
|
631
|
+
):
|
632
|
+
"""Push local packaged component version or multiple component versions to a remove server.
|
633
|
+
|
634
|
+
Uses /docs/core/cli/#caching
|
635
|
+
|
636
|
+
Examples:
|
637
|
+
|
638
|
+
\b
|
639
|
+
$ polyaxon components push -ver rc12
|
640
|
+
|
641
|
+
\b
|
642
|
+
$ polyaxon components push -p acme/foobar --path /tmp/versions
|
643
|
+
|
644
|
+
\b
|
645
|
+
$ polyaxon components pull -p acme/foobar -a --path /tmp/versions
|
646
|
+
"""
|
647
|
+
owner, _, project_name = get_project_or_local(
|
648
|
+
project or ctx.obj.get("project"), is_cli=True
|
649
|
+
)
|
650
|
+
push_one_or_many_project_versions(
|
651
|
+
owner=owner,
|
652
|
+
project_name=project_name,
|
653
|
+
kind=V1ProjectVersionKind.COMPONENT,
|
654
|
+
version=version,
|
655
|
+
all_versions=all_versions,
|
656
|
+
path=path,
|
657
|
+
clean=clean,
|
658
|
+
force=force,
|
659
|
+
reset_project=reset_project,
|
660
|
+
)
|
661
|
+
|
662
|
+
|
579
663
|
@components.command()
|
580
664
|
@click.option(*OPTIONS_PROJECT["args"], **OPTIONS_PROJECT["kwargs"])
|
581
665
|
@click.option(*OPTIONS_COMPONENT_VERSION["args"], **OPTIONS_COMPONENT_VERSION["kwargs"])
|
@@ -598,11 +682,12 @@ def pull(
|
|
598
682
|
def dashboard(ctx, project, version, yes, url):
|
599
683
|
"""Open this component version's dashboard details in browser."""
|
600
684
|
version = version or ctx.obj.get("version") or "latest"
|
601
|
-
owner, project_name = get_project_or_local(
|
685
|
+
owner, team, project_name = get_project_or_local(
|
602
686
|
project or ctx.obj.get("project"), is_cli=True
|
603
687
|
)
|
604
688
|
open_project_version_dashboard(
|
605
689
|
owner=owner,
|
690
|
+
team=team,
|
606
691
|
project_name=project_name,
|
607
692
|
kind=V1ProjectVersionKind.COMPONENT,
|
608
693
|
version=version,
|
polyaxon/_cli/config.py
CHANGED
@@ -44,6 +44,27 @@ def set_home_path(home_path: str):
|
|
44
44
|
settings.set_home_config(_config)
|
45
45
|
|
46
46
|
|
47
|
+
def set_owner(owner: str):
|
48
|
+
try:
|
49
|
+
_config = UserConfigManager.get_config_or_default()
|
50
|
+
except Exception as e:
|
51
|
+
logger.debug(
|
52
|
+
"Home configuration could not be loaded.\n"
|
53
|
+
"Error: %s\n"
|
54
|
+
"Purging home configuration and resetting values.",
|
55
|
+
e,
|
56
|
+
)
|
57
|
+
UserConfigManager.purge()
|
58
|
+
_config = UserConfigManager.get_config_or_default()
|
59
|
+
|
60
|
+
data = owner.split("/")
|
61
|
+
if len(data) > 2:
|
62
|
+
Printer.error("Invalid owner format, please provide a valid owner.")
|
63
|
+
sys.exit(1)
|
64
|
+
_config.organization = owner
|
65
|
+
UserConfigManager.set_config(_config)
|
66
|
+
|
67
|
+
|
47
68
|
def validate_options(ctx, param, value):
|
48
69
|
possible_values = ["verbose", "host"]
|
49
70
|
if value and value not in possible_values:
|
@@ -199,6 +220,11 @@ def get(keys):
|
|
199
220
|
type=click.Path(exists=False),
|
200
221
|
help="To set POLYAXON_HOME to specify the context where the CLI/Client reads/writes global configuration.",
|
201
222
|
)
|
223
|
+
@click.option(
|
224
|
+
"--owner",
|
225
|
+
type=click.Path(exists=False),
|
226
|
+
help="To set current organization or team space.",
|
227
|
+
)
|
202
228
|
@click.option(
|
203
229
|
"--disable-errors-reporting",
|
204
230
|
type=bool,
|
@@ -230,6 +256,11 @@ def set_(**kwargs): # pylint:disable=redefined-builtin
|
|
230
256
|
home_path = kwargs.pop("home", None)
|
231
257
|
set_home_path(home_path)
|
232
258
|
|
259
|
+
if kwargs.get("owner") is not None:
|
260
|
+
owner = kwargs.pop("owner", None)
|
261
|
+
if owner:
|
262
|
+
set_owner(owner)
|
263
|
+
|
233
264
|
from polyaxon._managers.auth import AuthConfigManager
|
234
265
|
|
235
266
|
try:
|
polyaxon/_cli/dashboard.py
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
import sys
|
2
2
|
|
3
|
+
from typing import Optional
|
4
|
+
|
3
5
|
import click
|
4
6
|
|
5
7
|
from clipped.formatting import Printer
|
@@ -10,10 +12,18 @@ from polyaxon.api import POLYAXON_CLOUD_HOST
|
|
10
12
|
from polyaxon.logger import clean_outputs
|
11
13
|
|
12
14
|
|
15
|
+
def get_project_subpath_url(owner: str, team: Optional[str], project: str):
|
16
|
+
if team:
|
17
|
+
return "{}/ts/{}/{}".format(owner, team, project)
|
18
|
+
return "{}/{}".format(owner, project)
|
19
|
+
|
20
|
+
|
13
21
|
def get_dashboard_url(
|
14
|
-
base: str = "ui", subpath: str = "", use_cloud: bool = False
|
22
|
+
base: str = "ui", subpath: str = "", use_cloud: bool = False, host: str = None
|
15
23
|
) -> str:
|
16
|
-
|
24
|
+
if not host:
|
25
|
+
host = POLYAXON_CLOUD_HOST if use_cloud else settings.CLIENT_CONFIG.host
|
26
|
+
host = clean_host(host)
|
17
27
|
dashboard_url = "{}/{}/".format(host, base)
|
18
28
|
if subpath:
|
19
29
|
return "{}{}/".format(dashboard_url, subpath.rstrip("/"))
|
polyaxon/_cli/init.py
CHANGED
@@ -112,7 +112,7 @@ def init(project, git_connection, git_url, polyaxonfile, polyaxonignore, yes):
|
|
112
112
|
command_help="polyaxon init",
|
113
113
|
)
|
114
114
|
if project:
|
115
|
-
owner, project_name = get_project_or_local(project, is_cli=True)
|
115
|
+
owner, _, project_name = get_project_or_local(project, is_cli=True)
|
116
116
|
try:
|
117
117
|
polyaxon_client = ProjectClient(
|
118
118
|
owner=owner, project=project_name, manual_exceptions_handling=True
|