We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Docs failing due to pytorch-lightning deprecation
Docs are failing due to the recent deprecation of `core/lightning.py` in favor of `core/module.py` in pytorch-lightning. Refer PyTorchLightning/pytorch-lightning#12740. 




--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `docs/conf.py`
Content:
```
1 # Copyright (c) Microsoft Corporation. All rights reserved.
2 # Licensed under the MIT License.
3 
4 # Configuration file for the Sphinx documentation builder.
5 #
6 # This file only contains a selection of the most common options. For a full
7 # list see the documentation:
8 # https://www.sphinx-doc.org/en/master/usage/configuration.html
9 
10 # -- Path setup --------------------------------------------------------------
11 
12 import os
13 import sys
14 
15 import pytorch_sphinx_theme
16 
17 # If extensions (or modules to document with autodoc) are in another directory,
18 # add these directories to sys.path here. If the directory is relative to the
19 # documentation root, use os.path.abspath to make it absolute, like shown here.
20 sys.path.insert(0, os.path.abspath(".."))
21 
22 import torchgeo  # noqa: E402
23 
24 # -- Project information -----------------------------------------------------
25 
26 project = "torchgeo"
27 copyright = "2021, Microsoft Corporation"
28 author = torchgeo.__author__
29 version = ".".join(torchgeo.__version__.split(".")[:2])
30 release = torchgeo.__version__
31 
32 
33 # -- General configuration ---------------------------------------------------
34 
35 # Add any Sphinx extension module names here, as strings. They can be
36 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
37 # ones.
38 extensions = [
39     "sphinx.ext.autodoc",
40     "sphinx.ext.intersphinx",
41     "sphinx.ext.mathjax",
42     "sphinx.ext.napoleon",
43     "sphinx.ext.todo",
44     "sphinx.ext.viewcode",
45     "nbsphinx",
46 ]
47 
48 # List of patterns, relative to source directory, that match files and
49 # directories to ignore when looking for source files.
50 # This pattern also affects html_static_path and html_extra_path.
51 exclude_patterns = ["_build"]
52 
53 # Sphinx 3.0+ required for:
54 # autodoc_typehints_description_target = "documented"
55 needs_sphinx = "4.0"
56 
57 nitpicky = True
58 nitpick_ignore = [
59     # https://github.com/sphinx-doc/sphinx/issues/8127
60     ("py:class", ".."),
61     # TODO: can't figure out why this isn't found
62     ("py:class", "LightningDataModule"),
63     # Undocumented class
64     ("py:class", "torchvision.models.resnet.ResNet"),
65     ("py:class", "segmentation_models_pytorch.base.model.SegmentationModel"),
66 ]
67 
68 
69 # -- Options for HTML output -------------------------------------------------
70 
71 # The theme to use for HTML and HTML Help pages.  See the documentation for
72 # a list of builtin themes.
73 html_theme = "pytorch_sphinx_theme"
74 html_theme_path = [pytorch_sphinx_theme.get_html_theme_path()]
75 
76 # Theme options are theme-specific and customize the look and feel of a theme
77 # further.  For a list of options available for each theme, see the
78 # documentation.
79 html_theme_options = {
80     "collapse_navigation": False,
81     "display_version": True,
82     "logo_only": True,
83     "pytorch_project": "docs",
84     "navigation_with_keys": True,
85     "analytics_id": "UA-209075005-1",
86 }
87 
88 html_favicon = os.path.join("..", "logo", "favicon.ico")
89 
90 html_static_path = ["_static"]
91 html_css_files = ["workaround.css"]
92 
93 # -- Extension configuration -------------------------------------------------
94 
95 # sphinx.ext.autodoc
96 autodoc_default_options = {
97     "members": True,
98     "special-members": True,
99     "show-inheritance": True,
100 }
101 autodoc_member_order = "bysource"
102 autodoc_typehints = "description"
103 autodoc_typehints_description_target = "documented"
104 
105 # sphinx.ext.intersphinx
106 intersphinx_mapping = {
107     "matplotlib": ("https://matplotlib.org/stable/", None),
108     "numpy": ("https://numpy.org/doc/stable/", None),
109     "python": ("https://docs.python.org/3", None),
110     "pytorch-lightning": ("https://pytorch-lightning.readthedocs.io/en/latest/", None),
111     "rasterio": ("https://rasterio.readthedocs.io/en/latest/", None),
112     "rtree": ("https://rtree.readthedocs.io/en/latest/", None),
113     "segmentation_models_pytorch": ("https://smp.readthedocs.io/en/latest/", None),
114     "torch": ("https://pytorch.org/docs/stable", None),
115     "torchvision": ("https://pytorch.org/vision/stable", None),
116 }
117 
118 # nbsphinx
119 nbsphinx_execute = "never"
120 # TODO: branch/tag should change depending on which version of docs you look at
121 # TODO: width option of image directive is broken, see:
122 # https://github.com/pytorch/pytorch_sphinx_theme/issues/140
123 nbsphinx_prolog = """
124 {% set host = "https://colab.research.google.com" %}
125 {% set repo = "microsoft/torchgeo" %}
126 {% set urlpath = "docs/" ~ env.docname ~ ".ipynb" %}
127 {% if "dev" in env.config.release %}
128     {% set branch = "main" %}
129 {% else %}
130     {% set branch = "releases/v" ~ env.config.version %}
131 {% endif %}
132 
133 .. image:: {{ host }}/assets/colab-badge.svg
134    :class: colabbadge
135    :alt: Open in Colab
136    :target: {{ host }}/github/{{ repo }}/blob/{{ branch }}/{{ urlpath }}
137 
138 {% set host = "https://pccompute.westeurope.cloudapp.azure.com" %}
139 {% set host = host ~ "/compute/hub/user-redirect/git-pull" %}
140 {% set repo = "https%3A%2F%2Fgithub.com%2Fmicrosoft%2Ftorchgeo" %}
141 {% set urlpath = "tree%2Ftorchgeo%2Fdocs%2F" %}
142 {% set urlpath = urlpath ~ env.docname | replace("/", "%2F") ~ ".ipynb" %}
143 {% if "dev" in env.config.release %}
144     {% set branch = "main" %}
145 {% else %}
146     {% set branch = "releases%2Fv" ~ env.config.version %}
147 {% endif %}
148 
149 .. image:: https://img.shields.io/badge/-Open%20on%20Planetary%20Computer-blue
150    :class: colabbadge
151    :alt: Open on Planetary Computer
152    :target: {{ host }}?repo={{ repo }}&urlpath={{ urlpath }}&branch={{ branch }}
153 """
154 
155 # Disables requirejs in nbsphinx to enable compatibility with the pytorch_sphinx_theme
156 # See more information here https://github.com/spatialaudio/nbsphinx/issues/599
157 # NOTE: This will likely break nbsphinx widgets
158 nbsphinx_requirejs_path = ""
159
```
--- 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/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -107,10 +107,10 @@
     "matplotlib": ("https://matplotlib.org/stable/", None),
     "numpy": ("https://numpy.org/doc/stable/", None),
     "python": ("https://docs.python.org/3", None),
