jazari 0.1.1__py3-none-any.whl → 0.1.2__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.
jazari/commands/init.py CHANGED
@@ -1,3 +1,4 @@
1
+ import os
1
2
  from rich.console import Console
2
3
  from rich.prompt import Prompt, Confirm
3
4
  from jazari.config_generator import load_config, make_config_dir, CONFIG_FILE
@@ -9,6 +10,10 @@ def init_command():
9
10
  Initialize Jazari config for this cluster.
10
11
  """
11
12
  current_config = load_config()
13
+ config_dir = os.path.expanduser('~/.jazari')
14
+ if not os.path.exists(config_dir):
15
+ os.makedirs(config_dir)
16
+ os.chmod(config_dir, 0o700)
12
17
 
13
18
  console.print('[bold blue]Welcome to Jazari setup.[/bold blue]')
14
19
  console.print(f"This will create a configuration file at [dim]{CONFIG_FILE}[/dim]\n")
jazari/commands/run.py CHANGED
@@ -54,7 +54,6 @@ def run_command(
54
54
  time_limit = time,
55
55
  job_name = name,
56
56
  account_name = account,
57
- wandb_api_key = wandb_key,
58
57
  hf_repo_id = push_to_hub,
59
58
  hf_dataset_id = pull_data,
60
59
  user_command = full_command_str
@@ -68,6 +67,10 @@ def run_command(
68
67
  else:
69
68
  console.print("[dim]Submitting to Slurm scheduler...[/dim]")
70
69
 
70
+ submit_env = os.environ.copy()
71
+ if wandb_key:
72
+ submit_env['WANDB_API_KEY'] = wandb_key
73
+
71
74
  with tempfile.NamedTemporaryFile(mode='w+', suffix=".sh", delete=False) as temp_file:
72
75
  temp_script_path = temp_file.name
73
76
  temp_file.write(sbatch_content)
@@ -77,7 +80,8 @@ def run_command(
77
80
  ["sbatch", temp_script_path],
78
81
  check = True,
79
82
  capture_output = True,
80
- text = True
83
+ text = True,
84
+ env = submit_env
81
85
  )
82
86
  job_id = result.stdout.strip().split()[-1]
83
87
  console.print(f"[bold green]✅ Job submitted successfully![/bold green] (ID: [bold]{job_id}[/bold])")
jazari/main.py CHANGED
@@ -1,10 +1,12 @@
1
- import typer
1
+ import typer, os
2
2
  from jazari.commands.status import status_command
3
3
  from jazari.commands.kill import kill_command
4
4
  from jazari.commands.logs import logs_command
5
5
  from jazari.commands.init import init_command
6
6
  from jazari.commands.run import run_command
7
7
 
8
+ os.umask(0o077)
9
+
8
10
  # Initializing the Typer app
9
11
  app = typer.Typer(
10
12
  name = "jazari",
@@ -13,7 +15,7 @@ app = typer.Typer(
13
15
  no_args_is_help = True
14
16
  )
15
17
 
16
- # Registering the commands
18
+ # Register the commands
17
19
  app.command(name="status")(status_command)
18
20
  app.command(name="kill")(kill_command)
19
21
  app.command(name="logs")(logs_command)
jazari/slurm_generator.py CHANGED
@@ -14,7 +14,6 @@ def generate_sbatch_script(
14
14
  time_limit: str,
15
15
  job_name: str,
16
16
  account_name: Optional[str],
17
- wandb_api_key: Optional[str],
18
17
  hf_repo_id: Optional[str],
19
18
  hf_dataset_id: Optional[str],
20
19
  user_command: str
@@ -34,7 +33,6 @@ def generate_sbatch_script(
34
33
  time_limit = time_limit,
35
34
  job_name = job_name,
36
35
  account_name = account_name,
37
- wandb_api_key = wandb_api_key,
38
36
  hf_repo_id = hf_repo_id,
39
37
  hf_dataset_id = hf_dataset_id,
40
38
  user_command_script = user_command
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jazari
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: The orchestration layer for modern Slurm clusters.
5
5
  Author-email: Levent Ozbek <levent@jazari.run>
6
6
  License: MIT
@@ -0,0 +1,16 @@
1
+ jazari/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ jazari/config_generator.py,sha256=ZLT48mCkSxoA5poURDhy4L7solmq5ZVXnBMkYDhpyDw,940
3
+ jazari/main.py,sha256=prINKNdGeqh8GZzBgBoeC1d1pk2JIzYJL0OiDNckHC4,745
4
+ jazari/slurm_generator.py,sha256=1powpTR6YbkUMb-eWacz2LweZRQIstB0G7Pv1N8lBtY,1401
5
+ jazari/utils.py,sha256=kMgO01TSGUnQqwnpGznvX99L_pEl86rX602tvpSnZZA,911
6
+ jazari/commands/init.py,sha256=0tpPE2Vzk76bKosTSsUOBq74LzgXVnT28ZaftWZPKXI,1488
7
+ jazari/commands/kill.py,sha256=UsK4lGYTh5SrnaK87avFXgTyXrjf3ExiUZT6jkvA76I,1191
8
+ jazari/commands/logs.py,sha256=RJEnmQ1CAzBj47w_TGtFYgB4WhgIKwlGP5kD3lPNnDI,1408
9
+ jazari/commands/run.py,sha256=VWrX8-p5B4T18ZgSonZlZ3Uown8Nt-B5CKLGwiIf98o,4749
10
+ jazari/commands/status.py,sha256=JODRwFkXkSHqqmZNZNDO93ZWHI2Kcrdrf7dbdOh3DnY,2252
11
+ jazari-0.1.2.dist-info/licenses/LICENSE,sha256=OvKjjZV2nvR_v2QrhWR4TMgvtDmZYfZLFSt3bk1q6QA,1068
12
+ jazari-0.1.2.dist-info/METADATA,sha256=bqAxIfy2pFP-OzA_kVRxS__3CCAa-4PmLNWeZgXvWx8,5826
13
+ jazari-0.1.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
14
+ jazari-0.1.2.dist-info/entry_points.txt,sha256=9vYDaHn1_jBw_cMNC9ZKl4vRk3n2aDQ5dHL0cM8tEfE,43
15
+ jazari-0.1.2.dist-info/top_level.txt,sha256=NY_Ke0lfKudUMc5w4rycAxzHKSgTUkhYqcmdFMYrya4,7
16
+ jazari-0.1.2.dist-info/RECORD,,
@@ -1,16 +0,0 @@
1
- jazari/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- jazari/config_generator.py,sha256=ZLT48mCkSxoA5poURDhy4L7solmq5ZVXnBMkYDhpyDw,940
3
- jazari/main.py,sha256=Qf8ORj5cX65fAEUgD2qbRnxqdnKdpLUAfVvcStaosRo,727
4
- jazari/slurm_generator.py,sha256=m5F76NqzMIwO4lL7MnyMWtuJTdj5Qv5qIN-P93CVKzM,1485
5
- jazari/utils.py,sha256=kMgO01TSGUnQqwnpGznvX99L_pEl86rX602tvpSnZZA,911
6
- jazari/commands/init.py,sha256=T8_kCUzH5BRnkDEqAzU49JjnBpvhimoDdU7ZYf5XCTo,1322
7
- jazari/commands/kill.py,sha256=UsK4lGYTh5SrnaK87avFXgTyXrjf3ExiUZT6jkvA76I,1191
8
- jazari/commands/logs.py,sha256=RJEnmQ1CAzBj47w_TGtFYgB4WhgIKwlGP5kD3lPNnDI,1408
9
- jazari/commands/run.py,sha256=gQqzjvCbanc11mBMce3MQ4doNsUO6KQOEptVLqKhWpI,4626
10
- jazari/commands/status.py,sha256=JODRwFkXkSHqqmZNZNDO93ZWHI2Kcrdrf7dbdOh3DnY,2252
11
- jazari-0.1.1.dist-info/licenses/LICENSE,sha256=OvKjjZV2nvR_v2QrhWR4TMgvtDmZYfZLFSt3bk1q6QA,1068
12
- jazari-0.1.1.dist-info/METADATA,sha256=twealsrdUYGqhl7_MI0zKjeiiiMPPBe0SerCa4AT8ZM,5826
13
- jazari-0.1.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
14
- jazari-0.1.1.dist-info/entry_points.txt,sha256=9vYDaHn1_jBw_cMNC9ZKl4vRk3n2aDQ5dHL0cM8tEfE,43
15
- jazari-0.1.1.dist-info/top_level.txt,sha256=NY_Ke0lfKudUMc5w4rycAxzHKSgTUkhYqcmdFMYrya4,7
16
- jazari-0.1.1.dist-info/RECORD,,
File without changes