Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre.delaunay committed Oct 18, 2023
1 parent 23a7f50 commit f57ecee
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
2 changes: 1 addition & 1 deletion milabench/executors.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ def _argv(self, **_) -> List:

ngpu = len(get_gpu_info()["gpus"].values())
nproc = ngpu * num_machines
assert nproc > 0
assert nproc > 0, f"nproc: {nproc} num_machines: {num_machines} ngpu: {ngpu}"

deepspeed_argv = (
[
Expand Down
2 changes: 1 addition & 1 deletion milabench/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def launch_milabench(sbatch_args=None, dry: bool = False, sync: bool = False):
if sbatch_args is None:
sbatch_args = [
"--ntasks=1",
"--gpus-per-task=1",
"--gpus-per-task=rtx8000:1",
"--cpus-per-task=4",
"--time=01:00:00",
"--ntasks-per-node=1",
Expand Down
29 changes: 29 additions & 0 deletions milabench/scripts/milabench.bash
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ if [ ! -d "$ENV" ] && [ "$ENV" != "base" ] && [ ! -d "$CONDA_ENVS/$ENV" ]; then
fi
conda activate $ENV

export HF_HOME=$BASE/cache
export HF_DATASETS_CACHE=$BASE/cache
export TORCH_HOME=$BASE/cache
export XDG_CACHE_HOME=$BASE/cache

#
# Fetch the repo
#
Expand All @@ -80,11 +85,35 @@ python -m pip install ./milabench

SYSTEM="$SLURM_TMPDIR/system.yaml"

echo ""
echo "System"
echo "------"

milabench slurm_system
milabench slurm_system > $SYSTEM

module load cuda/11.8

echo ""
echo "Install"
echo "-------"
milabench install --config $CONFIG --system $SYSTEM --base $BASE $REMAINING_ARGS

echo ""
echo "Prepare"
echo "-------"
milabench prepare --config $CONFIG --system $SYSTEM --base $BASE $REMAINING_ARGS

echo ""
echo "Run"
echo "---"
milabench run --config $CONFIG --system $SYSTEM --base $BASE $REMAINING_ARGS

echo ""
echo "Report"
echo "------"
milabench summary $SLURM_TMPDIR/base/runs/

echo "----"
echo "Done"
echo ""

0 comments on commit f57ecee

Please sign in to comment.