xpk 0.17.2__py3-none-any.whl → 1.0.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.
- xpk/commands/cluster.py +4 -35
- xpk/commands/cluster_gcluster.py +1 -13
- xpk/commands/cluster_gcluster_test.py +2 -10
- xpk/commands/cluster_test.py +0 -4
- xpk/commands/workload.py +10 -3
- xpk/commands/workload_test.py +1 -0
- xpk/core/cluster.py +10 -9
- xpk/core/config.py +5 -17
- xpk/core/kueue_manager_test.py +2 -0
- xpk/core/nodepool.py +6 -0
- xpk/core/nodepool_test.py +4 -0
- xpk/core/scheduling.py +28 -3
- xpk/core/scheduling_test.py +38 -1
- xpk/core/system_characteristics.py +39 -16
- xpk/core/system_characteristics_test.py +11 -0
- xpk/core/workload_decorators/rdma_decorator.py +0 -15
- xpk/core/workload_decorators/tcpx_decorator.py +0 -8
- xpk/core/workload_decorators/tcpx_decorator_test.py +0 -78
- xpk/core/workload_decorators/tcpxo_decorator.py +0 -16
- xpk/parser/common.py +0 -17
- xpk/parser/core.py +0 -39
- xpk/parser/storage.py +0 -11
- xpk/utils/feature_flags.py +1 -1
- xpk/utils/validation.py +0 -8
- {xpk-0.17.2.dist-info → xpk-1.0.0.dist-info}/METADATA +15 -4
- {xpk-0.17.2.dist-info → xpk-1.0.0.dist-info}/RECORD +30 -41
- xpk/commands/batch.py +0 -144
- xpk/commands/job.py +0 -244
- xpk/commands/kind.py +0 -286
- xpk/commands/kjob_common.py +0 -60
- xpk/commands/run.py +0 -140
- xpk/commands/shell.py +0 -142
- xpk/parser/batch.py +0 -43
- xpk/parser/job.py +0 -147
- xpk/parser/kind.py +0 -95
- xpk/parser/run.py +0 -47
- xpk/parser/shell.py +0 -59
- {xpk-0.17.2.dist-info → xpk-1.0.0.dist-info}/WHEEL +0 -0
- {xpk-0.17.2.dist-info → xpk-1.0.0.dist-info}/entry_points.txt +0 -0
- {xpk-0.17.2.dist-info → xpk-1.0.0.dist-info}/licenses/LICENSE +0 -0
- {xpk-0.17.2.dist-info → xpk-1.0.0.dist-info}/top_level.txt +0 -0
xpk/parser/job.py
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Copyright 2024 Google LLC
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
import argparse
|
|
18
|
-
from ..commands.job import job_info, job_list, job_cancel
|
|
19
|
-
|
|
20
|
-
from .common import add_shared_arguments
|
|
21
|
-
from .validators import name_type
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def set_job_parser(job_parser: argparse.ArgumentParser):
|
|
25
|
-
job_subcommands = job_parser.add_subparsers(
|
|
26
|
-
title='job subcommands',
|
|
27
|
-
dest='xpk_job_subcommands',
|
|
28
|
-
help=(
|
|
29
|
-
'These are commands related to job management. Look at help for'
|
|
30
|
-
' specific subcommands for more details.'
|
|
31
|
-
),
|
|
32
|
-
)
|
|
33
|
-
set_job_info_parser(
|
|
34
|
-
job_info_parser=job_subcommands.add_parser(
|
|
35
|
-
'info', help='Show information about specified job.'
|
|
36
|
-
)
|
|
37
|
-
)
|
|
38
|
-
set_job_list_parser(
|
|
39
|
-
job_list_parser=job_subcommands.add_parser('ls', help='List jobs.')
|
|
40
|
-
)
|
|
41
|
-
set_job_cancel_parser(
|
|
42
|
-
job_cancel_parser=job_subcommands.add_parser(
|
|
43
|
-
'cancel', help='Cancel job execution.'
|
|
44
|
-
)
|
|
45
|
-
)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
def set_job_info_parser(job_info_parser: argparse.ArgumentParser):
|
|
49
|
-
job_info_required_arguments = job_info_parser.add_argument_group(
|
|
50
|
-
'Required arguments',
|
|
51
|
-
'The basic information required to identify the job.',
|
|
52
|
-
)
|
|
53
|
-
job_info_optional_arguments = job_info_parser.add_argument_group(
|
|
54
|
-
'Optional Arguments', 'Arguments optional for job info.'
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
### Required arguments
|
|
58
|
-
job_info_required_arguments.add_argument(
|
|
59
|
-
'--cluster',
|
|
60
|
-
type=name_type,
|
|
61
|
-
default=None,
|
|
62
|
-
help='The name of the cluster to info jobs on.',
|
|
63
|
-
required=True,
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
job_info_optional_arguments.add_argument(
|
|
67
|
-
'--kind-cluster',
|
|
68
|
-
type=bool,
|
|
69
|
-
action=argparse.BooleanOptionalAction,
|
|
70
|
-
default=False,
|
|
71
|
-
help='Apply command to a local test cluster.',
|
|
72
|
-
)
|
|
73
|
-
job_info_required_arguments.add_argument(
|
|
74
|
-
'name',
|
|
75
|
-
type=str,
|
|
76
|
-
default=None,
|
|
77
|
-
help='Name of the job.',
|
|
78
|
-
)
|
|
79
|
-
job_info_parser.set_defaults(func=job_info)
|
|
80
|
-
add_shared_arguments(job_info_parser)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
def set_job_list_parser(job_list_parser: argparse.ArgumentParser):
|
|
84
|
-
job_list_required_arguments = job_list_parser.add_argument_group(
|
|
85
|
-
'Required Arguments',
|
|
86
|
-
'Arguments required for job list.',
|
|
87
|
-
)
|
|
88
|
-
job_list_optional_arguments = job_list_parser.add_argument_group(
|
|
89
|
-
'Optional Arguments', 'Arguments optional for job list.'
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
### Required arguments
|
|
93
|
-
job_list_required_arguments.add_argument(
|
|
94
|
-
'--cluster',
|
|
95
|
-
type=name_type,
|
|
96
|
-
default=None,
|
|
97
|
-
help='The name of the cluster to list jobs on.',
|
|
98
|
-
required=True,
|
|
99
|
-
)
|
|
100
|
-
|
|
101
|
-
job_list_optional_arguments.add_argument(
|
|
102
|
-
'--kind-cluster',
|
|
103
|
-
type=bool,
|
|
104
|
-
action=argparse.BooleanOptionalAction,
|
|
105
|
-
default=False,
|
|
106
|
-
help='Apply command to a local test cluster.',
|
|
107
|
-
)
|
|
108
|
-
|
|
109
|
-
job_list_parser.set_defaults(func=job_list)
|
|
110
|
-
add_shared_arguments(job_list_optional_arguments)
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
def set_job_cancel_parser(job_cancel_parser: argparse.ArgumentParser):
|
|
114
|
-
job_cancel_required_arguments = job_cancel_parser.add_argument_group(
|
|
115
|
-
'Required Arguments',
|
|
116
|
-
'Arguments required for job cancel.',
|
|
117
|
-
)
|
|
118
|
-
job_cancel_optional_arguments = job_cancel_parser.add_argument_group(
|
|
119
|
-
'Optional Arguments', 'Arguments optional for job cancel.'
|
|
120
|
-
)
|
|
121
|
-
|
|
122
|
-
job_cancel_required_arguments.add_argument(
|
|
123
|
-
'name',
|
|
124
|
-
type=str,
|
|
125
|
-
default=None,
|
|
126
|
-
help='The name of the job to be cancelled.',
|
|
127
|
-
nargs='+',
|
|
128
|
-
)
|
|
129
|
-
|
|
130
|
-
job_cancel_required_arguments.add_argument(
|
|
131
|
-
'--cluster',
|
|
132
|
-
type=name_type,
|
|
133
|
-
default=None,
|
|
134
|
-
help='The name of the cluster to delete the job on.',
|
|
135
|
-
required=True,
|
|
136
|
-
)
|
|
137
|
-
|
|
138
|
-
job_cancel_optional_arguments.add_argument(
|
|
139
|
-
'--kind-cluster',
|
|
140
|
-
type=bool,
|
|
141
|
-
action=argparse.BooleanOptionalAction,
|
|
142
|
-
default=False,
|
|
143
|
-
help='Apply command to a local test cluster.',
|
|
144
|
-
)
|
|
145
|
-
|
|
146
|
-
job_cancel_parser.set_defaults(func=job_cancel)
|
|
147
|
-
add_shared_arguments(job_cancel_optional_arguments)
|
xpk/parser/kind.py
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Copyright 2024 Google LLC
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
from ..commands.kind import (
|
|
18
|
-
cluster_create,
|
|
19
|
-
cluster_delete,
|
|
20
|
-
cluster_list,
|
|
21
|
-
)
|
|
22
|
-
from .common import add_global_arguments
|
|
23
|
-
from .validators import name_type
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
def set_kind_parser(kind_parser):
|
|
27
|
-
cluster_subcommands = kind_parser.add_subparsers(
|
|
28
|
-
title='kind subcommands',
|
|
29
|
-
dest='xpk_kind_subcommands',
|
|
30
|
-
help=(
|
|
31
|
-
'These are commands related to kind management. Look at help for'
|
|
32
|
-
' specific subcommands for more details.'
|
|
33
|
-
),
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
### "cluster create" command parser ###
|
|
37
|
-
cluster_create_parser = cluster_subcommands.add_parser(
|
|
38
|
-
'create', help='Create local clusters.'
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
### Optional Arguments
|
|
42
|
-
cluster_create_parser.add_argument(
|
|
43
|
-
'--cluster',
|
|
44
|
-
type=name_type,
|
|
45
|
-
default='kind',
|
|
46
|
-
help=(
|
|
47
|
-
'The name of the cluster. Will be used as the prefix for internal'
|
|
48
|
-
' objects in the cluster.'
|
|
49
|
-
),
|
|
50
|
-
required=False,
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
cluster_create_parser.add_argument(
|
|
54
|
-
'--k8s-version',
|
|
55
|
-
type=str,
|
|
56
|
-
default='',
|
|
57
|
-
help='The Kubernetes version of the cluster.',
|
|
58
|
-
required=False,
|
|
59
|
-
)
|
|
60
|
-
|
|
61
|
-
add_global_arguments(cluster_create_parser)
|
|
62
|
-
cluster_create_parser.set_defaults(func=cluster_create)
|
|
63
|
-
|
|
64
|
-
### "cluster delete" command parser ###
|
|
65
|
-
cluster_delete_parser = cluster_subcommands.add_parser(
|
|
66
|
-
'delete',
|
|
67
|
-
help='Delete cloud clusters.',
|
|
68
|
-
)
|
|
69
|
-
|
|
70
|
-
cluster_delete_required_arguments = cluster_delete_parser.add_argument_group(
|
|
71
|
-
'Required Arguments',
|
|
72
|
-
'Arguments required for cluster delete.',
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
### Required arguments
|
|
76
|
-
cluster_delete_required_arguments.add_argument(
|
|
77
|
-
'--cluster',
|
|
78
|
-
type=name_type,
|
|
79
|
-
default=None,
|
|
80
|
-
help='The name of the cluster to be deleted.',
|
|
81
|
-
required=True,
|
|
82
|
-
)
|
|
83
|
-
|
|
84
|
-
### Optional Arguments
|
|
85
|
-
add_global_arguments(cluster_delete_parser)
|
|
86
|
-
cluster_delete_parser.set_defaults(func=cluster_delete)
|
|
87
|
-
|
|
88
|
-
# "cluster list" command parser.
|
|
89
|
-
cluster_list_parser = cluster_subcommands.add_parser(
|
|
90
|
-
'list', help='List cloud clusters.'
|
|
91
|
-
)
|
|
92
|
-
|
|
93
|
-
### Optional Arguments
|
|
94
|
-
add_global_arguments(cluster_list_parser)
|
|
95
|
-
cluster_list_parser.set_defaults(func=cluster_list)
|
xpk/parser/run.py
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Copyright 2025 Google LLC
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
from ..commands.run import run
|
|
18
|
-
from .common import (
|
|
19
|
-
add_shared_arguments,
|
|
20
|
-
add_slurm_arguments,
|
|
21
|
-
add_cluster_arguments,
|
|
22
|
-
add_kind_cluster_arguments,
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
def set_run_parser(run_parser):
|
|
27
|
-
run_required_arguments = run_parser.add_argument_group(
|
|
28
|
-
'Required Arguments', 'Arguments required for `run`.'
|
|
29
|
-
)
|
|
30
|
-
run_optional_arguments = run_parser.add_argument_group(
|
|
31
|
-
'Optional Arguments', 'Arguments optional for `run`.'
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
run_required_arguments.add_argument('script', help='script with task to run')
|
|
35
|
-
run_optional_arguments.add_argument(
|
|
36
|
-
'--timeout',
|
|
37
|
-
type=int,
|
|
38
|
-
default=None,
|
|
39
|
-
help='Amount of time to wait for job in seconds',
|
|
40
|
-
required=False,
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
add_cluster_arguments(run_optional_arguments)
|
|
44
|
-
add_kind_cluster_arguments(run_optional_arguments)
|
|
45
|
-
add_slurm_arguments(run_optional_arguments)
|
|
46
|
-
add_shared_arguments(run_parser)
|
|
47
|
-
run_parser.set_defaults(func=run)
|
xpk/parser/shell.py
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Copyright 2024 Google LLC
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
https://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
from ..commands.shell import shell, shell_stop
|
|
18
|
-
from .common import (
|
|
19
|
-
add_shared_arguments,
|
|
20
|
-
add_cluster_arguments,
|
|
21
|
-
add_kind_cluster_arguments,
|
|
22
|
-
)
|
|
23
|
-
import argparse
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
def set_shell_parser(shell_parser: argparse.ArgumentParser) -> None:
|
|
27
|
-
shell_optional_arguments = shell_parser.add_argument_group(
|
|
28
|
-
'Optional Arguments', 'Arguments optional for shell.'
|
|
29
|
-
)
|
|
30
|
-
add_shared_arguments(shell_optional_arguments)
|
|
31
|
-
shell_parser.set_defaults(func=shell)
|
|
32
|
-
|
|
33
|
-
add_cluster_arguments(shell_optional_arguments)
|
|
34
|
-
add_kind_cluster_arguments(shell_optional_arguments)
|
|
35
|
-
|
|
36
|
-
shell_subcommands = shell_parser.add_subparsers(
|
|
37
|
-
title='shell subcommands',
|
|
38
|
-
dest='xpk_shell_subcommands',
|
|
39
|
-
help=(
|
|
40
|
-
'These are commands related to interactive shell. Look at help for'
|
|
41
|
-
' specific subcommands for more details.'
|
|
42
|
-
),
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
set_shell_stop_parser(
|
|
46
|
-
shell_stop_parser=shell_subcommands.add_parser(
|
|
47
|
-
name='stop', help='Stop the running shell.'
|
|
48
|
-
)
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
def set_shell_stop_parser(shell_stop_parser: argparse.ArgumentParser):
|
|
53
|
-
shell_stop_optional_arguments = shell_stop_parser.add_argument_group(
|
|
54
|
-
'Optional Arguments', 'Arguments optional for shell stop.'
|
|
55
|
-
)
|
|
56
|
-
add_shared_arguments(shell_stop_optional_arguments)
|
|
57
|
-
shell_stop_parser.set_defaults(func=shell_stop)
|
|
58
|
-
add_cluster_arguments(shell_stop_parser)
|
|
59
|
-
add_kind_cluster_arguments(shell_stop_optional_arguments)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|