Skip to content

Commit

Permalink
Issue 725: Added a flag to skip eval on train and test for self-repor…
Browse files Browse the repository at this point in the history
…ting results
  • Loading branch information
harneet862 committed Sep 13, 2024
1 parent 78aa7b5 commit 0e646be
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions submission_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
--num_tuning_trials=3 \
--experiment_dir=/home/znado/experiment_dir \
--experiment_name=baseline
--skip_eval = True/False
"""

import datetime
Expand Down Expand Up @@ -88,6 +89,10 @@
flags.DEFINE_string('librispeech_tokenizer_vocab_path',
'',
'Location to librispeech tokenizer.')
flags.DEFINE_boolean(
'skip_eval',
True,
help='True to skip eval on the datasets and false otherwise')

flags.DEFINE_enum(
'framework',
Expand Down Expand Up @@ -327,7 +332,10 @@ def train_once(
train_state['last_step_end_time'] = global_start_time

logging.info('Starting training loop.')
goals_reached = (
if FLAGS.skip_eval == True:
goals_reached = (train_state['validation_goal_reached'])
else:
goals_reached = (
train_state['validation_goal_reached'] and
train_state['test_goal_reached'])
while train_state['is_time_remaining'] and \
Expand Down Expand Up @@ -402,9 +410,12 @@ def train_once(
train_state['test_goal_reached'] = (
workload.has_reached_test_target(latest_eval_result) or
train_state['test_goal_reached'])
goals_reached = (
train_state['validation_goal_reached'] and
train_state['test_goal_reached'])
if FLAGS.skip_eval == True:
goals_reached = (train_state['validation_goal_reached'])
else:
goals_reached = (
train_state['validation_goal_reached'] and
train_state['test_goal_reached'])
# Save last eval time.
eval_end_time = get_time()
train_state['last_eval_time'] = eval_end_time
Expand Down

0 comments on commit 0e646be

Please sign in to comment.