We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Build nightly from tf-nightly
Currently we build against `tf-nightly-2.0-preview`. Now that TF2 is released we should switch to `tf-nightly` once we confirm that the switch has been made.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 # Copyright 2019 The TensorFlow Authors. 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 # ==============================================================================
15 """TensorFlow Addons.
16 
17 TensorFlow Addons is a repository of contributions that conform to well-
18 established API patterns, but implement new functionality not available
19 in core TensorFlow. TensorFlow natively supports a large number of
20 operators, layers, metrics, losses, and optimizers. However, in a fast
21 moving field like ML, there are many interesting new developments that
22 cannot be integrated into core TensorFlow (because their broad
23 applicability is not yet clear, or it is mostly used by a smaller subset
24 of the community).
25 """
26 
27 from __future__ import absolute_import
28 from __future__ import division
29 from __future__ import print_function
30 
31 import os
32 import platform
33 import sys
34 
35 from datetime import datetime
36 from setuptools import find_packages
37 from setuptools import setup
38 from setuptools.dist import Distribution
39 from setuptools import Extension
40 
41 DOCLINES = __doc__.split('\n')
42 
43 TFA_NIGHTLY = 'tfa-nightly'
44 TFA_RELEASE = 'tensorflow-addons'
45 
46 if '--nightly' in sys.argv:
47     project_name = TFA_NIGHTLY
48     nightly_idx = sys.argv.index('--nightly')
49     sys.argv.pop(nightly_idx)
50 else:
51     project_name = TFA_RELEASE
52 
53 # Version
54 version = {}
55 base_dir = os.path.dirname(os.path.abspath(__file__))
56 with open(os.path.join(base_dir, "tensorflow_addons", "version.py")) as fp:
57     # yapf: disable
58     exec(fp.read(), version)
59     # yapf: enable
60 
61 if project_name == TFA_NIGHTLY:
62     version['__version__'] += datetime.strftime(datetime.today(), "%Y%m%d")
63 
64 # Dependencies
65 REQUIRED_PACKAGES = [
66     'six >= 1.10.0',
67 ]
68 
69 if project_name == TFA_RELEASE:
70     # TODO: remove if-else condition when tf supports package consolidation.
71     if platform.system() == 'Linux':
72         REQUIRED_PACKAGES.append('tensorflow-gpu == 2.0.0-rc0')
73     else:
74         REQUIRED_PACKAGES.append('tensorflow == 2.0.0-rc0')
75 elif project_name == TFA_NIGHTLY:
76     # TODO: remove if-else condition when tf-nightly supports package consolidation.
77     if platform.system() == 'Linux':
78         REQUIRED_PACKAGES.append('tf-nightly-gpu-2.0-preview')
79     else:
80         REQUIRED_PACKAGES.append('tf-nightly-2.0-preview')
81 
82 
83 class BinaryDistribution(Distribution):
84     """This class is needed in order to create OS specific wheels."""
85 
86     def has_ext_modules(self):
87         return True
88 
89 
90 setup(
91     name=project_name,
92     version=version['__version__'],
93     description=DOCLINES[0],
94     long_description='\n'.join(DOCLINES[2:]),
95     author='Google Inc.',
96     author_email='opensource@google.com',
97     packages=find_packages(),
98     ext_modules=[Extension('_foo', ['stub.cc'])],
99     install_requires=REQUIRED_PACKAGES,
100     include_package_data=True,
101     zip_safe=False,
102     distclass=BinaryDistribution,
103     classifiers=[
104         'Development Status :: 4 - Beta',
105         'Intended Audience :: Developers',
106         'Intended Audience :: Education',
107         'Intended Audience :: Science/Research',
108         'License :: OSI Approved :: Apache Software License',
109         'Programming Language :: Python :: 2.7',
110         'Programming Language :: Python :: 3.5',
111         'Programming Language :: Python :: 3.6',
112         'Programming Language :: Python :: 3.7',
113         'Topic :: Scientific/Engineering :: Mathematics',
114         'Topic :: Software Development :: Libraries :: Python Modules',
115         'Topic :: Software Development :: Libraries',
116     ],
117     license='Apache 2.0',
118     keywords='tensorflow addons machine learning',
119 )
120
```
--- 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/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -69,15 +69,11 @@
 if project_name == TFA_RELEASE:
     # TODO: remove if-else condition when tf supports package consolidation.
     if platform.system() == 'Linux':
-        REQUIRED_PACKAGES.append('tensorflow-gpu == 2.0.0-rc0')
+        REQUIRED_PACKAGES.append('tensorflow-gpu == 2.0.0')
     else:
-        REQUIRED_PACKAGES.append('tensorflow == 2.0.0-rc0')
+        REQUIRED_PACKAGES.append('tensorflow == 2.0.0')
 elif project_name == TFA_NIGHTLY:
-    # TODO: remove if-else condition when tf-nightly supports package consolidation.
-    if platform.system() == 'Linux':
-        REQUIRED_PACKAGES.append('tf-nightly-gpu-2.0-preview')
-    else:
-        REQUIRED_PACKAGES.append('tf-nightly-2.0-preview')
+    REQUIRED_PACKAGES.append('tf-nightly')
 
 
 class BinaryDistribution(Distribution):

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -69,15 +69,11 @@\n if project_name == TFA_RELEASE:\n     # TODO: remove if-else condition when tf supports package consolidation.\n     if platform.system() == 'Linux':\n-        REQUIRED_PACKAGES.append('tensorflow-gpu == 2.0.0-rc0')\n+        REQUIRED_PACKAGES.append('tensorflow-gpu == 2.0.0')\n     else:\n-        REQUIRED_PACKAGES.append('tensorflow == 2.0.0-rc0')\n+        REQUIRED_PACKAGES.append('tensorflow == 2.0.0')\n elif project_name == TFA_NIGHTLY:\n-    # TODO: remove if-else condition when tf-nightly supports package consolidation.\n-    if platform.system() == 'Linux':\n-        REQUIRED_PACKAGES.append('tf-nightly-gpu-2.0-preview')\n-    else:\n-        REQUIRED_PACKAGES.append('tf-nightly-2.0-preview')\n+    REQUIRED_PACKAGES.append('tf-nightly')\n \n \n class BinaryDistribution(Distribution):\n", "issue": "Build nightly from tf-nightly\nCurrently we build against `tf-nightly-2.0-preview`. Now that TF2 is released we should switch to `tf-nightly` once we confirm that the switch has been made.\n", "before_files": [{"content": "# Copyright 2019 The TensorFlow Authors. 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# ==============================================================================\n\"\"\"TensorFlow Addons.\n\nTensorFlow Addons is a repository of contributions that conform to well-\nestablished API patterns, but implement new functionality not available\nin core TensorFlow. TensorFlow natively supports a large number of\noperators, layers, metrics, losses, and optimizers. However, in a fast\nmoving field like ML, there are many interesting new developments that\ncannot be integrated into core TensorFlow (because their broad\napplicability is not yet clear, or it is mostly used by a smaller subset\nof the community).\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport platform\nimport sys\n\nfrom datetime import datetime\nfrom setuptools import find_packages\nfrom setuptools import setup\nfrom setuptools.dist import Distribution\nfrom setuptools import Extension\n\nDOCLINES = __doc__.split('\\n')\n\nTFA_NIGHTLY = 'tfa-nightly'\nTFA_RELEASE = 'tensorflow-addons'\n\nif '--nightly' in sys.argv:\n    project_name = TFA_NIGHTLY\n    nightly_idx = sys.argv.index('--nightly')\n    sys.argv.pop(nightly_idx)\nelse:\n    project_name = TFA_RELEASE\n\n# Version\nversion = {}\nbase_dir = os.path.dirname(os.path.abspath(__file__))\nwith open(os.path.join(base_dir, \"tensorflow_addons\", \"version.py\")) as fp:\n    # yapf: disable\n    exec(fp.read(), version)\n    # yapf: enable\n\nif project_name == TFA_NIGHTLY:\n    version['__version__'] += datetime.strftime(datetime.today(), \"%Y%m%d\")\n\n# Dependencies\nREQUIRED_PACKAGES = [\n    'six >= 1.10.0',\n]\n\nif project_name == TFA_RELEASE:\n    # TODO: remove if-else condition when tf supports package consolidation.\n    if platform.system() == 'Linux':\n        REQUIRED_PACKAGES.append('tensorflow-gpu == 2.0.0-rc0')\n    else:\n        REQUIRED_PACKAGES.append('tensorflow == 2.0.0-rc0')\nelif project_name == TFA_NIGHTLY:\n    # TODO: remove if-else condition when tf-nightly supports package consolidation.\n    if platform.system() == 'Linux':\n        REQUIRED_PACKAGES.append('tf-nightly-gpu-2.0-preview')\n    else:\n        REQUIRED_PACKAGES.append('tf-nightly-2.0-preview')\n\n\nclass BinaryDistribution(Distribution):\n    \"\"\"This class is needed in order to create OS specific wheels.\"\"\"\n\n    def has_ext_modules(self):\n        return True\n\n\nsetup(\n    name=project_name,\n    version=version['__version__'],\n    description=DOCLINES[0],\n    long_description='\\n'.join(DOCLINES[2:]),\n    author='Google Inc.',\n    author_email='opensource@google.com',\n    packages=find_packages(),\n    ext_modules=[Extension('_foo', ['stub.cc'])],\n    install_requires=REQUIRED_PACKAGES,\n    include_package_data=True,\n    zip_safe=False,\n    distclass=BinaryDistribution,\n    classifiers=[\n        'Development Status :: 4 - Beta',\n        'Intended Audience :: Developers',\n        'Intended Audience :: Education',\n        'Intended Audience :: Science/Research',\n        'License :: OSI Approved :: Apache Software License',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n        'Topic :: Scientific/Engineering :: Mathematics',\n        'Topic :: Software Development :: Libraries :: Python Modules',\n        'Topic :: Software Development :: Libraries',\n    ],\n    license='Apache 2.0',\n    keywords='tensorflow addons machine learning',\n)\n", "path": "setup.py"}], "after_files": [{"content": "# Copyright 2019 The TensorFlow Authors. 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# ==============================================================================\n\"\"\"TensorFlow Addons.\n\nTensorFlow Addons is a repository of contributions that conform to well-\nestablished API patterns, but implement new functionality not available\nin core TensorFlow. TensorFlow natively supports a large number of\noperators, layers, metrics, losses, and optimizers. However, in a fast\nmoving field like ML, there are many interesting new developments that\ncannot be integrated into core TensorFlow (because their broad\napplicability is not yet clear, or it is mostly used by a smaller subset\nof the community).\n\"\"\"\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport platform\nimport sys\n\nfrom datetime import datetime\nfrom setuptools import find_packages\nfrom setuptools import setup\nfrom setuptools.dist import Distribution\nfrom setuptools import Extension\n\nDOCLINES = __doc__.split('\\n')\n\nTFA_NIGHTLY = 'tfa-nightly'\nTFA_RELEASE = 'tensorflow-addons'\n\nif '--nightly' in sys.argv:\n    project_name = TFA_NIGHTLY\n    nightly_idx = sys.argv.index('--nightly')\n    sys.argv.pop(nightly_idx)\nelse:\n    project_name = TFA_RELEASE\n\n# Version\nversion = {}\nbase_dir = os.path.dirname(os.path.abspath(__file__))\nwith open(os.path.join(base_dir, \"tensorflow_addons\", \"version.py\")) as fp:\n    # yapf: disable\n    exec(fp.read(), version)\n    # yapf: enable\n\nif project_name == TFA_NIGHTLY:\n    version['__version__'] += datetime.strftime(datetime.today(), \"%Y%m%d\")\n\n# Dependencies\nREQUIRED_PACKAGES = [\n    'six >= 1.10.0',\n]\n\nif project_name == TFA_RELEASE:\n    # TODO: remove if-else condition when tf supports package consolidation.\n    if platform.system() == 'Linux':\n        REQUIRED_PACKAGES.append('tensorflow-gpu == 2.0.0')\n    else:\n        REQUIRED_PACKAGES.append('tensorflow == 2.0.0')\nelif project_name == TFA_NIGHTLY:\n    REQUIRED_PACKAGES.append('tf-nightly')\n\n\nclass BinaryDistribution(Distribution):\n    \"\"\"This class is needed in order to create OS specific wheels.\"\"\"\n\n    def has_ext_modules(self):\n        return True\n\n\nsetup(\n    name=project_name,\n    version=version['__version__'],\n    description=DOCLINES[0],\n    long_description='\\n'.join(DOCLINES[2:]),\n    author='Google Inc.',\n    author_email='opensource@google.com',\n    packages=find_packages(),\n    ext_modules=[Extension('_foo', ['stub.cc'])],\n    install_requires=REQUIRED_PACKAGES,\n    include_package_data=True,\n    zip_safe=False,\n    distclass=BinaryDistribution,\n    classifiers=[\n        'Development Status :: 4 - Beta',\n        'Intended Audience :: Developers',\n        'Intended Audience :: Education',\n        'Intended Audience :: Science/Research',\n        'License :: OSI Approved :: Apache Software License',\n        'Programming Language :: Python :: 2.7',\n        'Programming Language :: Python :: 3.5',\n        'Programming Language :: Python :: 3.6',\n        'Programming Language :: Python :: 3.7',\n        'Topic :: Scientific/Engineering :: Mathematics',\n        'Topic :: Software Development :: Libraries :: Python Modules',\n        'Topic :: Software Development :: Libraries',\n    ],\n    license='Apache 2.0',\n    keywords='tensorflow addons machine learning',\n)\n", "path": "setup.py"}]}