From 2bad5149ef0d5d3939123d9737fd95ef1f11e9fb Mon Sep 17 00:00:00 2001 From: Stefan Pranger Date: Wed, 3 Jan 2024 20:22:20 +0100 Subject: [PATCH] testing thread pool --- syncscript.sh | 4 ++-- testall.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 syncscript.sh diff --git a/syncscript.sh b/syncscript.sh old mode 100644 new mode 100755 index 7875ec5..d8d7207 --- a/syncscript.sh +++ b/syncscript.sh @@ -9,7 +9,7 @@ datetime="$(date +%Y%-m-%dT%H:%M:%S)" #cpu=nehalem192g0 cpu=epyc512g0 -gpu=i9-64g0 +gpu=cuda #cpu=haswell378g0 env=$4 @@ -43,7 +43,7 @@ fi # python3 examples/shields/rl/11_minigridrl.py --expname "$exp_name" --steps "$1" --log_dir "$experiment_log_dir"/ --evaluations "$3" --env "$4" --shielding "$5" --shield_comparision "$6" --prism_config "$7" --prob_next "$8" --prob_direct "$9" --prob_forward "${10}" --shield_value "${11}" & set -x -srun -w $gpu python3 examples/shields/rl/15_train_eval_tune.py \ +srun -p $gpu python3 examples/shields/rl/15_train_eval_tune.py \ --expname "$exp_name" \ --log_dir "$experiment_log_dir" \ --grid_to_prism_binary_path $MINIGRID_BINARY \ diff --git a/testall.py b/testall.py index 78127d9..7493128 100644 --- a/testall.py +++ b/testall.py @@ -73,4 +73,4 @@ input("") with ThreadPoolExecutor(max_workers=NUM_WORKER) as e: for task in tasks: print(f"submitted {task}") - e.submit(run_command, f"echo {task[0]}", task[1]) + e.submit(run_command, task[0], task[1])