-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
#!/bin/bash | ||
#SBATCH --array=1-10 | ||
#SBATCH --array=1-100 | ||
# Avoid cluttering the root directory with log files: | ||
#SBATCH --output=slurm/%A_%a.out | ||
#SBATCH --output=%A/%a/cout.txt | ||
#SBATCH --cpus-per-task=8 | ||
#SBATCH --gpus=0 | ||
#SBATCH --mem=8gb | ||
#SBATCH --time=70:00:00 | ||
#SBATCH --qos=scavenger | ||
#SBATCH --export=ALL | ||
|
||
# This script assumes that you set up imitation in your NAS home directory and | ||
# installed it in a venv located in the imitation directory. | ||
|
||
# Call this script with the <algo> <env_named_config> parameters to be passed to the | ||
# tune.py script. | ||
|
||
cd "/nas/ucb/$(whoami)/" || exit | ||
source imitation/venv/bin/activate | ||
source "/nas/ucb/$(whoami)/imitation/venv/bin/activate" | ||
|
||
# Note: we run each worker in a separate working directory to avoid race | ||
# conditions when writing sacred outputs to the same folder. | ||
mkdir workdir_"$1"_"$2"_"$SLURM_ARRAY_TASK_ID" | ||
cd workdir_"$1"_"$2"_"$SLURM_ARRAY_TASK_ID" || exit | ||
mkdir -p "$SLURM_ARRAY_JOB_ID"/"$SLURM_ARRAY_TASK_ID" | ||
cd "$SLURM_ARRAY_JOB_ID"/"$SLURM_ARRAY_TASK_ID" || exit | ||
|
||
srun python ../imitation/tuning/tune.py -j ../"$1"_"$2".log "$1" "$2" | ||
srun python ../../tune.py --num_trials 400 -j ../"$1"_"$2".log "$1" "$2" |