Skip to content

Commit

Permalink
Clean up unused flag.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 328339833
  • Loading branch information
pichuan authored and copybara-github committed Aug 25, 2020
1 parent 4a2299b commit 664b9a0
Showing 1 changed file with 1 addition and 34 deletions.
35 changes: 1 addition & 34 deletions deepvariant/model_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,32 +99,6 @@
flags.DEFINE_integer('number_of_steps', 8000000,
'Maximum number of global steps to take when training.')

flags.DEFINE_boolean('use_early_stopping', False, 'Use early stopping hook.')

flags.DEFINE_string(
'early_stopping_directory', 'eval_on_tune',
'Directory containing event files for early stopping hook to monitor.')

flags.DEFINE_string(
'early_stopping_tag', 'F1/All',
'The metric to monitor for early stopping (eg. loss, accuracy, etc.)')

flags.DEFINE_float(
'early_stopping_plateau_delta', 1e-7,
'The amount of change of a metric over num_plateau_steps that indicates '
'the metric has stopped improving.')

flags.DEFINE_integer('early_stopping_num_plateau_steps', 1000000,
'Number of steps the metric needs to be plateaued for.')

flags.DEFINE_enum(
'early_stopping_metric_direction', 'increase', ['increase', 'decrease'],
'Whether to check if the metric has increased by delta or decreased by '
'delta.')

flags.DEFINE_integer('early_stopping_every_n_steps', 10,
'Run early stopping hook every n steps.')

flags.DEFINE_integer(
'num_retries', 0,
'The number of times to retry on InternalError or UnavailableError.')
Expand Down Expand Up @@ -222,15 +196,8 @@ def run(target, unused_is_chief, device_fn, use_tpu):
start_from_checkpoint=FLAGS.start_from_checkpoint,
)

training_hooks = None
if FLAGS.use_early_stopping:
# redacted
raise ValueError('Currently not implemented.')

estimator.train(
input_fn=tf_dataset,
max_steps=FLAGS.number_of_steps,
hooks=training_hooks)
input_fn=tf_dataset, max_steps=FLAGS.number_of_steps, hooks=None)


def parse_and_run():
Expand Down

0 comments on commit 664b9a0

Please sign in to comment.