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 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 = 'd5127c6ba7ce0fa3274507299eec961d9ef236da'
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.dev20250621104714'
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 clusters.
747
- konduktor down jobs
750
+ # Tear down multiple jobs.
751
+ konduktor down job1 job2
748
752
  \b
749
- # Tear down all existing clusters.
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 ' f'jobs found in namespace {namespace}'
759
- assert len(jobs_specs) > 0, f'No ' f'jobs found in namespace {namespace}'
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,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: konduktor-nightly
3
- Version: 0.1.0.dev20250621104714
3
+ Version: 0.1.0.dev20250623105113
4
4
  Summary: GPU Cluster Health Management
5
5
  Author: Andrew Aikawa
6
6
  Author-email: asai@berkeley.edu
@@ -1,4 +1,4 @@
1
- konduktor/__init__.py,sha256=8AnoPyIy-5cINkDgQxtAEHd2296sBNU4asJNm1agcV0,1540
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=i5vXN_p21Tj7etX_QIkq1HCJ3I2Pn_OpKdddBMqRR-g,33877
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.dev20250621104714.dist-info/LICENSE,sha256=MuuqTZbHvmqXR_aNKAXzggdV45ANd3wQ5YI7tnpZhm0,6586
95
- konduktor_nightly-0.1.0.dev20250621104714.dist-info/METADATA,sha256=G4O3V8WWo1GrnEDkH8pto4U6-x8YqfhF41aiw80JGYM,4289
96
- konduktor_nightly-0.1.0.dev20250621104714.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
97
- konduktor_nightly-0.1.0.dev20250621104714.dist-info/entry_points.txt,sha256=k3nG5wDFIJhNqsZWrHk4d0irIB2Ns9s47cjRWYsTCT8,48
98
- konduktor_nightly-0.1.0.dev20250621104714.dist-info/RECORD,,
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,,