We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Error with `.decode` on `str` object when generating  `summarize_cnn_dailymail32k` data
## CMD
```
t2t-trainer \
  --generate_data \
  --data_dir="$data" \
  --problems=summarize_cnn_dailymail32k \
  --model=transformer \
  --hparams_set=transformer_base_single_gpu \
  --output_dir="$root"
```

## OUTPUT
```
INFO:tensorflow:Generating data for summarize_cnn_dailymail32k
INFO:tensorflow:Generating vocab file: t2t_data/vocab.cnndailymail.32768
INFO:tensorflow:Downloading https://drive.google.com/uc?export=download&id=0BwmD_VLjROrfTHk4NFg2SndKcjQ&confirm=ak1U to /tmp/t2t_datagen/cnn_stories.tgz

INFO:tensorflow:Succesfully downloaded cnn_stories.tgz, 158577824 bytes.
INFO:tensorflow:Downloading https://drive.google.com/uc?export=download&id=0BwmD_VLjROrfM1BxdkxVaTY2bWs&confirm=1N53 to /tmp/t2t_datagen/dailymail_stories.tgz

INFO:tensorflow:Succesfully downloaded dailymail_stories.tgz, 375893739 bytes.
Traceback (most recent call last):
  File "/home/pltrdy/anaconda3/bin/t2t-trainer", line 96, in <module>
    tf.app.run()
  File "/home/pltrdy/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "/home/pltrdy/anaconda3/bin/t2t-trainer", line 83, in main
    problem.generate_data(data_dir, tmp_dir)
  File "/home/pltrdy/anaconda3/lib/python3.6/site-packages/tensor2tensor/data_generators/problem.py", line 625, in generate_data
    self.generator(data_dir, tmp_dir, True), all_paths)
  File "/home/pltrdy/anaconda3/lib/python3.6/site-packages/tensor2tensor/data_generators/generator_utils.py", line 143, in generate_files
    for case in generator:
  File "/home/pltrdy/anaconda3/lib/python3.6/site-packages/tensor2tensor/data_generators/cnn_dailymail.py", line 132, in generator
    story_generator(tmp_dir))
  File "/home/pltrdy/anaconda3/lib/python3.6/site-packages/tensor2tensor/data_generators/generator_utils.py", line 328, in get_or_generate_vocab_inner
    for item in generator:
  File "/home/pltrdy/anaconda3/lib/python3.6/site-packages/tensor2tensor/data_generators/cnn_dailymail.py", line 78, in story_generator
    line = unicode(line, "utf-8") if six.PY2 else line.decode("utf-8")
AttributeError: 'str' object has no attribute 'decode'
```

## CONFIG
* Python version: `Python 3.6.1 |Anaconda custom (64-bit)| (default, May 11 2017, 13:09:58)`
* Tensor2Tensor version:
```
$ pip show tensor2tensor
Name: tensor2tensor
Version: 1.2.4
Summary: Tensor2Tensor
Home-page: http://github.com/tensorflow/tensor2tensor
Author: Google Inc.
Author-email: no-reply@google.com
License: Apache 2.0
Location: /home/pltrdy/anaconda3/lib/python3.6/site-packages
Requires: sympy, numpy, requests, six, future, bz2file
```

