fix(hpc): typos, .env and pythonpath
This commit is contained in:
parent
cd7169a75f
commit
3c6eec2410
2 changed files with 14 additions and 2 deletions
|
|
@ -19,7 +19,7 @@ if [ -n "$PBS_O_WORKDIR" ]; then
|
||||||
cd "$PBS_O_WORKDIR"
|
cd "$PBS_O_WORKDIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir "${PBS_O_WORKDIR}/runs"
|
mkdir -p "${PBS_O_WORKDIR}/runs"
|
||||||
|
|
||||||
# Mirror configs to $VSC_DATA to avoid home quota limits (3GB)
|
# Mirror configs to $VSC_DATA to avoid home quota limits (3GB)
|
||||||
# vsc-venv manages environments relative to the requirements file
|
# vsc-venv manages environments relative to the requirements file
|
||||||
|
|
|
||||||
|
|
@ -53,8 +53,20 @@ echo ">>> Starting BrittleStar training..."
|
||||||
export MUJOCO_GL=egl
|
export MUJOCO_GL=egl
|
||||||
export WANDB_DIR="$SCRATCH_RUNDIR"
|
export WANDB_DIR="$SCRATCH_RUNDIR"
|
||||||
|
|
||||||
python src/train.py \
|
export PYTHONPATH="$PBS_O_WORKDIR/src:${PYTHONPATH:-}"
|
||||||
|
|
||||||
|
if [ -f "$VSC_DATA/$PROJ_NAME/.env" ]; then
|
||||||
|
echo ">>> Sourcing API keys from .env..."
|
||||||
|
export $(grep -v '^#' "$VSC_DATA/$PROJ_NAME/.env" | xargs)
|
||||||
|
elif [ -f "$PBS_O_WORKDIR/.env" ]; then
|
||||||
|
echo ">>> Sourcing API keys from .env..."
|
||||||
|
export $(grep -v '^#' "$PBS_O_WORKDIR/.env" | xargs)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# TODO Once experiments get serious, change the config
|
||||||
|
python scripts/train.py \
|
||||||
--env-config-path configs/hpc/smoke_test.yaml \
|
--env-config-path configs/hpc/smoke_test.yaml \
|
||||||
|
--hyperparameter-config-path configs/hpc/smoke_test.yaml \
|
||||||
--run-dir "$SCRATCH_RUNDIR"
|
--run-dir "$SCRATCH_RUNDIR"
|
||||||
|
|
||||||
echo ">>> Staging out results to $DATA_RUNDIR..."
|
echo ">>> Staging out results to $DATA_RUNDIR..."
|
||||||
|
|
|
||||||
Reference in a new issue