We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[Bug] Melody_rnn Create Dataset get_pipeline missing arg
`melody_rnn_create_dataset --config=basic_rnn --input=notesequences.tfrecord --output_dir=sequence_examples` fails with this error:
```
File "/Users/ericcacciavillani/anaconda3/envs/Magenta_Testing/lib/python3.6/site-packages/magenta/pipelines/note_sequence_pipelines.py", line 184, in transform
    for amount in self._transposition_range:
TypeError: 'float' object is not iterable
```
We're trying to train our own melody rnn and we get this error, also we don't see a mention of transposition range in the melody rnn readme?

Looks like in `melody_rnn_create_dataset.py` at line 52 its calling `melody_rnn_pipeline.get_pipeline(config, FLAGS.eval_ratio)`
but `get_pipeline` in `melody_rnn_pipeline.py` takes 3 args `config`, `transposition_range`, and `eval ratio` so it looks like transposition_range is being set as eval_ratio.

Working with @robindiddams on this.

--- 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/melody_rnn/melody_rnn_create_dataset.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 """Create a dataset of SequenceExamples from NoteSequence protos.
15 
16 This script will extract melodies from NoteSequence protos and save them to
17 TensorFlow's SequenceExample protos for input to the melody RNN models.
18 """
19 
20 import os
21 
22 import tensorflow as tf
23 
24 from magenta.models.melody_rnn import melody_rnn_config_flags
25 from magenta.models.melody_rnn import melody_rnn_pipeline
26 from magenta.pipelines import pipeline
27 
28 flags = tf.app.flags
29 FLAGS = tf.app.flags.FLAGS
30 flags.DEFINE_string(
31     'input', None,
32     'TFRecord to read NoteSequence protos from.')
33 flags.DEFINE_string(
34     'output_dir', None,
35     'Directory to write training and eval TFRecord files. The TFRecord files '
36     'are populated with  SequenceExample protos.')
37 flags.DEFINE_float(
38     'eval_ratio', 0.1,
39     'Fraction of input to set aside for eval set. Partition is randomly '
40     'selected.')
41 flags.DEFINE_string(
42     'log', 'INFO',
43     'The threshold for what messages will be logged DEBUG, INFO, WARN, ERROR, '
44     'or FATAL.')
45 
46 
47 def main(unused_argv):
48   tf.logging.set_verbosity(FLAGS.log)
49 
50   config = melody_rnn_config_flags.config_from_flags()
51   pipeline_instance = melody_rnn_pipeline.get_pipeline(
52       config, FLAGS.eval_ratio)
53 
54   FLAGS.input = os.path.expanduser(FLAGS.input)
55   FLAGS.output_dir = os.path.expanduser(FLAGS.output_dir)
56   pipeline.run_pipeline_serial(
57       pipeline_instance,
58       pipeline.tf_record_iterator(FLAGS.input, pipeline_instance.input_type),
59       FLAGS.output_dir)
60 
61 
62 def console_entry_point():
63   tf.app.run(main)
64 
65 
66 if __name__ == '__main__':
67   console_entry_point()
68
```
--- 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/melody_rnn/melody_rnn_create_dataset.py b/magenta/models/melody_rnn/melody_rnn_create_dataset.py
--- a/magenta/models/melody_rnn/melody_rnn_create_dataset.py
+++ b/magenta/models/melody_rnn/melody_rnn_create_dataset.py
@@ -49,7 +49,7 @@
 
   config = melody_rnn_config_flags.config_from_flags()
   pipeline_instance = melody_rnn_pipeline.get_pipeline(
-      config, FLAGS.eval_ratio)
+      config, eval_ratio=FLAGS.eval_ratio)
 
   FLAGS.input = os.path.expanduser(FLAGS.input)
   FLAGS.output_dir = os.path.expanduser(FLAGS.output_dir)

{"golden_diff": "diff --git a/magenta/models/melody_rnn/melody_rnn_create_dataset.py b/magenta/models/melody_rnn/melody_rnn_create_dataset.py\n--- a/magenta/models/melody_rnn/melody_rnn_create_dataset.py\n+++ b/magenta/models/melody_rnn/melody_rnn_create_dataset.py\n@@ -49,7 +49,7 @@\n \n   config = melody_rnn_config_flags.config_from_flags()\n   pipeline_instance = melody_rnn_pipeline.get_pipeline(\n-      config, FLAGS.eval_ratio)\n+      config, eval_ratio=FLAGS.eval_ratio)\n \n   FLAGS.input = os.path.expanduser(FLAGS.input)\n   FLAGS.output_dir = os.path.expanduser(FLAGS.output_dir)\n", "issue": "[Bug] Melody_rnn Create Dataset get_pipeline missing arg\n`melody_rnn_create_dataset --config=basic_rnn --input=notesequences.tfrecord --output_dir=sequence_examples` fails with this error:\r\n```\r\nFile \"/Users/ericcacciavillani/anaconda3/envs/Magenta_Testing/lib/python3.6/site-packages/magenta/pipelines/note_sequence_pipelines.py\", line 184, in transform\r\n    for amount in self._transposition_range:\r\nTypeError: 'float' object is not iterable\r\n```\r\nWe're trying to train our own melody rnn and we get this error, also we don't see a mention of transposition range in the melody rnn readme?\r\n\r\nLooks like in `melody_rnn_create_dataset.py` at line 52 its calling `melody_rnn_pipeline.get_pipeline(config, FLAGS.eval_ratio)`\r\nbut `get_pipeline` in `melody_rnn_pipeline.py` takes 3 args `config`, `transposition_range`, and `eval ratio` so it looks like transposition_range is being set as eval_ratio.\r\n\r\nWorking with @robindiddams on this.\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\"\"\"Create a dataset of SequenceExamples from NoteSequence protos.\n\nThis script will extract melodies from NoteSequence protos and save them to\nTensorFlow's SequenceExample protos for input to the melody RNN models.\n\"\"\"\n\nimport os\n\nimport tensorflow as tf\n\nfrom magenta.models.melody_rnn import melody_rnn_config_flags\nfrom magenta.models.melody_rnn import melody_rnn_pipeline\nfrom magenta.pipelines import pipeline\n\nflags = tf.app.flags\nFLAGS = tf.app.flags.FLAGS\nflags.DEFINE_string(\n    'input', None,\n    'TFRecord to read NoteSequence protos from.')\nflags.DEFINE_string(\n    'output_dir', None,\n    'Directory to write training and eval TFRecord files. The TFRecord files '\n    'are populated with  SequenceExample protos.')\nflags.DEFINE_float(\n    'eval_ratio', 0.1,\n    'Fraction of input to set aside for eval set. Partition is randomly '\n    'selected.')\nflags.DEFINE_string(\n    'log', 'INFO',\n    'The threshold for what messages will be logged DEBUG, INFO, WARN, ERROR, '\n    'or FATAL.')\n\n\ndef main(unused_argv):\n  tf.logging.set_verbosity(FLAGS.log)\n\n  config = melody_rnn_config_flags.config_from_flags()\n  pipeline_instance = melody_rnn_pipeline.get_pipeline(\n      config, FLAGS.eval_ratio)\n\n  FLAGS.input = os.path.expanduser(FLAGS.input)\n  FLAGS.output_dir = os.path.expanduser(FLAGS.output_dir)\n  pipeline.run_pipeline_serial(\n      pipeline_instance,\n      pipeline.tf_record_iterator(FLAGS.input, pipeline_instance.input_type),\n      FLAGS.output_dir)\n\n\ndef console_entry_point():\n  tf.app.run(main)\n\n\nif __name__ == '__main__':\n  console_entry_point()\n", "path": "magenta/models/melody_rnn/melody_rnn_create_dataset.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\"\"\"Create a dataset of SequenceExamples from NoteSequence protos.\n\nThis script will extract melodies from NoteSequence protos and save them to\nTensorFlow's SequenceExample protos for input to the melody RNN models.\n\"\"\"\n\nimport os\n\nimport tensorflow as tf\n\nfrom magenta.models.melody_rnn import melody_rnn_config_flags\nfrom magenta.models.melody_rnn import melody_rnn_pipeline\nfrom magenta.pipelines import pipeline\n\nflags = tf.app.flags\nFLAGS = tf.app.flags.FLAGS\nflags.DEFINE_string(\n    'input', None,\n    'TFRecord to read NoteSequence protos from.')\nflags.DEFINE_string(\n    'output_dir', None,\n    'Directory to write training and eval TFRecord files. The TFRecord files '\n    'are populated with  SequenceExample protos.')\nflags.DEFINE_float(\n    'eval_ratio', 0.1,\n    'Fraction of input to set aside for eval set. Partition is randomly '\n    'selected.')\nflags.DEFINE_string(\n    'log', 'INFO',\n    'The threshold for what messages will be logged DEBUG, INFO, WARN, ERROR, '\n    'or FATAL.')\n\n\ndef main(unused_argv):\n  tf.logging.set_verbosity(FLAGS.log)\n\n  config = melody_rnn_config_flags.config_from_flags()\n  pipeline_instance = melody_rnn_pipeline.get_pipeline(\n      config, eval_ratio=FLAGS.eval_ratio)\n\n  FLAGS.input = os.path.expanduser(FLAGS.input)\n  FLAGS.output_dir = os.path.expanduser(FLAGS.output_dir)\n  pipeline.run_pipeline_serial(\n      pipeline_instance,\n      pipeline.tf_record_iterator(FLAGS.input, pipeline_instance.input_type),\n      FLAGS.output_dir)\n\n\ndef console_entry_point():\n  tf.app.run(main)\n\n\nif __name__ == '__main__':\n  console_entry_point()\n", "path": "magenta/models/melody_rnn/melody_rnn_create_dataset.py"}]}