## QUICKFIX
```
--- a/tensor2tensor/data_generators/cnn_dailymail.py
+++ b/tensor2tensor/data_generators/cnn_dailymail.py
@@ -74,7 +74,7 @@ def story_generator(tmp_dir):
   for path in paths:
     for story_file in tf.gfile.Glob(path + "*"):
       story = u""
-      for line in tf.gfile.Open(story_file):
+      for line in tf.gfile.Open(story_file, 'rb'):

```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `tensor2tensor/data_generators/cnn_dailymail.py`
Content:
```
1 # coding=utf-8
2 # Copyright 2017 The Tensor2Tensor Authors.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 
16 """Data generators for the CNN and Daily Mail datasets."""
17 
18 from __future__ import absolute_import
19 from __future__ import division
20 from __future__ import print_function
21 
22 import os
23 import tarfile
24 
25 # Dependency imports
26 
27 import six
28 from tensor2tensor.data_generators import generator_utils
29 from tensor2tensor.data_generators import problem
30 from tensor2tensor.data_generators import text_encoder
31 from tensor2tensor.utils import registry
32 
33 import tensorflow as tf
34 
35 
36 # Links to data from http://cs.nyu.edu/~kcho/DMQA/
37 _CNN_STORIES_DRIVE_URL = "https://drive.google.com/uc?export=download&id=0BwmD_VLjROrfTHk4NFg2SndKcjQ"
38 
39 _DAILYMAIL_STORIES_DRIVE_URL = "https://drive.google.com/uc?export=download&id=0BwmD_VLjROrfM1BxdkxVaTY2bWs"
40 
41 
42 # End-of-sentence marker.
43 EOS = text_encoder.EOS_ID
44 
45 
46 def _maybe_download_corpora(tmp_dir):
47   """Download corpora if necessary and unzip them.
48 
49   Args:
50     tmp_dir: directory containing dataset.
51 
52   Returns:
53     filepath of the downloaded corpus file.
54   """
55   cnn_filename = "cnn_stories.tgz"
56   cnn_finalpath = os.path.join(tmp_dir, "cnn/stories/")
57   dailymail_filename = "dailymail_stories.tgz"
58   dailymail_finalpath = os.path.join(tmp_dir, "dailymail/stories/")
59   if not tf.gfile.Exists(cnn_finalpath):
60     cnn_file = generator_utils.maybe_download_from_drive(
61         tmp_dir, cnn_filename, _CNN_STORIES_DRIVE_URL)
62     with tarfile.open(cnn_file, "r:gz") as cnn_tar:
63       cnn_tar.extractall(tmp_dir)
64   if not tf.gfile.Exists(dailymail_finalpath):
65     dailymail_file = generator_utils.maybe_download_from_drive(
66         tmp_dir, dailymail_filename, _DAILYMAIL_STORIES_DRIVE_URL)
67     with tarfile.open(dailymail_file, "r:gz") as dailymail_tar:
68       dailymail_tar.extractall(tmp_dir)
69   return [cnn_finalpath, dailymail_finalpath]
70 
71 
72 def story_generator(tmp_dir):
73   paths = _maybe_download_corpora(tmp_dir)
74   for path in paths:
75     for story_file in tf.gfile.Glob(path + "*"):
76       story = u""
77       for line in tf.gfile.Open(story_file):
78         line = unicode(line, "utf-8") if six.PY2 else line.decode("utf-8")
79         story += line
80       yield story
81 
82 
83 def _story_summary_split(story):
84   end_pos = story.find("\n\n")  # Upto first empty line.
85   assert end_pos != -1
86   return story[:end_pos], story[end_pos:].strip()
87 
88 
89 @registry.register_problem
90 class SummarizeCnnDailymail32k(problem.Text2TextProblem):
91   """Summarize CNN and Daily Mail articles to their first paragraph."""
92 
93   @property
94   def is_character_level(self):
95     return False
96 
97   @property
98   def has_inputs(self):
99     return True
100 
101   @property
102   def input_space_id(self):
103     return problem.SpaceID.EN_TOK
104 
105   @property
106   def target_space_id(self):
107     return problem.SpaceID.EN_TOK
108 
109   @property
110   def num_shards(self):
111     return 100
112 
113   @property
114   def vocab_name(self):
115     return "vocab.cnndailymail"
116 
117   @property
118   def use_subword_tokenizer(self):
119     return True
120 
121   @property
122   def targeted_vocab_size(self):
123     return 2**15  # 32768
124 
125   @property
126   def use_train_shards_for_dev(self):
127     return True
128 
129   def generator(self, data_dir, tmp_dir, _):
130     encoder = generator_utils.get_or_generate_vocab_inner(
131         data_dir, self.vocab_file, self.targeted_vocab_size,
132         story_generator(tmp_dir))
133     for story in story_generator(tmp_dir):
134       summary, rest = _story_summary_split(story)
135       encoded_summary = encoder.encode(summary) + [EOS]
136       encoded_story = encoder.encode(rest) + [EOS]
137       yield {"inputs": encoded_story, "targets": encoded_summary}
138
```
--- 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/tensor2tensor/data_generators/cnn_dailymail.py b/tensor2tensor/data_generators/cnn_dailymail.py
--- a/tensor2tensor/data_generators/cnn_dailymail.py
+++ b/tensor2tensor/data_generators/cnn_dailymail.py
@@ -74,7 +74,7 @@
   for path in paths:
     for story_file in tf.gfile.Glob(path + "*"):
       story = u""
