Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre.delaunay committed Jun 25, 2024
1 parent 94b27a7 commit 4d930d2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion benchmarks/accelerate_opt/benchfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AccelerateBenchmark(Package):

def make_env(self):
env = super().make_env()
value = resolve_placeholder(pack, "--cpus_per_gpu")
value = resolve_placeholder(self, "--cpus_per_gpu")
env["OMP_NUM_THREADS"] = str(value)
return env

Expand Down
4 changes: 2 additions & 2 deletions benchmate/benchmate/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def monitor_fn():
}
for gpu in get_gpu_info()["gpus"].values()
}
mblog({"task": "main", "gpudata": data})
mblog({"task": "train", "gpudata": data})

monitor_fn()
monitor = Monitor(3, monitor_fn)
Expand Down Expand Up @@ -74,7 +74,7 @@ def monitor_fn():
}
for gpu in get_gpu_info()["gpus"].values()
}
return {"task": "main", "gpudata": data, "time": time.time(), "units": "s"}
return {"task": "train", "gpudata": data, "time": time.time(), "units": "s"}

monitor = CustomMonitor(0.5, monitor_fn)

Expand Down
6 changes: 3 additions & 3 deletions milabench/_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""This file is generated, do not modify"""

__tag__ = "v0.1.0-20-g7246295a"
__commit__ = "7246295a356186b55fa4b2b75480e3700c279b15"
__date__ = "2024-06-20 09:18:17 -0400"
__tag__ = "v0.1.0-30-g94b27a71"
__commit__ = "94b27a71145d3ba754a2713aeca60e5a28be4bc5"
__date__ = "2024-06-25 13:49:52 -0400"
2 changes: 1 addition & 1 deletion milabench/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def __call__(self, entry):
elif event == "config":

def _show(k, entry):
if k.startswith("config.system") or k:
if k.startswith("config.system"):
return

if isinstance(entry, dict):
Expand Down
17 changes: 11 additions & 6 deletions milabench/scripts/milabench_run.bash
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ BASE="$LOC/base"
ENV="./env"
REMAINING_ARGS=""
FUN="run"
OUTPUT="$HOME/$SLURM_JOB_ID"

while getopts ":hm:p:e:b:o:c:f:" opt; do
case $opt in
Expand Down Expand Up @@ -117,6 +118,9 @@ function setup() {
export PYTHONUNBUFFERED=1
export MILABENCH_BASE=$BASE
export MILABENCH_CONFIG=$CONFIG
export MILABENCH_VENV=$ENV
export BENCHMARK_VENV="$BASE/venv/torch"

#
# Fetch the repo
#
Expand Down Expand Up @@ -161,7 +165,7 @@ function run() {
cat $SYSTEM

module load gcc/9.3.0
module load cuda/11.8
module load cuda/12.3.2

echo ""
echo "Install"
Expand All @@ -178,11 +182,12 @@ function run() {
echo "---"
milabench run --config $CONFIG --system $SYSTEM --base $BASE $REMAINING_ARGS

echo ""
echo "Report"
echo "------"
mv $BASE/runs $OUTPUT

milabench write_report_to_pr --remote $ORIGIN --branch $BRANCH --config $CONFIG
# echo ""
# echo "Report"
# echo "------"
# milabench write_report_to_pr --remote $ORIGIN --branch $BRANCH --config $CONFIG

echo "----"
echo "Done after $SECONDS"
Expand All @@ -196,4 +201,4 @@ case "$FUN" in
pin)
pin
;;
esac
esac

0 comments on commit 4d930d2

Please sign in to comment.