Skip to content

Commit dc6f189

Browse files
Merge pull request #764 from mlcommons/run_all_fix
fix in study index for script
2 parents ccd9fbb + eab83a8 commit dc6f189

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

scoring/run_workloads.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ def main(_):
128128
if FLAGS.hparam_end_index:
129129
hparam_end_index_flag = f'--hparam_end_index {FLAGS.hparam_end_index} '
130130
study_start_index = FLAGS.study_start_index if FLAGS.study_start_index else 0
131-
study_end_index = FLAGS.study_end_index if FLAGS.study_end_index else num_studies - 1
131+
if FLAGS.study_end_index is not None:
132+
study_end_index = FLAGS.study_end_index
133+
else:
134+
study_end_index = num_studies - 1
132135
submission_id = FLAGS.submission_id
133136
rng_seed = FLAGS.seed
134137

@@ -232,4 +235,4 @@ def main(_):
232235

233236
if __name__ == '__main__':
234237
flags.mark_flag_as_required('workload_metadata_path')
235-
app.run(main)
238+
app.run(main)

0 commit comments

Comments
 (0)