diff --git a/scoring/run_workloads.py b/scoring/run_workloads.py index f99b81106..1c33079d3 100644 --- a/scoring/run_workloads.py +++ b/scoring/run_workloads.py @@ -128,7 +128,10 @@ def main(_): if FLAGS.hparam_end_index: hparam_end_index_flag = f'--hparam_end_index {FLAGS.hparam_end_index} ' study_start_index = FLAGS.study_start_index if FLAGS.study_start_index else 0 - study_end_index = FLAGS.study_end_index if FLAGS.study_end_index else num_studies - 1 + if FLAGS.study_end_index is not None: + study_end_index = FLAGS.study_end_index + else: + study_end_index = num_studies - 1 submission_id = FLAGS.submission_id rng_seed = FLAGS.seed @@ -232,4 +235,4 @@ def main(_): if __name__ == '__main__': flags.mark_flag_as_required('workload_metadata_path') - app.run(main) + app.run(main) \ No newline at end of file