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
@@ -8,13 +8,13 @@ from clipped.types.uuids import UUIDStr
|
|
8
8
|
|
9
9
|
|
10
10
|
class V1Token(BaseAllowSchemaModel):
|
11
|
-
uuid: Optional[UUIDStr]
|
12
|
-
key: Optional[StrictStr]
|
13
|
-
name: Optional[StrictStr]
|
14
|
-
scopes: Optional[List[StrictStr]]
|
15
|
-
services: Optional[List[StrictStr]]
|
16
|
-
started_at: Optional[datetime.datetime]
|
17
|
-
expires_at: Optional[datetime.datetime]
|
18
|
-
created_at: Optional[datetime.datetime]
|
19
|
-
updated_at: Optional[datetime.datetime]
|
20
|
-
expiration: Optional[int]
|
11
|
+
uuid: Optional[UUIDStr] = None
|
12
|
+
key: Optional[StrictStr] = None
|
13
|
+
name: Optional[StrictStr] = None
|
14
|
+
scopes: Optional[List[StrictStr]] = None
|
15
|
+
services: Optional[List[StrictStr]] = None
|
16
|
+
started_at: Optional[datetime.datetime] = None
|
17
|
+
expires_at: Optional[datetime.datetime] = None
|
18
|
+
created_at: Optional[datetime.datetime] = None
|
19
|
+
updated_at: Optional[datetime.datetime] = None
|
20
|
+
expiration: Optional[int] = None
|
@@ -6,9 +6,9 @@ from clipped.types.email import EmailStr
|
|
6
6
|
|
7
7
|
|
8
8
|
class V1TrialStart(BaseAllowSchemaModel):
|
9
|
-
name: Optional[StrictStr]
|
10
|
-
email: Optional[EmailStr]
|
11
|
-
organization: Optional[StrictStr]
|
12
|
-
plan: Optional[StrictStr]
|
13
|
-
seats: Optional[int]
|
14
|
-
details: Optional[Dict[str, Any]]
|
9
|
+
name: Optional[StrictStr] = None
|
10
|
+
email: Optional[EmailStr] = None
|
11
|
+
organization: Optional[StrictStr] = None
|
12
|
+
plan: Optional[StrictStr] = None
|
13
|
+
seats: Optional[int] = None
|
14
|
+
details: Optional[Dict[str, Any]] = None
|
polyaxon/_sdk/schemas/v1_user.py
CHANGED
@@ -2,13 +2,12 @@ from typing import Optional
|
|
2
2
|
|
3
3
|
from clipped.compact.pydantic import StrictStr
|
4
4
|
from clipped.config.schema import BaseAllowSchemaModel
|
5
|
-
from clipped.types.email import EmailStr
|
6
5
|
|
7
6
|
|
8
7
|
class V1User(BaseAllowSchemaModel):
|
9
|
-
username: Optional[StrictStr]
|
10
|
-
email: Optional[
|
11
|
-
name: Optional[StrictStr]
|
12
|
-
kind: Optional[StrictStr]
|
13
|
-
theme: Optional[int]
|
14
|
-
organization: Optional[StrictStr]
|
8
|
+
username: Optional[StrictStr] = None
|
9
|
+
email: Optional[StrictStr] = None
|
10
|
+
name: Optional[StrictStr] = None
|
11
|
+
kind: Optional[StrictStr] = None
|
12
|
+
theme: Optional[int] = None
|
13
|
+
organization: Optional[StrictStr] = None
|
@@ -0,0 +1,17 @@
|
|
1
|
+
from typing import Optional
|
2
|
+
|
3
|
+
from clipped.compact.pydantic import StrictStr
|
4
|
+
from clipped.config.schema import BaseAllowSchemaModel
|
5
|
+
|
6
|
+
|
7
|
+
class V1UserAccessData(BaseAllowSchemaModel):
|
8
|
+
username: Optional[StrictStr] = None
|
9
|
+
is_sa: Optional[bool] = None
|
10
|
+
|
11
|
+
|
12
|
+
class V1UserAccess(BaseAllowSchemaModel):
|
13
|
+
user: Optional[StrictStr] = None
|
14
|
+
user_data: Optional[V1UserAccessData] = None
|
15
|
+
queue: Optional[StrictStr] = None
|
16
|
+
preset: Optional[StrictStr] = None
|
17
|
+
namespace: Optional[StrictStr] = None
|
@@ -6,8 +6,8 @@ from clipped.types.email import EmailStr
|
|
6
6
|
|
7
7
|
|
8
8
|
class V1UserSingup(BaseAllowSchemaModel):
|
9
|
-
username: Optional[StrictStr]
|
10
|
-
email: Optional[EmailStr]
|
11
|
-
organization: Optional[StrictStr]
|
12
|
-
password: Optional[StrictStr]
|
13
|
-
invitation_key: Optional[StrictStr]
|
9
|
+
username: Optional[StrictStr] = None
|
10
|
+
email: Optional[EmailStr] = None
|
11
|
+
organization: Optional[StrictStr] = None
|
12
|
+
password: Optional[StrictStr] = None
|
13
|
+
invitation_key: Optional[StrictStr] = None
|
@@ -16,7 +16,7 @@ from polyaxon._fs.watcher import FSWatcher
|
|
16
16
|
from polyaxon._k8s.manager.async_manager import AsyncK8sManager
|
17
17
|
from polyaxon._sidecar.container.intervals import get_sync_interval
|
18
18
|
from polyaxon._sidecar.container.monitors import sync_artifacts, sync_logs, sync_spec
|
19
|
-
from polyaxon._sidecar.ignore import
|
19
|
+
from polyaxon._sidecar.ignore import IGNORE_FOLDERS
|
20
20
|
from polyaxon.client import RunClient
|
21
21
|
from polyaxon.exceptions import PolyaxonClientException, PolyaxonContainerException
|
22
22
|
from polyaxon.logger import logger
|
@@ -34,6 +34,9 @@ async def start_sidecar(
|
|
34
34
|
sync_interval = get_sync_interval(
|
35
35
|
interval=sync_interval, sleep_interval=sleep_interval
|
36
36
|
)
|
37
|
+
fs_refresh_interval = get_sync_interval(
|
38
|
+
interval=60 * 60 * 2, sleep_interval=sleep_interval
|
39
|
+
)
|
37
40
|
try:
|
38
41
|
pod_id = os.environ[ENV_KEYS_K8S_POD_ID]
|
39
42
|
except KeyError as e:
|
@@ -61,6 +64,7 @@ async def start_sidecar(
|
|
61
64
|
retry = 0
|
62
65
|
is_running = True
|
63
66
|
counter = 0
|
67
|
+
fs_refresh_counter = 0
|
64
68
|
state = {
|
65
69
|
"last_artifacts_check": None,
|
66
70
|
"last_logs_check": None,
|
@@ -74,32 +78,40 @@ async def start_sidecar(
|
|
74
78
|
run_kind=pod.metadata.annotations.get("operation.polyaxon.com/kind"),
|
75
79
|
)
|
76
80
|
if monitor_logs:
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
81
|
+
try:
|
82
|
+
state["last_logs_check"] = await sync_logs(
|
83
|
+
run_uuid=run_uuid,
|
84
|
+
k8s_manager=k8s_manager,
|
85
|
+
pod=pod,
|
86
|
+
last_time=state["last_logs_check"],
|
87
|
+
stream=False,
|
88
|
+
)
|
89
|
+
except Exception as exp:
|
90
|
+
logger.log(
|
91
|
+
"An error occurred while syncing logs, Exception %s" % repr(exp)
|
92
|
+
)
|
85
93
|
if monitor_outputs:
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
+
try:
|
95
|
+
await sync_artifacts(
|
96
|
+
fs=fs,
|
97
|
+
fw=fw,
|
98
|
+
store_path=connection.store_path,
|
99
|
+
run_uuid=run_uuid,
|
100
|
+
exclude=IGNORE_FOLDERS,
|
101
|
+
)
|
102
|
+
except Exception as e:
|
103
|
+
logger.debug(
|
104
|
+
"An error occurred while syncing artifacts, Exception %s" % repr(e)
|
105
|
+
)
|
94
106
|
try:
|
95
107
|
client.sync_events_summaries(
|
96
|
-
last_check=
|
108
|
+
last_check=state["last_artifacts_check"],
|
97
109
|
events_path=ctx_paths.CONTEXT_MOUNT_RUN_EVENTS_FORMAT.format(
|
98
110
|
run_uuid
|
99
111
|
),
|
100
112
|
)
|
101
113
|
client.sync_system_events_summaries(
|
102
|
-
last_check=
|
114
|
+
last_check=state["last_artifacts_check"],
|
103
115
|
events_path=ctx_paths.CONTEXT_MOUNT_RUN_SYSTEM_RESOURCES_EVENTS_FORMAT.format(
|
104
116
|
run_uuid
|
105
117
|
),
|
@@ -131,7 +143,14 @@ async def start_sidecar(
|
|
131
143
|
retry = 0
|
132
144
|
|
133
145
|
counter += 1
|
134
|
-
|
146
|
+
fs_refresh_counter += 1
|
147
|
+
|
148
|
+
if fs_refresh_counter >= fs_refresh_interval:
|
149
|
+
fs_refresh_counter = 0
|
150
|
+
await close_fs(fs)
|
151
|
+
fs = await get_async_fs_from_connection(connection=connection)
|
152
|
+
|
153
|
+
if counter >= sync_interval:
|
135
154
|
counter = 0
|
136
155
|
try:
|
137
156
|
await monitor()
|
@@ -4,7 +4,7 @@ from typing import Optional
|
|
4
4
|
|
5
5
|
import aiofiles
|
6
6
|
|
7
|
-
from clipped.utils.paths import check_or_create_path
|
7
|
+
from clipped.utils.paths import check_or_create_path
|
8
8
|
from kubernetes_asyncio.client.models import V1Pod
|
9
9
|
|
10
10
|
from polyaxon._contexts import paths as ctx_paths
|
@@ -19,26 +19,23 @@ async def sync_logs(
|
|
19
19
|
pod: V1Pod,
|
20
20
|
last_time: Optional[datetime.datetime],
|
21
21
|
stream: bool = False,
|
22
|
-
|
23
|
-
):
|
22
|
+
) -> Optional[datetime.datetime]:
|
24
23
|
path_from = ctx_paths.CONTEXT_MOUNT_ARTIFACTS_FORMAT.format(run_uuid)
|
25
|
-
path_from = "{}
|
24
|
+
path_from = "{}/plxlogs".format(path_from)
|
26
25
|
|
27
|
-
|
28
|
-
delete_path(path_from)
|
29
|
-
return
|
30
|
-
|
31
|
-
logs, _ = await query_k8s_pod_logs(
|
26
|
+
logs, last_time = await query_k8s_pod_logs(
|
32
27
|
k8s_manager=k8s_manager,
|
33
28
|
pod=pod,
|
34
29
|
last_time=last_time,
|
35
30
|
stream=stream,
|
36
31
|
)
|
37
32
|
if not logs:
|
38
|
-
return
|
33
|
+
return last_time
|
39
34
|
|
40
|
-
path_from = "{}/{}".format(path_from, pod.metadata.name)
|
35
|
+
path_from = "{}/{}.jsonl".format(path_from, pod.metadata.name)
|
41
36
|
check_or_create_path(path_from, is_dir=False)
|
42
|
-
async with aiofiles.open(path_from, "
|
37
|
+
async with aiofiles.open(path_from, "a") as filepath:
|
43
38
|
_logs = V1Logs.construct(logs=logs)
|
44
|
-
await filepath.write(_logs.
|
39
|
+
await filepath.write(_logs.get_jsonl_events())
|
40
|
+
|
41
|
+
return last_time
|
polyaxon/_sidecar/ignore.py
CHANGED
polyaxon/_utils/cli_constants.py
CHANGED
polyaxon/_utils/fqn_utils.py
CHANGED
@@ -9,15 +9,32 @@ from clipped.utils.paths import get_relative_path_to
|
|
9
9
|
from polyaxon.exceptions import PolyaxonSchemaError
|
10
10
|
|
11
11
|
|
12
|
+
def get_owner_team_space(owner: str, team: Optional[str] = None) -> str:
|
13
|
+
if team:
|
14
|
+
return "{}/{}".format(owner, team)
|
15
|
+
return owner
|
16
|
+
|
17
|
+
|
18
|
+
def split_owner_team_space(owner: str) -> Tuple[str, Optional[str]]:
|
19
|
+
return owner.split("/") if owner and "/" in owner else (owner, None)
|
20
|
+
|
21
|
+
|
22
|
+
def _remove_team(owner: str) -> str:
|
23
|
+
return split_owner_team_space(owner)[0]
|
24
|
+
|
25
|
+
|
12
26
|
def get_project_instance(owner: str, project: str) -> str:
|
27
|
+
owner = _remove_team(owner)
|
13
28
|
return "{}.{}".format(owner, project)
|
14
29
|
|
15
30
|
|
16
31
|
def get_run_instance(owner: str, project: str, run_uuid: str) -> str:
|
32
|
+
owner = _remove_team(owner)
|
17
33
|
return "{}.{}.runs.{}".format(owner, project, run_uuid)
|
18
34
|
|
19
35
|
|
20
36
|
def get_cleaner_instance(owner: str, project: str, run_uuid: str) -> str:
|
37
|
+
owner = _remove_team(owner)
|
21
38
|
return "{}.{}.cleaners.{}".format(owner, project, run_uuid)
|
22
39
|
|
23
40
|
|
@@ -53,6 +70,7 @@ def to_fqn_name(name: str) -> str:
|
|
53
70
|
def get_entity_full_name(
|
54
71
|
owner: Optional[str] = None, entity: Optional[str] = None
|
55
72
|
) -> str:
|
73
|
+
owner = _remove_team(owner)
|
56
74
|
if owner and entity:
|
57
75
|
return "{}/{}".format(owner, entity)
|
58
76
|
return entity
|
@@ -65,11 +83,14 @@ def get_entity_info(entity: str) -> Tuple[str, str]:
|
|
65
83
|
)
|
66
84
|
|
67
85
|
parts = entity.replace(".", "/").split("/")
|
68
|
-
if len(parts) >
|
86
|
+
if len(parts) > 3:
|
69
87
|
raise PolyaxonSchemaError(
|
70
88
|
"Received an invalid entity reference: `{}`".format(entity)
|
71
89
|
)
|
72
|
-
if len(parts) ==
|
90
|
+
if len(parts) == 3:
|
91
|
+
owner = "/".join(parts[:2])
|
92
|
+
entity_name = parts[2]
|
93
|
+
elif len(parts) == 2:
|
73
94
|
owner, entity_name = parts
|
74
95
|
else:
|
75
96
|
owner = None
|
@@ -81,6 +102,8 @@ def get_entity_info(entity: str) -> Tuple[str, str]:
|
|
81
102
|
def get_versioned_entity_full_name(
|
82
103
|
owner: Optional[str], component: str, tag: Optional[str] = None
|
83
104
|
) -> str:
|
105
|
+
owner = _remove_team(owner)
|
106
|
+
|
84
107
|
if tag:
|
85
108
|
component = "{}:{}".format(component, tag)
|
86
109
|
if owner:
|
polyaxon/_utils/test_utils.py
CHANGED
@@ -14,6 +14,7 @@ from polyaxon._schemas.agent import AgentConfig
|
|
14
14
|
from polyaxon._schemas.authentication import AccessTokenConfig
|
15
15
|
from polyaxon._schemas.cli import CliConfig
|
16
16
|
from polyaxon._schemas.client import ClientConfig
|
17
|
+
from polyaxon._schemas.installation import V1Installation
|
17
18
|
from polyaxon.settings import set_agent_config
|
18
19
|
|
19
20
|
|
@@ -76,7 +77,7 @@ def patch_settings(
|
|
76
77
|
|
77
78
|
settings.CLI_CONFIG = None
|
78
79
|
if set_cli:
|
79
|
-
settings.CLI_CONFIG = CliConfig(installation=
|
80
|
+
settings.CLI_CONFIG = CliConfig(installation=V1Installation(dist=_dist.EE))
|
80
81
|
|
81
82
|
settings.AGENT_CONFIG = None
|
82
83
|
if set_agent:
|
polyaxon/pkg.py
CHANGED
polyaxon/schemas.py
CHANGED
@@ -210,7 +210,6 @@ from polyaxon._sdk.schemas import (
|
|
210
210
|
V1Preset,
|
211
211
|
V1Project,
|
212
212
|
V1ProjectSettings,
|
213
|
-
V1ProjectUserAccess,
|
214
213
|
V1ProjectVersion,
|
215
214
|
V1Queue,
|
216
215
|
V1Run,
|
@@ -230,6 +229,7 @@ from polyaxon._sdk.schemas import (
|
|
230
229
|
V1Token,
|
231
230
|
V1TrialStart,
|
232
231
|
V1User,
|
232
|
+
V1UserAccess,
|
233
233
|
V1UserEmail,
|
234
234
|
V1UserSingup,
|
235
235
|
V1Uuids,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: polyaxon
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.6.0
|
4
4
|
Summary: Command Line Interface (CLI) and client to interact with Polyaxon API.
|
5
5
|
Home-page: https://github.com/polyaxon/polyaxon
|
6
6
|
Author: Polyaxon, Inc.
|
@@ -33,67 +33,67 @@ Classifier: Programming Language :: Python :: 3.11
|
|
33
33
|
Requires-Python: >=3.8
|
34
34
|
Description-Content-Type: text/markdown
|
35
35
|
License-File: LICENSE
|
36
|
-
Requires-Dist: click
|
37
|
-
Requires-Dist: clipped
|
38
|
-
Requires-Dist: vents
|
39
|
-
Requires-Dist: Jinja2
|
40
|
-
Requires-Dist: kubernetes
|
41
|
-
Requires-Dist: python-dateutil
|
42
|
-
Requires-Dist: pytz
|
43
|
-
Requires-Dist: PyYAML
|
44
|
-
Requires-Dist: orjson
|
45
|
-
Requires-Dist: psutil
|
46
|
-
Requires-Dist: requests
|
47
|
-
Requires-Dist: requests-toolbelt
|
48
|
-
Requires-Dist: rich
|
49
|
-
Requires-Dist: sentry-sdk
|
50
|
-
Requires-Dist: urllib3
|
51
|
-
Requires-Dist: certifi
|
52
|
-
Requires-Dist: pydantic
|
53
|
-
Requires-Dist: traceml
|
54
|
-
Requires-Dist: hypertune
|
36
|
+
Requires-Dist: click<9.0.0,>=7.1.1
|
37
|
+
Requires-Dist: clipped==0.9.*
|
38
|
+
Requires-Dist: vents==0.5.*
|
39
|
+
Requires-Dist: Jinja2<3.1.5,>=2.10.3
|
40
|
+
Requires-Dist: kubernetes>=10.0.1
|
41
|
+
Requires-Dist: python-dateutil>=2.7.3
|
42
|
+
Requires-Dist: pytz>=2019.2
|
43
|
+
Requires-Dist: PyYAML>=5.1
|
44
|
+
Requires-Dist: orjson>=3.7
|
45
|
+
Requires-Dist: psutil>=5.4.7
|
46
|
+
Requires-Dist: requests>=2.20.1
|
47
|
+
Requires-Dist: requests-toolbelt>=0.8.0
|
48
|
+
Requires-Dist: rich>=12.0.0
|
49
|
+
Requires-Dist: sentry-sdk<2.6,>=1.2.0
|
50
|
+
Requires-Dist: urllib3>=1.25.6
|
51
|
+
Requires-Dist: certifi>=2022.12.7
|
52
|
+
Requires-Dist: pydantic>=1.10.2
|
53
|
+
Requires-Dist: traceml==1.2.*
|
54
|
+
Requires-Dist: hypertune==1.2.*
|
55
55
|
Provides-Extra: azure
|
56
|
-
Requires-Dist: adlfs
|
56
|
+
Requires-Dist: adlfs; extra == "azure"
|
57
57
|
Provides-Extra: dev
|
58
|
-
Requires-Dist: moto
|
58
|
+
Requires-Dist: moto==5.0.13; extra == "dev"
|
59
59
|
Provides-Extra: docker
|
60
|
-
Requires-Dist: docker
|
60
|
+
Requires-Dist: docker; extra == "docker"
|
61
61
|
Provides-Extra: fs
|
62
|
-
Requires-Dist: adlfs
|
63
|
-
Requires-Dist: fsspec
|
64
|
-
Requires-Dist: gcsfs
|
65
|
-
Requires-Dist: s3fs
|
62
|
+
Requires-Dist: adlfs==2024.12.0; extra == "fs"
|
63
|
+
Requires-Dist: fsspec==2024.12.0; extra == "fs"
|
64
|
+
Requires-Dist: gcsfs==2024.12.0; extra == "fs"
|
65
|
+
Requires-Dist: s3fs==2024.12.0; extra == "fs"
|
66
66
|
Provides-Extra: fsspec
|
67
|
-
Requires-Dist: fsspec
|
67
|
+
Requires-Dist: fsspec; extra == "fsspec"
|
68
68
|
Provides-Extra: gcs
|
69
|
-
Requires-Dist: gcsfs
|
69
|
+
Requires-Dist: gcsfs; extra == "gcs"
|
70
70
|
Provides-Extra: git
|
71
|
-
Requires-Dist: gitpython
|
71
|
+
Requires-Dist: gitpython; extra == "git"
|
72
72
|
Provides-Extra: init
|
73
|
-
Requires-Dist: docker
|
74
|
-
Requires-Dist: GitPython
|
75
|
-
Requires-Dist: aiofiles
|
73
|
+
Requires-Dist: docker; extra == "init"
|
74
|
+
Requires-Dist: GitPython<3.2.0; extra == "init"
|
75
|
+
Requires-Dist: aiofiles==24.1.0; extra == "init"
|
76
76
|
Provides-Extra: k8s_async
|
77
|
-
Requires-Dist: kubernetes-asyncio
|
78
|
-
Requires-Dist: aiohttp
|
79
|
-
Requires-Dist: anyio
|
77
|
+
Requires-Dist: kubernetes-asyncio>=28.2.1; extra == "k8s-async"
|
78
|
+
Requires-Dist: aiohttp>=3.0.0; extra == "k8s-async"
|
79
|
+
Requires-Dist: anyio; extra == "k8s-async"
|
80
80
|
Provides-Extra: numpy
|
81
|
-
Requires-Dist: numpy
|
81
|
+
Requires-Dist: numpy; extra == "numpy"
|
82
82
|
Provides-Extra: s3
|
83
|
-
Requires-Dist: s3fs
|
83
|
+
Requires-Dist: s3fs; extra == "s3"
|
84
84
|
Provides-Extra: sandbox
|
85
|
-
Requires-Dist: haupt[sandbox]
|
85
|
+
Requires-Dist: haupt[sandbox]; extra == "sandbox"
|
86
86
|
Provides-Extra: sidecar
|
87
|
-
Requires-Dist: aiofiles
|
88
|
-
Requires-Dist: pandas
|
89
|
-
Requires-Dist: anyio
|
87
|
+
Requires-Dist: aiofiles==24.1.0; extra == "sidecar"
|
88
|
+
Requires-Dist: pandas; extra == "sidecar"
|
89
|
+
Requires-Dist: anyio; extra == "sidecar"
|
90
90
|
|
91
91
|
[](LICENSE)
|
92
92
|
[](https://hub.docker.com/r/polyaxon/polyaxon-api)
|
93
93
|
[](https://polyaxon.com/slack/)
|
94
94
|
|
95
95
|
[](https://polyaxon.com/docs/)
|
96
|
-
[](https://polyaxon.com/docs/releases/2-6/)
|
97
97
|
[](https://github.com/polyaxon/polyaxon/issues)
|
98
98
|
[](https://github.com/orgs/polyaxon/projects/5)
|
99
99
|
|