-      for line in tf.gfile.Open(story_file):
+      for line in tf.gfile.Open(story_file, 'rb'):
         line = unicode(line, "utf-8") if six.PY2 else line.decode("utf-8")
         story += line
       yield story

{"golden_diff": "diff --git a/tensor2tensor/data_generators/cnn_dailymail.py b/tensor2tensor/data_generators/cnn_dailymail.py\n--- a/tensor2tensor/data_generators/cnn_dailymail.py\n+++ b/tensor2tensor/data_generators/cnn_dailymail.py\n@@ -74,7 +74,7 @@\n   for path in paths:\n     for story_file in tf.gfile.Glob(path + \"*\"):\n       story = u\"\"\n-      for line in tf.gfile.Open(story_file):\n+      for line in tf.gfile.Open(story_file, 'rb'):\n         line = unicode(line, \"utf-8\") if six.PY2 else line.decode(\"utf-8\")\n         story += line\n       yield story\n", "issue": "Error with `.decode` on `str` object when generating  `summarize_cnn_dailymail32k` data\n## CMD\r\n```\r\nt2t-trainer \\\r\n  --generate_data \\\r\n  --data_dir=\"$data\" \\\r\n  --problems=summarize_cnn_dailymail32k \\\r\n  --model=transformer \\\r\n  --hparams_set=transformer_base_single_gpu \\\r\n  --output_dir=\"$root\"\r\n```\r\n\r\n## OUTPUT\r\n```\r\nINFO:tensorflow:Generating data for summarize_cnn_dailymail32k\r\nINFO:tensorflow:Generating vocab file: t2t_data/vocab.cnndailymail.32768\r\nINFO:tensorflow:Downloading https://drive.google.com/uc?export=download&id=0BwmD_VLjROrfTHk4NFg2SndKcjQ&confirm=ak1U to /tmp/t2t_datagen/cnn_stories.tgz\r\n\r\nINFO:tensorflow:Succesfully downloaded cnn_stories.tgz, 158577824 bytes.\r\nINFO:tensorflow:Downloading https://drive.google.com/uc?export=download&id=0BwmD_VLjROrfM1BxdkxVaTY2bWs&confirm=1N53 to /tmp/t2t_datagen/dailymail_stories.tgz\r\n\r\nINFO:tensorflow:Succesfully downloaded dailymail_stories.tgz, 375893739 bytes.\r\nTraceback (most recent call last):\r\n  File \"/home/pltrdy/anaconda3/bin/t2t-trainer\", line 96, in <module>\r\n    tf.app.run()\r\n  File \"/home/pltrdy/anaconda3/lib/python3.6/site-packages/tensorflow/python/platform/app.py\", line 48, in run\r\n    _sys.exit(main(_sys.argv[:1] + flags_passthrough))\r\n  File \"/home/pltrdy/anaconda3/bin/t2t-trainer\", line 83, in main\r\n    problem.generate_data(data_dir, tmp_dir)\r\n  File \"/home/pltrdy/anaconda3/lib/python3.6/site-packages/tensor2tensor/data_generators/problem.py\", line 625, in generate_data\r\n    self.generator(data_dir, tmp_dir, True), all_paths)\r\n  File \"/home/pltrdy/anaconda3/lib/python3.6/site-packages/tensor2tensor/data_generators/generator_utils.py\", line 143, in generate_files\r\n    for case in generator:\r\n  File \"/home/pltrdy/anaconda3/lib/python3.6/site-packages/tensor2tensor/data_generators/cnn_dailymail.py\", line 132, in generator\r\n    story_generator(tmp_dir))\r\n  File \"/home/pltrdy/anaconda3/lib/python3.6/site-packages/tensor2tensor/data_generators/generator_utils.py\", line 328, in get_or_generate_vocab_inner\r\n    for item in generator:\r\n  File \"/home/pltrdy/anaconda3/lib/python3.6/site-packages/tensor2tensor/data_generators/cnn_dailymail.py\", line 78, in story_generator\r\n    line = unicode(line, \"utf-8\") if six.PY2 else line.decode(\"utf-8\")\r\nAttributeError: 'str' object has no attribute 'decode'\r\n```\r\n\r\n## CONFIG\r\n* Python version: `Python 3.6.1 |Anaconda custom (64-bit)| (default, May 11 2017, 13:09:58)`\r\n* Tensor2Tensor version:\r\n```\r\n$ pip show tensor2tensor\r\nName: tensor2tensor\r\nVersion: 1.2.4\r\nSummary: Tensor2Tensor\r\nHome-page: http://github.com/tensorflow/tensor2tensor\r\nAuthor: Google Inc.\r\nAuthor-email: no-reply@google.com\r\nLicense: Apache 2.0\r\nLocation: /home/pltrdy/anaconda3/lib/python3.6/site-packages\r\nRequires: sympy, numpy, requests, six, future, bz2file\r\n```\r\n\r\n## QUICKFIX\r\n```\r\n--- a/tensor2tensor/data_generators/cnn_dailymail.py\r\n+++ b/tensor2tensor/data_generators/cnn_dailymail.py\r\n@@ -74,7 +74,7 @@ def story_generator(tmp_dir):\r\n   for path in paths:\r\n     for story_file in tf.gfile.Glob(path + \"*\"):\r\n       story = u\"\"\r\n-      for line in tf.gfile.Open(story_file):\r\n+      for line in tf.gfile.Open(story_file, 'rb'):\r\n\r\n```\n", "before_files": [{"content": "# coding=utf-8\n# Copyright 2017 The Tensor2Tensor Authors.\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\n\"\"\"Data generators for the CNN and Daily Mail datasets.\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport tarfile\n\n# Dependency imports\n\nimport six\nfrom tensor2tensor.data_generators import generator_utils\nfrom tensor2tensor.data_generators import problem\nfrom tensor2tensor.data_generators import text_encoder\nfrom tensor2tensor.utils import registry\n\nimport tensorflow as tf\n\n\n# Links to data from http://cs.nyu.edu/~kcho/DMQA/\n_CNN_STORIES_DRIVE_URL = \"https://drive.google.com/uc?export=download&id=0BwmD_VLjROrfTHk4NFg2SndKcjQ\"\n\n_DAILYMAIL_STORIES_DRIVE_URL = \"https://drive.google.com/uc?export=download&id=0BwmD_VLjROrfM1BxdkxVaTY2bWs\"\n\n\n# End-of-sentence marker.\nEOS = text_encoder.EOS_ID\n\n\ndef _maybe_download_corpora(tmp_dir):\n  \"\"\"Download corpora if necessary and unzip them.\n\n  Args:\n    tmp_dir: directory containing dataset.\n\n  Returns:\n    filepath of the downloaded corpus file.\n  \"\"\"\n  cnn_filename = \"cnn_stories.tgz\"\n  cnn_finalpath = os.path.join(tmp_dir, \"cnn/stories/\")\n  dailymail_filename = \"dailymail_stories.tgz\"\n  dailymail_finalpath = os.path.join(tmp_dir, \"dailymail/stories/\")\n  if not tf.gfile.Exists(cnn_finalpath):\n    cnn_file = generator_utils.maybe_download_from_drive(\n        tmp_dir, cnn_filename, _CNN_STORIES_DRIVE_URL)\n    with tarfile.open(cnn_file, \"r:gz\") as cnn_tar:\n      cnn_tar.extractall(tmp_dir)\n  if not tf.gfile.Exists(dailymail_finalpath):\n    dailymail_file = generator_utils.maybe_download_from_drive(\n        tmp_dir, dailymail_filename, _DAILYMAIL_STORIES_DRIVE_URL)\n    with tarfile.open(dailymail_file, \"r:gz\") as dailymail_tar:\n      dailymail_tar.extractall(tmp_dir)\n  return [cnn_finalpath, dailymail_finalpath]\n\n\ndef story_generator(tmp_dir):\n  paths = _maybe_download_corpora(tmp_dir)\n  for path in paths:\n    for story_file in tf.gfile.Glob(path + \"*\"):\n      story = u\"\"\n      for line in tf.gfile.Open(story_file):\n        line = unicode(line, \"utf-8\") if six.PY2 else line.decode(\"utf-8\")\n        story += line\n      yield story\n\n\ndef _story_summary_split(story):\n  end_pos = story.find(\"\\n\\n\")  # Upto first empty line.\n  assert end_pos != -1\n  return story[:end_pos], story[end_pos:].strip()\n\n\n@registry.register_problem\nclass SummarizeCnnDailymail32k(problem.Text2TextProblem):\n  \"\"\"Summarize CNN and Daily Mail articles to their first paragraph.\"\"\"\n\n  @property\n  def is_character_level(self):\n    return False\n\n  @property\n  def has_inputs(self):\n    return True\n\n  @property\n  def input_space_id(self):\n    return problem.SpaceID.EN_TOK\n\n  @property\n  def target_space_id(self):\n    return problem.SpaceID.EN_TOK\n\n  @property\n  def num_shards(self):\n    return 100\n\n  @property\n  def vocab_name(self):\n    return \"vocab.cnndailymail\"\n\n  @property\n  def use_subword_tokenizer(self):\n    return True\n\n  @property\n  def targeted_vocab_size(self):\n    return 2**15  # 32768\n\n  @property\n  def use_train_shards_for_dev(self):\n    return True\n\n  def generator(self, data_dir, tmp_dir, _):\n    encoder = generator_utils.get_or_generate_vocab_inner(\n        data_dir, self.vocab_file, self.targeted_vocab_size,\n        story_generator(tmp_dir))\n    for story in story_generator(tmp_dir):\n      summary, rest = _story_summary_split(story)\n      encoded_summary = encoder.encode(summary) + [EOS]\n      encoded_story = encoder.encode(rest) + [EOS]\n      yield {\"inputs\": encoded_story, \"targets\": encoded_summary}\n", "path": "tensor2tensor/data_generators/cnn_dailymail.py"}], "after_files": [{"content": "# coding=utf-8\n# Copyright 2017 The Tensor2Tensor Authors.\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\n\"\"\"Data generators for the CNN and Daily Mail datasets.\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport tarfile\n\n# Dependency imports\n\nimport six\nfrom tensor2tensor.data_generators import generator_utils\nfrom tensor2tensor.data_generators import problem\nfrom tensor2tensor.data_generators import text_encoder\nfrom tensor2tensor.utils import registry\n\nimport tensorflow as tf\n\n\n# Links to data from http://cs.nyu.edu/~kcho/DMQA/\n_CNN_STORIES_DRIVE_URL = \"https://drive.google.com/uc?export=download&id=0BwmD_VLjROrfTHk4NFg2SndKcjQ\"\n\n_DAILYMAIL_STORIES_DRIVE_URL = \"https://drive.google.com/uc?export=download&id=0BwmD_VLjROrfM1BxdkxVaTY2bWs\"\n\n\n# End-of-sentence marker.\nEOS = text_encoder.EOS_ID\n\n\ndef _maybe_download_corpora(tmp_dir):\n  \"\"\"Download corpora if necessary and unzip them.\n\n  Args:\n    tmp_dir: directory containing dataset.\n\n  Returns:\n    filepath of the downloaded corpus file.\n  \"\"\"\n  cnn_filename = \"cnn_stories.tgz\"\n  cnn_finalpath = os.path.join(tmp_dir, \"cnn/stories/\")\n  dailymail_filename = \"dailymail_stories.tgz\"\n  dailymail_finalpath = os.path.join(tmp_dir, \"dailymail/stories/\")\n  if not tf.gfile.Exists(cnn_finalpath):\n    cnn_file = generator_utils.maybe_download_from_drive(\n        tmp_dir, cnn_filename, _CNN_STORIES_DRIVE_URL)\n    with tarfile.open(cnn_file, \"r:gz\") as cnn_tar:\n      cnn_tar.extractall(tmp_dir)\n  if not tf.gfile.Exists(dailymail_finalpath):\n    dailymail_file = generator_utils.maybe_download_from_drive(\n        tmp_dir, dailymail_filename, _DAILYMAIL_STORIES_DRIVE_URL)\n    with tarfile.open(dailymail_file, \"r:gz\") as dailymail_tar:\n      dailymail_tar.extractall(tmp_dir)\n  return [cnn_finalpath, dailymail_finalpath]\n\n\ndef story_generator(tmp_dir):\n  paths = _maybe_download_corpora(tmp_dir)\n  for path in paths:\n    for story_file in tf.gfile.Glob(path + \"*\"):\n      story = u\"\"\n      for line in tf.gfile.Open(story_file, 'rb'):\n        line = unicode(line, \"utf-8\") if six.PY2 else line.decode(\"utf-8\")\n        story += line\n      yield story\n\n\ndef _story_summary_split(story):\n  end_pos = story.find(\"\\n\\n\")  # Upto first empty line.\n  assert end_pos != -1\n  return story[:end_pos], story[end_pos:].strip()\n\n\n@registry.register_problem\nclass SummarizeCnnDailymail32k(problem.Text2TextProblem):\n  \"\"\"Summarize CNN and Daily Mail articles to their first paragraph.\"\"\"\n\n  @property\n  def is_character_level(self):\n    return False\n\n  @property\n  def has_inputs(self):\n    return True\n\n  @property\n  def input_space_id(self):\n    return problem.SpaceID.EN_TOK\n\n  @property\n  def target_space_id(self):\n    return problem.SpaceID.EN_TOK\n\n  @property\n  def num_shards(self):\n    return 100\n\n  @property\n  def vocab_name(self):\n    return \"vocab.cnndailymail\"\n\n  @property\n  def use_subword_tokenizer(self):\n    return True\n\n  @property\n  def targeted_vocab_size(self):\n    return 2**15  # 32768\n\n  @property\n  def use_train_shards_for_dev(self):\n    return True\n\n  def generator(self, data_dir, tmp_dir, _):\n    encoder = generator_utils.get_or_generate_vocab_inner(\n        data_dir, self.vocab_file, self.targeted_vocab_size,\n        story_generator(tmp_dir))\n    for story in story_generator(tmp_dir):\n      summary, rest = _story_summary_split(story)\n      encoded_summary = encoder.encode(summary) + [EOS]\n      encoded_story = encoder.encode(rest) + [EOS]\n      yield {\"inputs\": encoded_story, \"targets\": encoded_summary}\n", "path": "tensor2tensor/data_generators/cnn_dailymail.py"}]}