Skip to content

Commit e0916b1

Browse files
committed
Merge branch 'stacc' of https://github.com/mila-iqia/milabench into stacc
2 parents 3edb769 + ee5114b commit e0916b1

File tree

4 files changed

+20
-17
lines changed

4 files changed

+20
-17
lines changed

.github/workflows/docker.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,9 @@ jobs:
6969
run: |
7070
REGEX="(.*)v(.*)\.(.*)\.(.*)"
7171
IMAGE_TAG="nightly"
72-
if [[ "${GITHUB_REF_NAME_ENV}" =~ $REGEX ]]; then
73-
IMAGE_TAG="${GITHUB_REF_NAME##*/}"
74-
fi
72+
IMAGE_TAG="${GITHUB_REF_NAME##*/}"
7573
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV
76-
74+
7775
- name: Log in to the registry
7876
uses: docker/login-action@v2
7977
with:

docker/Dockerfile-cuda

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ COPY . /milabench/milabench/
4141

4242
ENV DEBIAN_FRONTEND=noninteractive
4343
RUN apt-get update -y &&\
44-
apt-get install -y --no-install-recommends ssh rsync git build-essential curl python3 python3-virtualenv python-is-python3 python3-pip libgl1 libglib2.0-0 gcc g++ python3-dev &&\
44+
apt-get install -y --no-install-recommends zip ssh rsync git build-essential curl python3 python3-virtualenv python-is-python3 python3-pip libgl1 libglib2.0-0 gcc g++ python3-dev &&\
4545
curl -o /etc/apt/trusted.gpg.d/mellanox.asc https://content.mellanox.com/ofed/RPM-GPG-KEY-Mellanox &&\
4646
curl -o /etc/apt/sources.list.d/mellanox.list https://linux.mellanox.com/public/repo/mlnx_ofed/${MOFED_VERSION}/ubuntu22.04/mellanox_mlnx_ofed.list &&\
4747
apt-get update -y &&\

milabench/cli/run.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def _fetch_arch(mp):
7575
return None
7676

7777

78-
def run(mp, args, name):
78+
def run(mp, args, name, common_args):
7979
layers = validation_names(args.validations)
8080

8181
dash_class = {
@@ -116,9 +116,10 @@ def run(mp, args, name):
116116
summary = make_summary(reports)
117117
assert len(summary) != 0, "No summaries"
118118

119-
margs = multipack_args()
120-
margs.config = args.config
121-
config = _get_multipack(margs, return_config=True)
119+
# This makes the config smaller but we want the full config for the weights
120+
common_args.select = ""
121+
common_args.exclude = ""
122+
config = _get_multipack(args=common_args, return_config=True)
122123

123124
make_report(
124125
summary,
@@ -136,28 +137,32 @@ def run(mp, args, name):
136137

137138

138139
@tooled
139-
def cli_run(args=None):
140+
def cli_run(run_args=None):
140141
"""Run the benchmarks."""
141-
if args is None:
142-
args = arguments()
142+
143+
if run_args is None:
144+
run_args = arguments()
145+
146+
common_args = multipack_args()
143147

144148
# Load the configuration and system
145-
mp = get_multipack(run_name=args.run_name)
149+
mp = get_multipack(args=common_args, run_name=run_args.run_name)
150+
146151
arch = _fetch_arch(mp)
147152

148153
# Initialize the backend here so we can retrieve GPU stats
149154
init_arch(arch)
150155

151156
success = 0
152157
for name, conf in multirun():
153-
run_name = name or args.run_name
158+
run_name = name or run_args.run_name
154159

155160
# Note that this function overrides the system config
156-
mp = get_multipack(run_name=run_name)
161+
mp = get_multipack(args=common_args, run_name=run_name)
157162

158163
with apply_system(conf):
159164
try:
160-
success += run(mp, args, run_name)
165+
success += run(mp, run_args, run_name, common_args)
161166
except AssertionError as err:
162167
print(err)
163168

milabench/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def _get_multipack(
210210
if args.config is None:
211211
sys.exit("Error: CONFIG argument not provided and no $MILABENCH_CONFIG")
212212

213-
if args.select:
213+
if args.select and isinstance(args.select, str):
214214
args.select = set(args.select.split(","))
215215

216216
if args.exclude:

0 commit comments

Comments
 (0)