We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
DRUMS_RNN: when trying to run --eval on drums_rnn I get "ValueError: invalid every_n_iter=0."
Some very strange behavior here.

I am comparing lstm behavior here to that of [LSTMetallica](https://github.com/keunwoochoi/LSTMetallica). So using the same midi library of metallica drums, I went through the normal drums_rnn pipeline:

1. I created a tfrecord (notesequence) of the entire metallica midi library
2. I turned that notesequence into a training and validation split of 10 percent
3. I started a training on the training sequence on the training data
4. I started a validation (--eval) on the eval data and IMMEDIATELY get a valueerror:
```
Traceback (most recent call last):
  File ".\drums_rnn_train.py", line 113, in <module>
    console_entry_point()
  File ".\drums_rnn_train.py", line 109, in console_entry_point
    tf.app.run(main)
  File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\platform\app.py", line 124, in run
    _sys.exit(main(argv))
  File ".\drums_rnn_train.py", line 99, in main
    events_rnn_train.run_eval(build_graph_fn, train_dir, eval_dir, num_batches)
  File "C:\Program Files\Python35\lib\site-packages\magenta\models\shared\events_rnn_train.py", line 114, in run_eval
    EvalLoggingTensorHook(logging_dict, every_n_iter=num_batches),
  File "C:\Program Files\Python35\lib\site-packages\tensorflow\python\training\basic_session_run_hooks.py", line 209, in __init__
    raise ValueError("invalid every_n_iter=%s." % every_n_iter)
ValueError: invalid every_n_iter=0.

```

I've played around with the training and the evaluation percentages, and if I do 40%!!! VALIDATION data then it doesn't give that error any more, but that is way too much data for validation. (the tfrecord size for training data is 103 megs and the the eval data is 75 megs). 

The rest of the data sets i've tried this on has similar properties, which led me to believe that perhaps these other data sets were too small. But a weird quirk is that if I used a much smaller data set (training set size of about 20megs, and eval data of 10megs), it would still give the same error on using the validation data to run the eval, but it doesn't fail if i used the training data for evaluation. So somehow a 20 meg file of training data for a smaller data set works validation but it fails for this metallica data set if I don't give it at least 70 megs of evaluation data. Is there just a weird problem with "drums_rnn_create_dataset"

Any ideas?

Thanks in advance

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `magenta/models/shared/events_rnn_train.py`
Content:
```
1 # Copyright 2016 Google Inc. All Rights Reserved.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #    http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 """Train and evaluate an event sequence RNN model."""
15 
16 import tensorflow as tf
17 
18 
19 def run_training(build_graph_fn, train_dir, num_training_steps=None,
20                  summary_frequency=10, save_checkpoint_secs=60,
21                  checkpoints_to_keep=10, keep_checkpoint_every_n_hours=1,
22                  master='', task=0, num_ps_tasks=0):
23   """Runs the training loop.
24 
25   Args:
26     build_graph_fn: A function that builds the graph ops.
27     train_dir: The path to the directory where checkpoints and summary events
28         will be written to.
29     num_training_steps: The number of steps to train for before exiting.
30     summary_frequency: The number of steps between each summary. A summary is
31         when graph values from the last step are logged to the console and
32         written to disk.
33     save_checkpoint_secs: The frequency at which to save checkpoints, in
34         seconds.
35     checkpoints_to_keep: The number of most recent checkpoints to keep in
36        `train_dir`. Keeps all if set to 0.
37     keep_checkpoint_every_n_hours: Keep a checkpoint every N hours, even if it
38         results in more checkpoints than checkpoints_to_keep.
39     master: URL of the Tensorflow master.
40     task: Task number for this worker.
41     num_ps_tasks: Number of parameter server tasks.
42   """
43   with tf.Graph().as_default():
44     with tf.device(tf.train.replica_device_setter(num_ps_tasks)):
45       build_graph_fn()
46 
47       global_step = tf.train.get_or_create_global_step()
48       loss = tf.get_collection('loss')[0]
49       perplexity = tf.get_collection('metrics/perplexity')[0]
50       accuracy = tf.get_collection('metrics/accuracy')[0]
51       train_op = tf.get_collection('train_op')[0]
52 
53       logging_dict = {
54           'Global Step': global_step,
55           'Loss': loss,
56           'Perplexity': perplexity,
57           'Accuracy': accuracy
58       }
59       hooks = [
60           tf.train.NanTensorHook(loss),
61           tf.train.LoggingTensorHook(
62               logging_dict, every_n_iter=summary_frequency),
63           tf.train.StepCounterHook(
64               output_dir=train_dir, every_n_steps=summary_frequency)
65       ]
66       if num_training_steps:
67         hooks.append(tf.train.StopAtStepHook(num_training_steps))
68 
69       scaffold = tf.train.Scaffold(
70           saver=tf.train.Saver(
71               max_to_keep=checkpoints_to_keep,
72               keep_checkpoint_every_n_hours=keep_checkpoint_every_n_hours))
73 
74       tf.logging.info('Starting training loop...')
75       tf.contrib.training.train(
76           train_op=train_op,
77           logdir=train_dir,
78           scaffold=scaffold,
79           hooks=hooks,
80           save_checkpoint_secs=save_checkpoint_secs,
81           save_summaries_steps=summary_frequency,
82           master=master,
83           is_chief=task == 0)
84       tf.logging.info('Training complete.')
85 
86 
87 # TODO(adarob): Limit to a single epoch each evaluation step.
88 def run_eval(build_graph_fn, train_dir, eval_dir, num_batches,
89              timeout_secs=300):
90   """Runs the training loop.
91 
92   Args:
93     build_graph_fn: A function that builds the graph ops.
94     train_dir: The path to the directory where checkpoints will be loaded
95         from for evaluation.
96     eval_dir: The path to the directory where the evaluation summary events
97         will be written to.
98     num_batches: The number of full batches to use for each evaluation step.
99     timeout_secs: The number of seconds after which to stop waiting for a new
100         checkpoint.
101   """
102   with tf.Graph().as_default():
103     build_graph_fn()
104 
105     global_step = tf.train.get_or_create_global_step()
106     loss = tf.get_collection('loss')[0]
107     perplexity = tf.get_collection('metrics/perplexity')[0]
108     accuracy = tf.get_collection('metrics/accuracy')[0]
109     eval_ops = tf.get_collection('eval_ops')
110 
111     logging_dict = {
112         'Global Step': global_step,
113         'Loss': loss,
114         'Perplexity': perplexity,
115         'Accuracy': accuracy
116     }
117     hooks = [
118         EvalLoggingTensorHook(logging_dict, every_n_iter=num_batches),
119         tf.contrib.training.StopAfterNEvalsHook(num_batches),
120         tf.contrib.training.SummaryAtEndHook(eval_dir),
121     ]
122 
123     tf.contrib.training.evaluate_repeatedly(
124         train_dir,
125         eval_ops=eval_ops,
126         hooks=hooks,
127         eval_interval_secs=60,
128         timeout=timeout_secs)
129 
130 
131 class EvalLoggingTensorHook(tf.train.LoggingTensorHook):
132   """A revised version of LoggingTensorHook to use during evaluation.
133 
134   This version supports being reset and increments `_iter_count` before run
135   instead of after run.
136   """
137 
138   def begin(self):
139     # Reset timer.
140     self._timer.update_last_triggered_step(0)
141     super(EvalLoggingTensorHook, self).begin()
142 
143   def before_run(self, run_context):
144     self._iter_count += 1
145     return super(EvalLoggingTensorHook, self).before_run(run_context)
146 
147   def after_run(self, run_context, run_values):
148     super(EvalLoggingTensorHook, self).after_run(run_context, run_values)
149     self._iter_count -= 1
150
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/magenta/models/shared/events_rnn_train.py b/magenta/models/shared/events_rnn_train.py
--- a/magenta/models/shared/events_rnn_train.py
+++ b/magenta/models/shared/events_rnn_train.py
@@ -98,7 +98,13 @@
     num_batches: The number of full batches to use for each evaluation step.
     timeout_secs: The number of seconds after which to stop waiting for a new
         checkpoint.
+  Raises:
+    ValueError: If `num_batches` is less than or equal to 0.
   """
+  if num_batches <= 0:
+    raise ValueError(
+        '`num_batches` must be greater than 0. Check that the batch size is '
+        'no larger than the number of records in the eval set.')
   with tf.Graph().as_default():
     build_graph_fn()

{"golden_diff": "diff --git a/magenta/models/shared/events_rnn_train.py b/magenta/models/shared/events_rnn_train.py\n--- a/magenta/models/shared/events_rnn_train.py\n+++ b/magenta/models/shared/events_rnn_train.py\n@@ -98,7 +98,13 @@\n     num_batches: The number of full batches to use for each evaluation step.\n     timeout_secs: The number of seconds after which to stop waiting for a new\n         checkpoint.\n+  Raises:\n+    ValueError: If `num_batches` is less than or equal to 0.\n   \"\"\"\n+  if num_batches <= 0:\n+    raise ValueError(\n+        '`num_batches` must be greater than 0. Check that the batch size is '\n+        'no larger than the number of records in the eval set.')\n   with tf.Graph().as_default():\n     build_graph_fn()\n", "issue": "DRUMS_RNN: when trying to run --eval on drums_rnn I get \"ValueError: invalid every_n_iter=0.\"\nSome very strange behavior here.\r\n\r\nI am comparing lstm behavior here to that of [LSTMetallica](https://github.com/keunwoochoi/LSTMetallica). So using the same midi library of metallica drums, I went through the normal drums_rnn pipeline:\r\n\r\n1. I created a tfrecord (notesequence) of the entire metallica midi library\r\n2. I turned that notesequence into a training and validation split of 10 percent\r\n3. I started a training on the training sequence on the training data\r\n4. I started a validation (--eval) on the eval data and IMMEDIATELY get a valueerror:\r\n```\r\nTraceback (most recent call last):\r\n  File \".\\drums_rnn_train.py\", line 113, in <module>\r\n    console_entry_point()\r\n  File \".\\drums_rnn_train.py\", line 109, in console_entry_point\r\n    tf.app.run(main)\r\n  File \"C:\\Program Files\\Python35\\lib\\site-packages\\tensorflow\\python\\platform\\app.py\", line 124, in run\r\n    _sys.exit(main(argv))\r\n  File \".\\drums_rnn_train.py\", line 99, in main\r\n    events_rnn_train.run_eval(build_graph_fn, train_dir, eval_dir, num_batches)\r\n  File \"C:\\Program Files\\Python35\\lib\\site-packages\\magenta\\models\\shared\\events_rnn_train.py\", line 114, in run_eval\r\n    EvalLoggingTensorHook(logging_dict, every_n_iter=num_batches),\r\n  File \"C:\\Program Files\\Python35\\lib\\site-packages\\tensorflow\\python\\training\\basic_session_run_hooks.py\", line 209, in __init__\r\n    raise ValueError(\"invalid every_n_iter=%s.\" % every_n_iter)\r\nValueError: invalid every_n_iter=0.\r\n\r\n```\r\n\r\nI've played around with the training and the evaluation percentages, and if I do 40%!!! VALIDATION data then it doesn't give that error any more, but that is way too much data for validation. (the tfrecord size for training data is 103 megs and the the eval data is 75 megs). \r\n\r\nThe rest of the data sets i've tried this on has similar properties, which led me to believe that perhaps these other data sets were too small. But a weird quirk is that if I used a much smaller data set (training set size of about 20megs, and eval data of 10megs), it would still give the same error on using the validation data to run the eval, but it doesn't fail if i used the training data for evaluation. So somehow a 20 meg file of training data for a smaller data set works validation but it fails for this metallica data set if I don't give it at least 70 megs of evaluation data. Is there just a weird problem with \"drums_rnn_create_dataset\"\r\n\r\nAny ideas?\r\n\r\nThanks in advance\n", "before_files": [{"content": "# Copyright 2016 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\"Train and evaluate an event sequence RNN model.\"\"\"\n\nimport tensorflow as tf\n\n\ndef run_training(build_graph_fn, train_dir, num_training_steps=None,\n                 summary_frequency=10, save_checkpoint_secs=60,\n                 checkpoints_to_keep=10, keep_checkpoint_every_n_hours=1,\n                 master='', task=0, num_ps_tasks=0):\n  \"\"\"Runs the training loop.\n\n  Args:\n    build_graph_fn: A function that builds the graph ops.\n    train_dir: The path to the directory where checkpoints and summary events\n        will be written to.\n    num_training_steps: The number of steps to train for before exiting.\n    summary_frequency: The number of steps between each summary. A summary is\n        when graph values from the last step are logged to the console and\n        written to disk.\n    save_checkpoint_secs: The frequency at which to save checkpoints, in\n        seconds.\n    checkpoints_to_keep: The number of most recent checkpoints to keep in\n       `train_dir`. Keeps all if set to 0.\n    keep_checkpoint_every_n_hours: Keep a checkpoint every N hours, even if it\n        results in more checkpoints than checkpoints_to_keep.\n    master: URL of the Tensorflow master.\n    task: Task number for this worker.\n    num_ps_tasks: Number of parameter server tasks.\n  \"\"\"\n  with tf.Graph().as_default():\n    with tf.device(tf.train.replica_device_setter(num_ps_tasks)):\n      build_graph_fn()\n\n      global_step = tf.train.get_or_create_global_step()\n      loss = tf.get_collection('loss')[0]\n      perplexity = tf.get_collection('metrics/perplexity')[0]\n      accuracy = tf.get_collection('metrics/accuracy')[0]\n      train_op = tf.get_collection('train_op')[0]\n\n      logging_dict = {\n          'Global Step': global_step,\n          'Loss': loss,\n          'Perplexity': perplexity,\n          'Accuracy': accuracy\n      }\n      hooks = [\n          tf.train.NanTensorHook(loss),\n          tf.train.LoggingTensorHook(\n              logging_dict, every_n_iter=summary_frequency),\n          tf.train.StepCounterHook(\n              output_dir=train_dir, every_n_steps=summary_frequency)\n      ]\n      if num_training_steps:\n        hooks.append(tf.train.StopAtStepHook(num_training_steps))\n\n      scaffold = tf.train.Scaffold(\n          saver=tf.train.Saver(\n              max_to_keep=checkpoints_to_keep,\n              keep_checkpoint_every_n_hours=keep_checkpoint_every_n_hours))\n\n      tf.logging.info('Starting training loop...')\n      tf.contrib.training.train(\n          train_op=train_op,\n          logdir=train_dir,\n          scaffold=scaffold,\n          hooks=hooks,\n          save_checkpoint_secs=save_checkpoint_secs,\n          save_summaries_steps=summary_frequency,\n          master=master,\n          is_chief=task == 0)\n      tf.logging.info('Training complete.')\n\n\n# TODO(adarob): Limit to a single epoch each evaluation step.\ndef run_eval(build_graph_fn, train_dir, eval_dir, num_batches,\n             timeout_secs=300):\n  \"\"\"Runs the training loop.\n\n  Args:\n    build_graph_fn: A function that builds the graph ops.\n    train_dir: The path to the directory where checkpoints will be loaded\n        from for evaluation.\n    eval_dir: The path to the directory where the evaluation summary events\n        will be written to.\n    num_batches: The number of full batches to use for each evaluation step.\n    timeout_secs: The number of seconds after which to stop waiting for a new\n        checkpoint.\n  \"\"\"\n  with tf.Graph().as_default():\n    build_graph_fn()\n\n    global_step = tf.train.get_or_create_global_step()\n    loss = tf.get_collection('loss')[0]\n    perplexity = tf.get_collection('metrics/perplexity')[0]\n    accuracy = tf.get_collection('metrics/accuracy')[0]\n    eval_ops = tf.get_collection('eval_ops')\n\n    logging_dict = {\n        'Global Step': global_step,\n        'Loss': loss,\n        'Perplexity': perplexity,\n        'Accuracy': accuracy\n    }\n    hooks = [\n        EvalLoggingTensorHook(logging_dict, every_n_iter=num_batches),\n        tf.contrib.training.StopAfterNEvalsHook(num_batches),\n        tf.contrib.training.SummaryAtEndHook(eval_dir),\n    ]\n\n    tf.contrib.training.evaluate_repeatedly(\n        train_dir,\n        eval_ops=eval_ops,\n        hooks=hooks,\n        eval_interval_secs=60,\n        timeout=timeout_secs)\n\n\nclass EvalLoggingTensorHook(tf.train.LoggingTensorHook):\n  \"\"\"A revised version of LoggingTensorHook to use during evaluation.\n\n  This version supports being reset and increments `_iter_count` before run\n  instead of after run.\n  \"\"\"\n\n  def begin(self):\n    # Reset timer.\n    self._timer.update_last_triggered_step(0)\n    super(EvalLoggingTensorHook, self).begin()\n\n  def before_run(self, run_context):\n    self._iter_count += 1\n    return super(EvalLoggingTensorHook, self).before_run(run_context)\n\n  def after_run(self, run_context, run_values):\n    super(EvalLoggingTensorHook, self).after_run(run_context, run_values)\n    self._iter_count -= 1\n", "path": "magenta/models/shared/events_rnn_train.py"}], "after_files": [{"content": "# Copyright 2016 Google Inc. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\"Train and evaluate an event sequence RNN model.\"\"\"\n\nimport tensorflow as tf\n\n\ndef run_training(build_graph_fn, train_dir, num_training_steps=None,\n                 summary_frequency=10, save_checkpoint_secs=60,\n                 checkpoints_to_keep=10, keep_checkpoint_every_n_hours=1,\n                 master='', task=0, num_ps_tasks=0):\n  \"\"\"Runs the training loop.\n\n  Args:\n    build_graph_fn: A function that builds the graph ops.\n    train_dir: The path to the directory where checkpoints and summary events\n        will be written to.\n    num_training_steps: The number of steps to train for before exiting.\n    summary_frequency: The number of steps between each summary. A summary is\n        when graph values from the last step are logged to the console and\n        written to disk.\n    save_checkpoint_secs: The frequency at which to save checkpoints, in\n        seconds.\n    checkpoints_to_keep: The number of most recent checkpoints to keep in\n       `train_dir`. Keeps all if set to 0.\n    keep_checkpoint_every_n_hours: Keep a checkpoint every N hours, even if it\n        results in more checkpoints than checkpoints_to_keep.\n    master: URL of the Tensorflow master.\n    task: Task number for this worker.\n    num_ps_tasks: Number of parameter server tasks.\n  \"\"\"\n  with tf.Graph().as_default():\n    with tf.device(tf.train.replica_device_setter(num_ps_tasks)):\n      build_graph_fn()\n\n      global_step = tf.train.get_or_create_global_step()\n      loss = tf.get_collection('loss')[0]\n      perplexity = tf.get_collection('metrics/perplexity')[0]\n      accuracy = tf.get_collection('metrics/accuracy')[0]\n      train_op = tf.get_collection('train_op')[0]\n\n      logging_dict = {\n          'Global Step': global_step,\n          'Loss': loss,\n          'Perplexity': perplexity,\n          'Accuracy': accuracy\n      }\n      hooks = [\n          tf.train.NanTensorHook(loss),\n          tf.train.LoggingTensorHook(\n              logging_dict, every_n_iter=summary_frequency),\n          tf.train.StepCounterHook(\n              output_dir=train_dir, every_n_steps=summary_frequency)\n      ]\n      if num_training_steps:\n        hooks.append(tf.train.StopAtStepHook(num_training_steps))\n\n      scaffold = tf.train.Scaffold(\n          saver=tf.train.Saver(\n              max_to_keep=checkpoints_to_keep,\n              keep_checkpoint_every_n_hours=keep_checkpoint_every_n_hours))\n\n      tf.logging.info('Starting training loop...')\n      tf.contrib.training.train(\n          train_op=train_op,\n          logdir=train_dir,\n          scaffold=scaffold,\n          hooks=hooks,\n          save_checkpoint_secs=save_checkpoint_secs,\n          save_summaries_steps=summary_frequency,\n          master=master,\n          is_chief=task == 0)\n      tf.logging.info('Training complete.')\n\n\n# TODO(adarob): Limit to a single epoch each evaluation step.\ndef run_eval(build_graph_fn, train_dir, eval_dir, num_batches,\n             timeout_secs=300):\n  \"\"\"Runs the training loop.\n\n  Args:\n    build_graph_fn: A function that builds the graph ops.\n    train_dir: The path to the directory where checkpoints will be loaded\n        from for evaluation.\n    eval_dir: The path to the directory where the evaluation summary events\n        will be written to.\n    num_batches: The number of full batches to use for each evaluation step.\n    timeout_secs: The number of seconds after which to stop waiting for a new\n        checkpoint.\n  Raises:\n    ValueError: If `num_batches` is less than or equal to 0.\n  \"\"\"\n  if num_batches <= 0:\n    raise ValueError(\n        '`num_batches` must be greater than 0. Check that the batch size is '\n        'no larger than the number of records in the eval set.')\n  with tf.Graph().as_default():\n    build_graph_fn()\n\n    global_step = tf.train.get_or_create_global_step()\n    loss = tf.get_collection('loss')[0]\n    perplexity = tf.get_collection('metrics/perplexity')[0]\n    accuracy = tf.get_collection('metrics/accuracy')[0]\n    eval_ops = tf.get_collection('eval_ops')\n\n    logging_dict = {\n        'Global Step': global_step,\n        'Loss': loss,\n        'Perplexity': perplexity,\n        'Accuracy': accuracy\n    }\n    hooks = [\n        EvalLoggingTensorHook(logging_dict, every_n_iter=num_batches),\n        tf.contrib.training.StopAfterNEvalsHook(num_batches),\n        tf.contrib.training.SummaryAtEndHook(eval_dir),\n    ]\n\n    tf.contrib.training.evaluate_repeatedly(\n        train_dir,\n        eval_ops=eval_ops,\n        hooks=hooks,\n        eval_interval_secs=60,\n        timeout=timeout_secs)\n\n\nclass EvalLoggingTensorHook(tf.train.LoggingTensorHook):\n  \"\"\"A revised version of LoggingTensorHook to use during evaluation.\n\n  This version supports being reset and increments `_iter_count` before run\n  instead of after run.\n  \"\"\"\n\n  def begin(self):\n    # Reset timer.\n    self._timer.update_last_triggered_step(0)\n    super(EvalLoggingTensorHook, self).begin()\n\n  def before_run(self, run_context):\n    self._iter_count += 1\n    return super(EvalLoggingTensorHook, self).before_run(run_context)\n\n  def after_run(self, run_context, run_values):\n    super(EvalLoggingTensorHook, self).after_run(run_context, run_values)\n    self._iter_count -= 1\n", "path": "magenta/models/shared/events_rnn_train.py"}]}