Vittal-M commited on
Commit
aeae33b
·
verified ·
1 Parent(s): a98156e

Update scripts/hf_runner.py

Browse files
Files changed (1) hide show
  1. scripts/hf_runner.py +5 -2
scripts/hf_runner.py CHANGED
@@ -1,5 +1,7 @@
1
  import os
2
  import subprocess
 
 
3
  from huggingface_hub import HfApi, login
4
 
5
  # 1. Configuration
@@ -24,9 +26,10 @@ def main():
24
  print(f"Failed to create/check repo: {e}")
25
 
26
  # 2. Run the heavy pipeline
27
- print("\n--- STARTING DAHS PIPELINE (3000 Scenarios) ---")
 
28
  # Using subprocess to run the pipeline exactly as you would locally
29
- result = subprocess.run(["python", "scripts/run_pipeline.py", "--scenarios", "3000"])
30
 
31
  if result.returncode != 0:
32
  print("\nPipeline failed! Aborting upload.")
 
1
  import os
2
  import subprocess
3
+ import multiprocessing
4
+ from huggingface_hub import HfApi, login
5
  from huggingface_hub import HfApi, login
6
 
7
  # 1. Configuration
 
26
  print(f"Failed to create/check repo: {e}")
27
 
28
  # 2. Run the heavy pipeline
29
+ cores = str(multiprocessing.cpu_count())
30
+ print(f"\n--- STARTING DAHS PIPELINE (6000 Scenarios on {cores} Workers) ---")
31
  # Using subprocess to run the pipeline exactly as you would locally
32
+ result = subprocess.run(["python", "scripts/run_pipeline.py", "--scenarios", "6000", "--workers", cores])
33
 
34
  if result.returncode != 0:
35
  print("\nPipeline failed! Aborting upload.")