-    "pytorch-lightning": ("https://pytorch-lightning.readthedocs.io/en/latest/", None),
-    "rasterio": ("https://rasterio.readthedocs.io/en/latest/", None),
-    "rtree": ("https://rtree.readthedocs.io/en/latest/", None),
-    "segmentation_models_pytorch": ("https://smp.readthedocs.io/en/latest/", None),
+    "pytorch-lightning": ("https://pytorch-lightning.readthedocs.io/en/stable/", None),
+    "rasterio": ("https://rasterio.readthedocs.io/en/stable/", None),
+    "rtree": ("https://rtree.readthedocs.io/en/stable/", None),
+    "segmentation_models_pytorch": ("https://smp.readthedocs.io/en/stable/", None),
     "torch": ("https://pytorch.org/docs/stable", None),
     "torchvision": ("https://pytorch.org/vision/stable", None),
 }

{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -107,10 +107,10 @@\n     \"matplotlib\": (\"https://matplotlib.org/stable/\", None),\n     \"numpy\": (\"https://numpy.org/doc/stable/\", None),\n     \"python\": (\"https://docs.python.org/3\", None),\n-    \"pytorch-lightning\": (\"https://pytorch-lightning.readthedocs.io/en/latest/\", None),\n-    \"rasterio\": (\"https://rasterio.readthedocs.io/en/latest/\", None),\n-    \"rtree\": (\"https://rtree.readthedocs.io/en/latest/\", None),\n-    \"segmentation_models_pytorch\": (\"https://smp.readthedocs.io/en/latest/\", None),\n+    \"pytorch-lightning\": (\"https://pytorch-lightning.readthedocs.io/en/stable/\", None),\n+    \"rasterio\": (\"https://rasterio.readthedocs.io/en/stable/\", None),\n+    \"rtree\": (\"https://rtree.readthedocs.io/en/stable/\", None),\n+    \"segmentation_models_pytorch\": (\"https://smp.readthedocs.io/en/stable/\", None),\n     \"torch\": (\"https://pytorch.org/docs/stable\", None),\n     \"torchvision\": (\"https://pytorch.org/vision/stable\", None),\n }\n", "issue": "Docs failing due to pytorch-lightning deprecation\nDocs are failing due to the recent deprecation of `core/lightning.py` in favor of `core/module.py` in pytorch-lightning. Refer PyTorchLightning/pytorch-lightning#12740. \r\n\r\n\r\n\n", "before_files": [{"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup --------------------------------------------------------------\n\nimport os\nimport sys\n\nimport pytorch_sphinx_theme\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\nsys.path.insert(0, os.path.abspath(\"..\"))\n\nimport torchgeo  # noqa: E402\n\n# -- Project information -----------------------------------------------------\n\nproject = \"torchgeo\"\ncopyright = \"2021, Microsoft Corporation\"\nauthor = torchgeo.__author__\nversion = \".\".join(torchgeo.__version__.split(\".\")[:2])\nrelease = torchgeo.__version__\n\n\n# -- General configuration ---------------------------------------------------\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    \"sphinx.ext.autodoc\",\n    \"sphinx.ext.intersphinx\",\n    \"sphinx.ext.mathjax\",\n    \"sphinx.ext.napoleon\",\n    \"sphinx.ext.todo\",\n    \"sphinx.ext.viewcode\",\n    \"nbsphinx\",\n]\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nexclude_patterns = [\"_build\"]\n\n# Sphinx 3.0+ required for:\n# autodoc_typehints_description_target = \"documented\"\nneeds_sphinx = \"4.0\"\n\nnitpicky = True\nnitpick_ignore = [\n    # https://github.com/sphinx-doc/sphinx/issues/8127\n    (\"py:class\", \"..\"),\n    # TODO: can't figure out why this isn't found\n    (\"py:class\", \"LightningDataModule\"),\n    # Undocumented class\n    (\"py:class\", \"torchvision.models.resnet.ResNet\"),\n    (\"py:class\", \"segmentation_models_pytorch.base.model.SegmentationModel\"),\n]\n\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\nhtml_theme = \"pytorch_sphinx_theme\"\nhtml_theme_path = [pytorch_sphinx_theme.get_html_theme_path()]\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\nhtml_theme_options = {\n    \"collapse_navigation\": False,\n    \"display_version\": True,\n    \"logo_only\": True,\n    \"pytorch_project\": \"docs\",\n    \"navigation_with_keys\": True,\n    \"analytics_id\": \"UA-209075005-1\",\n}\n\nhtml_favicon = os.path.join(\"..\", \"logo\", \"favicon.ico\")\n\nhtml_static_path = [\"_static\"]\nhtml_css_files = [\"workaround.css\"]\n\n# -- Extension configuration -------------------------------------------------\n\n# sphinx.ext.autodoc\nautodoc_default_options = {\n    \"members\": True,\n    \"special-members\": True,\n    \"show-inheritance\": True,\n}\nautodoc_member_order = \"bysource\"\nautodoc_typehints = \"description\"\nautodoc_typehints_description_target = \"documented\"\n\n# sphinx.ext.intersphinx\nintersphinx_mapping = {\n    \"matplotlib\": (\"https://matplotlib.org/stable/\", None),\n    \"numpy\": (\"https://numpy.org/doc/stable/\", None),\n    \"python\": (\"https://docs.python.org/3\", None),\n    \"pytorch-lightning\": (\"https://pytorch-lightning.readthedocs.io/en/latest/\", None),\n    \"rasterio\": (\"https://rasterio.readthedocs.io/en/latest/\", None),\n    \"rtree\": (\"https://rtree.readthedocs.io/en/latest/\", None),\n    \"segmentation_models_pytorch\": (\"https://smp.readthedocs.io/en/latest/\", None),\n    \"torch\": (\"https://pytorch.org/docs/stable\", None),\n    \"torchvision\": (\"https://pytorch.org/vision/stable\", None),\n}\n\n# nbsphinx\nnbsphinx_execute = \"never\"\n# TODO: branch/tag should change depending on which version of docs you look at\n# TODO: width option of image directive is broken, see:\n# https://github.com/pytorch/pytorch_sphinx_theme/issues/140\nnbsphinx_prolog = \"\"\"\n{% set host = \"https://colab.research.google.com\" %}\n{% set repo = \"microsoft/torchgeo\" %}\n{% set urlpath = \"docs/\" ~ env.docname ~ \".ipynb\" %}\n{% if \"dev\" in env.config.release %}\n    {% set branch = \"main\" %}\n{% else %}\n    {% set branch = \"releases/v\" ~ env.config.version %}\n{% endif %}\n\n.. image:: {{ host }}/assets/colab-badge.svg\n   :class: colabbadge\n   :alt: Open in Colab\n   :target: {{ host }}/github/{{ repo }}/blob/{{ branch }}/{{ urlpath }}\n\n{% set host = \"https://pccompute.westeurope.cloudapp.azure.com\" %}\n{% set host = host ~ \"/compute/hub/user-redirect/git-pull\" %}\n{% set repo = \"https%3A%2F%2Fgithub.com%2Fmicrosoft%2Ftorchgeo\" %}\n{% set urlpath = \"tree%2Ftorchgeo%2Fdocs%2F\" %}\n{% set urlpath = urlpath ~ env.docname | replace(\"/\", \"%2F\") ~ \".ipynb\" %}\n{% if \"dev\" in env.config.release %}\n    {% set branch = \"main\" %}\n{% else %}\n    {% set branch = \"releases%2Fv\" ~ env.config.version %}\n{% endif %}\n\n.. image:: https://img.shields.io/badge/-Open%20on%20Planetary%20Computer-blue\n   :class: colabbadge\n   :alt: Open on Planetary Computer\n   :target: {{ host }}?repo={{ repo }}&urlpath={{ urlpath }}&branch={{ branch }}\n\"\"\"\n\n# Disables requirejs in nbsphinx to enable compatibility with the pytorch_sphinx_theme\n# See more information here https://github.com/spatialaudio/nbsphinx/issues/599\n# NOTE: This will likely break nbsphinx widgets\nnbsphinx_requirejs_path = \"\"\n", "path": "docs/conf.py"}], "after_files": [{"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup --------------------------------------------------------------\n\nimport os\nimport sys\n\nimport pytorch_sphinx_theme\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\nsys.path.insert(0, os.path.abspath(\"..\"))\n\nimport torchgeo  # noqa: E402\n\n# -- Project information -----------------------------------------------------\n\nproject = \"torchgeo\"\ncopyright = \"2021, Microsoft Corporation\"\nauthor = torchgeo.__author__\nversion = \".\".join(torchgeo.__version__.split(\".\")[:2])\nrelease = torchgeo.__version__\n\n\n# -- General configuration ---------------------------------------------------\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    \"sphinx.ext.autodoc\",\n    \"sphinx.ext.intersphinx\",\n    \"sphinx.ext.mathjax\",\n    \"sphinx.ext.napoleon\",\n    \"sphinx.ext.todo\",\n    \"sphinx.ext.viewcode\",\n    \"nbsphinx\",\n]\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path.\nexclude_patterns = [\"_build\"]\n\n# Sphinx 3.0+ required for:\n# autodoc_typehints_description_target = \"documented\"\nneeds_sphinx = \"4.0\"\n\nnitpicky = True\nnitpick_ignore = [\n    # https://github.com/sphinx-doc/sphinx/issues/8127\n    (\"py:class\", \"..\"),\n    # TODO: can't figure out why this isn't found\n    (\"py:class\", \"LightningDataModule\"),\n    # Undocumented class\n    (\"py:class\", \"torchvision.models.resnet.ResNet\"),\n    (\"py:class\", \"segmentation_models_pytorch.base.model.SegmentationModel\"),\n]\n\n\n# -- Options for HTML output -------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\nhtml_theme = \"pytorch_sphinx_theme\"\nhtml_theme_path = [pytorch_sphinx_theme.get_html_theme_path()]\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\nhtml_theme_options = {\n    \"collapse_navigation\": False,\n    \"display_version\": True,\n    \"logo_only\": True,\n    \"pytorch_project\": \"docs\",\n    \"navigation_with_keys\": True,\n    \"analytics_id\": \"UA-209075005-1\",\n}\n\nhtml_favicon = os.path.join(\"..\", \"logo\", \"favicon.ico\")\n\nhtml_static_path = [\"_static\"]\nhtml_css_files = [\"workaround.css\"]\n\n# -- Extension configuration -------------------------------------------------\n\n# sphinx.ext.autodoc\nautodoc_default_options = {\n    \"members\": True,\n    \"special-members\": True,\n    \"show-inheritance\": True,\n}\nautodoc_member_order = \"bysource\"\nautodoc_typehints = \"description\"\nautodoc_typehints_description_target = \"documented\"\n\n# sphinx.ext.intersphinx\nintersphinx_mapping = {\n    \"matplotlib\": (\"https://matplotlib.org/stable/\", None),\n    \"numpy\": (\"https://numpy.org/doc/stable/\", None),\n    \"python\": (\"https://docs.python.org/3\", None),\n    \"pytorch-lightning\": (\"https://pytorch-lightning.readthedocs.io/en/stable/\", None),\n    \"rasterio\": (\"https://rasterio.readthedocs.io/en/stable/\", None),\n    \"rtree\": (\"https://rtree.readthedocs.io/en/stable/\", None),\n    \"segmentation_models_pytorch\": (\"https://smp.readthedocs.io/en/stable/\", None),\n    \"torch\": (\"https://pytorch.org/docs/stable\", None),\n    \"torchvision\": (\"https://pytorch.org/vision/stable\", None),\n}\n\n# nbsphinx\nnbsphinx_execute = \"never\"\n# TODO: branch/tag should change depending on which version of docs you look at\n# TODO: width option of image directive is broken, see:\n# https://github.com/pytorch/pytorch_sphinx_theme/issues/140\nnbsphinx_prolog = \"\"\"\n{% set host = \"https://colab.research.google.com\" %}\n{% set repo = \"microsoft/torchgeo\" %}\n{% set urlpath = \"docs/\" ~ env.docname ~ \".ipynb\" %}\n{% if \"dev\" in env.config.release %}\n    {% set branch = \"main\" %}\n{% else %}\n    {% set branch = \"releases/v\" ~ env.config.version %}\n{% endif %}\n\n.. image:: {{ host }}/assets/colab-badge.svg\n   :class: colabbadge\n   :alt: Open in Colab\n   :target: {{ host }}/github/{{ repo }}/blob/{{ branch }}/{{ urlpath }}\n\n{% set host = \"https://pccompute.westeurope.cloudapp.azure.com\" %}\n{% set host = host ~ \"/compute/hub/user-redirect/git-pull\" %}\n{% set repo = \"https%3A%2F%2Fgithub.com%2Fmicrosoft%2Ftorchgeo\" %}\n{% set urlpath = \"tree%2Ftorchgeo%2Fdocs%2F\" %}\n{% set urlpath = urlpath ~ env.docname | replace(\"/\", \"%2F\") ~ \".ipynb\" %}\n{% if \"dev\" in env.config.release %}\n    {% set branch = \"main\" %}\n{% else %}\n    {% set branch = \"releases%2Fv\" ~ env.config.version %}\n{% endif %}\n\n.. image:: https://img.shields.io/badge/-Open%20on%20Planetary%20Computer-blue\n   :class: colabbadge\n   :alt: Open on Planetary Computer\n   :target: {{ host }}?repo={{ repo }}&urlpath={{ urlpath }}&branch={{ branch }}\n\"\"\"\n\n# Disables requirejs in nbsphinx to enable compatibility with the pytorch_sphinx_theme\n# See more information here https://github.com/spatialaudio/nbsphinx/issues/599\n# NOTE: This will likely break nbsphinx widgets\nnbsphinx_requirejs_path = \"\"\n", "path": "docs/conf.py"}]}