konduktor-nightly 0.1.0.dev20250621104714__py3-none-any.whl → 0.1.0.dev20250623105113__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.
- konduktor/__init__.py +2 -2
- konduktor/cli.py +52 -5
- {konduktor_nightly-0.1.0.dev20250621104714.dist-info → konduktor_nightly-0.1.0.dev20250623105113.dist-info}/METADATA +1 -1
- {konduktor_nightly-0.1.0.dev20250621104714.dist-info → konduktor_nightly-0.1.0.dev20250623105113.dist-info}/RECORD +7 -7
- {konduktor_nightly-0.1.0.dev20250621104714.dist-info → konduktor_nightly-0.1.0.dev20250623105113.dist-info}/LICENSE +0 -0
- {konduktor_nightly-0.1.0.dev20250621104714.dist-info → konduktor_nightly-0.1.0.dev20250623105113.dist-info}/WHEEL +0 -0
- {konduktor_nightly-0.1.0.dev20250621104714.dist-info → konduktor_nightly-0.1.0.dev20250623105113.dist-info}/entry_points.txt +0 -0
konduktor/__init__.py
CHANGED
@@ -14,7 +14,7 @@ __all__ = [
|
|
14
14
|
]
|
15
15
|
|
16
16
|
# Replaced with the current commit when building the wheels.
|
17
|
-
_KONDUKTOR_COMMIT_SHA = '
|
17
|
+
_KONDUKTOR_COMMIT_SHA = 'd7cf0201d5498c86113628b414d2112670a356d6'
|
18
18
|
os.makedirs(os.path.expanduser('~/.konduktor'), exist_ok=True)
|
19
19
|
|
20
20
|
|
@@ -48,5 +48,5 @@ def _get_git_commit():
|
|
48
48
|
|
49
49
|
|
50
50
|
__commit__ = _get_git_commit()
|
51
|
-
__version__ = '1.0.0.dev0.1.0.
|
51
|
+
__version__ = '1.0.0.dev0.1.0.dev20250623105113'
|
52
52
|
__root_dir__ = os.path.dirname(os.path.abspath(__file__))
|
konduktor/cli.py
CHANGED
@@ -34,6 +34,7 @@ listed in "konduktor --help". Take care to put logically connected commands clo
|
|
34
34
|
each other.
|
35
35
|
"""
|
36
36
|
|
37
|
+
import fnmatch
|
37
38
|
import os
|
38
39
|
import pathlib
|
39
40
|
import shlex
|
@@ -735,6 +736,9 @@ def down(
|
|
735
736
|
stops), and any data on the containers disks will be lost. Accelerators
|
736
737
|
(e.g., GPUs) that are part of the job will be deleted too.
|
737
738
|
|
739
|
+
Wildcard patterns are supported using * characters.
|
740
|
+
Examples: "test-*" matches all jobs starting with "test-",
|
741
|
+
"*-gpu" matches all jobs ending with "-gpu".
|
738
742
|
|
739
743
|
Examples:
|
740
744
|
|
@@ -743,21 +747,64 @@ def down(
|
|
743
747
|
# Tear down a specific job.
|
744
748
|
konduktor down cluster_name
|
745
749
|
\b
|
746
|
-
# Tear down multiple
|
747
|
-
konduktor down
|
750
|
+
# Tear down multiple jobs.
|
751
|
+
konduktor down job1 job2
|
748
752
|
\b
|
749
|
-
# Tear down all
|
753
|
+
# Tear down all jobs matching a pattern.
|
754
|
+
konduktor down "test-*"
|
755
|
+
\b
|
756
|
+
# Tear down all existing jobs.
|
750
757
|
konduktor down -a
|
751
758
|
|
752
759
|
"""
|
753
760
|
|
754
761
|
context = kubernetes_utils.get_current_kube_config_context_name()
|
755
762
|
namespace = kubernetes_utils.get_kube_config_context_namespace(context)
|
763
|
+
|
756
764
|
if all:
|
757
765
|
jobs_specs = jobset_utils.list_jobset(namespace)
|
758
|
-
assert jobs_specs is not None, f'No
|
759
|
-
assert len(jobs_specs) > 0, f'No
|
766
|
+
assert jobs_specs is not None, f'No jobs found in namespace {namespace}'
|
767
|
+
assert len(jobs_specs) > 0, f'No jobs found in namespace {namespace}'
|
760
768
|
jobs = [job['metadata']['name'] for job in jobs_specs['items']]
|
769
|
+
elif jobs:
|
770
|
+
# Get all available jobs to match against patterns
|
771
|
+
jobs_specs = jobset_utils.list_jobset(namespace)
|
772
|
+
if jobs_specs is None or len(jobs_specs.get('items', [])) == 0:
|
773
|
+
raise click.ClickException(f'No jobs found in namespace {namespace}')
|
774
|
+
|
775
|
+
all_job_names = [job['metadata']['name'] for job in jobs_specs['items']]
|
776
|
+
matched_jobs = []
|
777
|
+
|
778
|
+
for job_pattern in jobs:
|
779
|
+
# Use fnmatch for both wildcard and exact pattern matching
|
780
|
+
pattern_matches = fnmatch.filter(all_job_names, job_pattern)
|
781
|
+
if not pattern_matches:
|
782
|
+
click.echo(
|
783
|
+
f'Warning: No jobs found matching pattern "{job_pattern}"',
|
784
|
+
fg='yellow',
|
785
|
+
err=True,
|
786
|
+
)
|
787
|
+
matched_jobs.extend(pattern_matches)
|
788
|
+
|
789
|
+
# Remove duplicates while preserving order
|
790
|
+
seen = set()
|
791
|
+
jobs = []
|
792
|
+
for job in matched_jobs:
|
793
|
+
if job not in seen:
|
794
|
+
seen.add(job)
|
795
|
+
jobs.append(job)
|
796
|
+
|
797
|
+
if not jobs:
|
798
|
+
raise click.ClickException(
|
799
|
+
f'No matching jobs found check status with '
|
800
|
+
f'{colorama.Style.BRIGHT}konduktor status{colorama.Style.RESET_ALL}'
|
801
|
+
)
|
802
|
+
else:
|
803
|
+
raise click.ClickException(
|
804
|
+
'No jobs specified. Use --all to tear down '
|
805
|
+
'all jobs or specify job names/patterns.'
|
806
|
+
)
|
807
|
+
|
761
808
|
if not yes:
|
762
809
|
# Prompt if (1) --cluster is None, or (2) cluster doesn't exist, or (3)
|
763
810
|
# it exists but is STOPPED.
|
@@ -1,4 +1,4 @@
|
|
1
|
-
konduktor/__init__.py,sha256=
|
1
|
+
konduktor/__init__.py,sha256=PHCpQXy4kf7PS0Hrl2ofcVkSL6fHhE4vWV6zWnkwi3A,1540
|
2
2
|
konduktor/adaptors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
konduktor/adaptors/aws.py,sha256=s47Ra-GaqCQibzVfmD0pmwEWHif1EGO5opMbwkLxTCU,8244
|
4
4
|
konduktor/adaptors/common.py,sha256=ZIqzjx77PIHUwpjfAQ1uX8B2aX78YMuGj4Bppd-MdyM,4183
|
@@ -9,7 +9,7 @@ konduktor/backends/backend.py,sha256=qh0bp94lzoTYZkzyQv2-CVrB5l91FkG2vclXg24UFC0
|
|
9
9
|
konduktor/backends/jobset.py,sha256=UdhwAuZODLMbLY51Y2zOBsh6wg4Pb84oHVvUKzx3Z2w,8434
|
10
10
|
konduktor/backends/jobset_utils.py,sha256=mOjK3oFgmNacpg956r0qtR7cdZ0PPzXYVVuIr3QqKuI,22170
|
11
11
|
konduktor/check.py,sha256=JennyWoaqSKhdyfUldd266KwVXTPJpcYQa4EED4a_BA,7569
|
12
|
-
konduktor/cli.py,sha256=
|
12
|
+
konduktor/cli.py,sha256=qtktD8N17IRC5MYEdaE0o3pv8EI36cvyyQkYUFi5_nQ,35590
|
13
13
|
konduktor/config.py,sha256=J50JxC6MsXMnlrJPXdDUMr38C89xvOO7mR8KJ6fyils,15520
|
14
14
|
konduktor/constants.py,sha256=T3AeXXxuQHINW_bAWyztvDeS8r4g8kXBGIwIq13cys0,1814
|
15
15
|
konduktor/controller/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -91,8 +91,8 @@ konduktor/utils/schemas.py,sha256=VGPERAso2G4sVAznsJ80qT2Q-I_EFxXw6Rfcw-vkYgQ,16
|
|
91
91
|
konduktor/utils/subprocess_utils.py,sha256=WoFkoFhGecPR8-rF8WJxbIe-YtV94LXz9UG64SDhCY4,9448
|
92
92
|
konduktor/utils/ux_utils.py,sha256=czCwiS1bDqgeKtzAJctczpLwFZzAse7WuozdvzEFYJ4,7437
|
93
93
|
konduktor/utils/validator.py,sha256=K-eEmwq4qgYcOhMv6SqgIPcrpWqDusH0f8EBkzv827Q,2429
|
94
|
-
konduktor_nightly-0.1.0.
|
95
|
-
konduktor_nightly-0.1.0.
|
96
|
-
konduktor_nightly-0.1.0.
|
97
|
-
konduktor_nightly-0.1.0.
|
98
|
-
konduktor_nightly-0.1.0.
|
94
|
+
konduktor_nightly-0.1.0.dev20250623105113.dist-info/LICENSE,sha256=MuuqTZbHvmqXR_aNKAXzggdV45ANd3wQ5YI7tnpZhm0,6586
|
95
|
+
konduktor_nightly-0.1.0.dev20250623105113.dist-info/METADATA,sha256=NnIKhdyHu3zwwBVBwnW7PM46sJHJbbYrPrpS5QuNPMY,4289
|
96
|
+
konduktor_nightly-0.1.0.dev20250623105113.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
97
|
+
konduktor_nightly-0.1.0.dev20250623105113.dist-info/entry_points.txt,sha256=k3nG5wDFIJhNqsZWrHk4d0irIB2Ns9s47cjRWYsTCT8,48
|
98
|
+
konduktor_nightly-0.1.0.dev20250623105113.dist-info/RECORD,,
|
File without changes
|
File without changes
|