internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: cornellius-gp/gpytorch

Issue:
[Bug] The Added Loss term for InducingKernel seems flipped in sign?
# 🐛 Bug

<!-- A clear and concise description of what the bug is. -->
```
    def loss(self, *params):
        prior_covar = self.prior_dist.lazy_covariance_matrix
        variational_covar = self.variational_dist.lazy_covariance_matrix
        diag = prior_covar.diag() - variational_covar.diag()
        shape = prior_covar.shape[:-1]
        noise_diag = self.likelihood._shaped_noise_covar(shape, *params).diag()
        return 0.5 * (diag / noise_diag).sum()
```
This is the current code for InducingPointKernelAddedLossTerm.loss

From what I see, this "loss term" is added into the mll that is returned by the `ExactMarginalLogLikelihood` class. This in itself is misleading as the loss is usually the negative of the mll.

Moreover, the variational negative loss used to evaluate inducing points is given below

![image](https://user-images.githubusercontent.com/4582526/122106510-4c545980-ce1a-11eb-9bbc-681bea511bec.png)

As can be seen, the above is the expression for the pseudo-mll that is maximized when optimizing the inducing points. in this, the component of `InducingPointKernelAddedLossTerm` is negative to the value that is being added into the loss.

This is quite likely a significant bug. Please fix (just invert the sign of `diag` above)



Discussion:
Hi @maharjun - I see you've closed this issue? How is it resolved?
It's because flipping the sign caused the errors to become pathological.

Upon further investigation, I realize that It's because there are two errors that cancel each other out. The initialization of the InducingPointKernelAddedLossTerm in inducing_point_kernel.py flips the variational distribution and the prior distribution arguments which makes the above sign convention work. I'm opening this issue again so that this double error can be fixed.

Resolving patch:
diff --git a/gpytorch/mlls/inducing_point_kernel_added_loss_term.py b/gpytorch/mlls/inducing_point_kernel_added_loss_term.py
--- a/gpytorch/mlls/inducing_point_kernel_added_loss_term.py
+++ b/gpytorch/mlls/inducing_point_kernel_added_loss_term.py
@@ -4,7 +4,7 @@
 
 
 class InducingPointKernelAddedLossTerm(AddedLossTerm):
-    def __init__(self, variational_dist, prior_dist, likelihood):
+    def __init__(self, prior_dist, variational_dist, likelihood):
         self.prior_dist = prior_dist
         self.variational_dist = variational_dist
         self.likelihood = likelihood
@@ -12,7 +12,7 @@ def __init__(self, variational_dist, prior_dist, likelihood):
     def loss(self, *params):
         prior_covar = self.prior_dist.lazy_covariance_matrix
         variational_covar = self.variational_dist.lazy_covariance_matrix
-        diag = prior_covar.diag() - variational_covar.diag()
+        diag = variational_covar.diag() - prior_covar.diag()
         shape = prior_covar.shape[:-1]
         noise_diag = self.likelihood._shaped_noise_covar(shape, *params).diag()
         return 0.5 * (diag / noise_diag).sum()


Test patch:
Repository: cornellius-gp/gpytorch

Issue:
[Bug] Cat_rows evaluation fails to capture correct device
# 🐛 Bug

Evaluating `LazyTensor.cat_rows` on the gpu returns a cpu tensor.

## To reproduce

** Code snippet to reproduce **
```python
from gpytorch.kernels import MaternKernel
import torch

x = torch.randn(10, 3).cuda()
y = torch.randn(5, 3).cuda()

kernel = MaternKernel().cuda()

kxx = kernel(x)
kxy = kernel(y, x)
kyy = kernel(y)

joint_covariance = kxx.cat_rows(kxy, kyy)
joint_covariance.matmul(torch.randn(15, 3).cuda()).device # on the gpu properly
joint_covariance.evaluate().device # returns cpu
```

** Stack trace/error message **
See above. It's a missing device_id argument in the CatLazyTensor calls.

## Expected Behavior

returns on the gpu. 

## System information

**Please complete the following information:**
- gpytorch master

## Additional context
I'll put up a PR shortly. I think that this is causing the test failures in https://github.com/pytorch/botorch/pull/883



Discussion:

Resolving patch:
diff --git a/gpytorch/lazy/lazy_tensor.py b/gpytorch/lazy/lazy_tensor.py
--- a/gpytorch/lazy/lazy_tensor.py
+++ b/gpytorch/lazy/lazy_tensor.py
@@ -780,9 +780,9 @@ def cat_rows(self, cross_mat, new_mat, generate_roots=True, **root_decomp_kwargs
             A = self
 
         # form matrix C = [A B; B^T D], where A = self, B = cross_mat, D = new_mat
-        upper_row = CatLazyTensor(A, B, dim=-2)
-        lower_row = CatLazyTensor(B.transpose(-1, -2), D, dim=-2)
-        new_lazy_tensor = CatLazyTensor(upper_row, lower_row, dim=-1)
+        upper_row = CatLazyTensor(A, B, dim=-2, output_device=A.device)
+        lower_row = CatLazyTensor(B.transpose(-1, -2), D, dim=-2, output_device=A.device)
+        new_lazy_tensor = CatLazyTensor(upper_row, lower_row, dim=-1, output_device=A.device)
 
         # if the old lazy tensor does not have either a root decomposition or a root inverse decomposition
         # don't create one


Test patch:
Repository: cornellius-gp/gpytorch

Issue:
[Bug] `Kernel.__getitem__` modifies `self`
# 🐛 Bug

<!-- A clear and concise description of what the bug is. -->
Even though `Kernel.__getitem__` returns a copy, it still [modifies itself](https://github.com/cornellius-gp/gpytorch/blob/c96965c8aefac1874652fb44321541f5972eaa88/gpytorch/kernels/kernel.py#L436). That looks like a bug to me, and causes the issue below.

## To reproduce

```python
import torch
from gpytorch.kernels import Kernel, MaternKernel, ScaleKernel
from gpytorch.priors.torch_priors import GammaPrior

X = torch.zeros((5, 4))
Y = torch.zeros((5, 3))
kernel = ScaleKernel(
	MaternKernel(
		nu = 2.5,
		ard_num_dims = X.shape[-1],
		batch_shape = (Y.shape[-1],),
		lengthscale_prior = GammaPrior(3, 6),
	),
	batch_shape = (Y.shape[-1],),
	outputscale_prior = GammaPrior(2, 0.15),
)

k1 = kernel[0]
print(k1.batch_shape) # torch.Size([3])
k2 = kernel[0]
print(k2.batch_shape) # torch.Size([])
```

In other words, `kernel[i] != kernel[i]`.

## Expected Behavior

Both printed lines should be `torch.Size([])`.

## System information

- `gpytorch==1.5.1`
- `torch==1.9.0+cu111`
- Win10 x64

## Additional context

Changing [this line](https://github.com/cornellius-gp/gpytorch/blob/c96965c8aefac1874652fb44321541f5972eaa88/gpytorch/kernels/kernel.py#L436)...
```diff
- self._modules[sub_module_name] = sub_module.__getitem__(index)
+ new_kernel._modules[sub_module_name] = sub_module.__getitem__(index)
```
...appears to fix it.


Discussion:

Resolving patch:
diff --git a/gpytorch/kernels/kernel.py b/gpytorch/kernels/kernel.py
--- a/gpytorch/kernels/kernel.py
+++ b/gpytorch/kernels/kernel.py
@@ -433,7 +433,7 @@ def __getitem__(self, index):
             new_kernel.batch_shape = new_kernel._parameters[param_name].shape[:new_batch_shape_len]
 
         for sub_module_name, sub_module in self.named_sub_kernels():
-            self._modules[sub_module_name] = sub_module.__getitem__(index)
+            new_kernel._modules[sub_module_name] = sub_module.__getitem__(index)
 
         return new_kernel
 


Test patch:
Repository: cornellius-gp/gpytorch

Issue:
[Docs] Bernoulli likelihoods 
# 📚 Documentation/Examples

In the document for [Bernoulli likelihoods](https://docs.gpytorch.ai/en/stable/likelihoods.html), since the labels take value in {0, 1}, the likelihood should be 

$$p(Y=y | f) = \Phi ((2y-1)f)$$

instead of the currently displayed

$$p(Y=y|f) = \Phi(yf).$$


Discussion:
Makes sense! Mind putting up a PR?
In the implementation, the {0,1} input is actually transformed to {-1,1}, so the displayed function is actually what they do actually.

Maybe it's better to clarify that, the input label should be {0,1}, but it is transformed into {-1,1} to fit the compact calculation \Phi(y * f) during implementation.

Resolving patch:
diff --git a/gpytorch/likelihoods/bernoulli_likelihood.py b/gpytorch/likelihoods/bernoulli_likelihood.py
--- a/gpytorch/likelihoods/bernoulli_likelihood.py
+++ b/gpytorch/likelihoods/bernoulli_likelihood.py
@@ -18,8 +18,11 @@ class BernoulliLikelihood(_OneDimensionalLikelihood):
 
     .. math::
         \begin{equation*}
-            p(Y=y|f)=\Phi(yf)
+            p(Y=y|f)=\Phi((2y - 1)f)
         \end{equation*}
+
+    .. note::
+        The labels should take values in {0, 1}.
     """
 
     def forward(self, function_samples, **kwargs):


Test patch:
Repository: jupyter/docker-stacks

Issue:
We fail to push our multi-arch images
We successfully login with `docker login`, but we fail to push images. I'm unsure why, we only get 401 Unauthorized and that's it.

### From [CI run that failed](https://github.com/jupyter/docker-stacks/runs/3090573663?check_suite_focus=true)

```
  #36 exporting to image
  #36 exporting manifest sha256:f4885e2ee0a2d6f4484aa75b005e585414a56981e31ed2343f8a9f2dee27d2bf done
  #36 exporting config sha256:125cf7a049b119220a812d64eeae4ed7e3c3fd61e92aed6fcb118251165062ba done
  #36 exporting manifest sha256:e6b8d5dbd2a1cb3022cd214946f2290ac65aed7fc3787fa8fbdbd655c344ac28 done
  #36 exporting config sha256:4ae4f82b528de65a8f301eef09d66007865189d8b405fe2f65ea6d10c7994760 done
  #36 exporting manifest list sha256:30be78018e77875a79b18949ec26fcc8760399e82da17aefb0281bb177f0c2a0 done
  #36 pushing layers
  #36 ...
  
  #38 [auth] library/40b549a81031:pull,push token for registry-1.docker.io
  #38 DONE 0.0s
  
  #39 [auth] library/40b549a81031:pull,push token for registry-1.docker.io
  #39 DONE 0.0s
  
  #40 [auth] library/40b549a81031:pull,push token for registry-1.docker.io
  #40 DONE 0.0s
  
  #41 [auth] library/40b549a81031:pull,push token for registry-1.docker.io
  #41 DONE 0.0s
  
  #42 [auth] library/40b549a81031:pull,push token for registry-1.docker.io
  #42 DONE 0.0s
  
  #43 [auth] library/40b549a81031:pull,push token for registry-1.docker.io
  #43 DONE 0.0s
  
  #36 exporting to image
  #36 pushing layers 0.4s done
  #36 ERROR: authorization status: 401: authorization failed
  ------
   > exporting to image:
  ------
  error: failed to solve: authorization status: 401: authorization failed
  make: *** [Makefile:191: push-multi/base-notebook] Error 1
  make: Leaving directory '/home/runner/work/docker-stacks/docker-stacks/main'
  Error: Process completed with exit code 2.
```


Discussion:

Resolving patch:
diff --git a/tagging/tag_image.py b/tagging/tag_image.py
--- a/tagging/tag_image.py
+++ b/tagging/tag_image.py
@@ -38,7 +38,9 @@ def tag_image(short_image_name: str, owner: str) -> None:
 
         if tags:
             env_name = f'{short_image_name.replace("-", "_")}_EXTRA_TAG_ARGS'
-            docker_build_tag_args = "-t " + " -t ".join(tags)
+            docker_build_tag_args = " ".join(
+                [f"-t {owner}/{short_image_name}:{tag}" for tag in tags]
+            )
             github_set_env(env_name, docker_build_tag_args)
 
 


Test patch:
Repository: kedro-org/kedro

Issue:
User home directory is not expanded for TextLocalDataSet
## Description
User home directory `~` is not automatically expanded for `TextLocalDataSet`, but it is automatically expanded for `ParquetLocalDataSet` and `CSVLocalDataSet `.

## Context
Trying to specify file paths relative to user home directory to simplify interoperability and handoff of Kedro pipelines between teammates - instead of manually replacing hardcoded absolute paths on each machine or user, each user will automatically recreate same directory structure relative to his/her home directory.   

## Steps to Reproduce
```
from kedro.io import TextLocalDataSet
import os


string_to_write = "This will go in a file."

data_set = TextLocalDataSet(filepath="~/code/tmp/new_documentation.md")
data_set.save(string_to_write)

os.path.abspath(data_set._filepath)
```

## Expected Result
`~` should be replaced by user home directory and file should be saved relative to it in subdirectory `code/tmp/`.

## Actual Result
Directory `~/code/tmp/` is created in current working directory.


## Your Environment
Include as many relevant details about the environment in which you experienced the bug:

* Kedro version used (`pip show kedro` or `kedro -V`): v0.14.2
* Python version used (`python -V`): Python 3.6.8 :: Anaconda, Inc.
* Operating system and version: MacOS Mojave 10.14.3

## Checklist
Include labels so that we can categorise your issue:

- [ ] Add a "Component" label to the issue
- [ ] Add a "Priority" label to the issue



Discussion:

Resolving patch:
diff --git a/kedro/io/text_local.py b/kedro/io/text_local.py
--- a/kedro/io/text_local.py
+++ b/kedro/io/text_local.py
@@ -28,6 +28,7 @@
 """``TextLocalDataSet`` loads and saves data to a local text file. The data is
 accessed text data using the python open function.
 """
+import os
 from pathlib import Path
 from typing import Any, Dict
 
@@ -83,7 +84,7 @@ def __init__(
         default_save_args = {"mode": "w"}
         default_load_args = {"mode": "r"}
 
-        self._filepath = filepath
+        self._filepath = os.path.expanduser(filepath)
         self._load_args = (
             {**default_load_args, **load_args}
             if load_args is not None


Test patch:
diff --git a/tests/io/test_text_local.py b/tests/io/test_text_local.py
--- a/tests/io/test_text_local.py
+++ b/tests/io/test_text_local.py
@@ -82,6 +82,9 @@ def test_assess_if_file_exists(self, txt_data_set, sample_text, filepath_txt):
         traditional_write(filepath_txt, sample_text)
         assert txt_data_set.exists()
 
+    def test_filepath_expanduser(self):
+        txt_dataset = TextLocalDataSet(filepath='~')
+        assert '~' not in txt_dataset._filepath  # pylint: disable=protected-access
 
 class TestTextLocalDataSetVersioned:
     def test_save_and_load(self, versioned_txt_data_set, sample_text):
Repository: kedro-org/kedro

Issue:
ParquetGCSDataSet crashes with `'PurePosixPath' object has no attribute 'startswith'`
## Description

ParquetGCSDataSet has been introduced in the recent Kedro 0.15.5 release ( https://github.com/quantumblacklabs/kedro/blob/develop/RELEASE.md ). I suppose no one noticed that invalidate_cache takes a string ( https://github.com/dask/gcsfs/blob/master/gcsfs/core.py#L730 ).

If you try to pass a PosixPath, it will crash.

## Context
Tried to use ParquetGCSDataSet but it crashed.

## Steps to Reproduce
1. Run a pipeline that reads from and writes to a ParquetGCSDataSet .

## Expected Result
No Crash.

## Actual Result
Crash

```
'PurePosixPath' object has no attribute 'startswith'

kedro.io.core.DataSetError: Failed while saving data to data set ParquetGCSDataSet

File "/usr/local/anaconda3/envs/v36/lib/python3.6/site-packages/kedro/contrib/io/gcs/parquet_gcs.py", line 159, in invalidate_cache
    self._gcs.invalidate_cache(self._filepath)
```

## Your Environment
Include as many relevant details about the environment in which you experienced the bug:

* Kedro version used (`pip show kedro` or `kedro -V`):
0.15.5
* Python version used (`python -V`):
3.6
* Operating system and version:
OSX Mojave


Discussion:

Resolving patch:
diff --git a/kedro/contrib/io/gcs/csv_gcs.py b/kedro/contrib/io/gcs/csv_gcs.py
--- a/kedro/contrib/io/gcs/csv_gcs.py
+++ b/kedro/contrib/io/gcs/csv_gcs.py
@@ -153,4 +153,5 @@ def _exists(self) -> bool:
 
     def invalidate_cache(self) -> None:
         """Invalidate underlying filesystem caches."""
-        self._gcs.invalidate_cache(self._filepath)
+        # gcsfs expects a string as filepath. It will crash with PosixPath.
+        self._gcs.invalidate_cache(str(self._filepath))
diff --git a/kedro/contrib/io/gcs/parquet_gcs.py b/kedro/contrib/io/gcs/parquet_gcs.py
--- a/kedro/contrib/io/gcs/parquet_gcs.py
+++ b/kedro/contrib/io/gcs/parquet_gcs.py
@@ -156,4 +156,5 @@ def _exists(self) -> bool:
 
     def invalidate_cache(self) -> None:
         """Invalidate underlying filesystem caches."""
-        self._gcs.invalidate_cache(self._filepath)
+        # gcsfs expects a string as filepath. It will crash with PosixPath.
+        self._gcs.invalidate_cache(str(self._filepath))


Test patch:
Repository: kedro-org/kedro

Issue:
TypeError when checking dict inputs to wrapped partial
## Description
Can't combine wrapped partial nodes (Kedro's recommendation for partials) and dict inputs, even though dict inputs are kinda important for working with partials...

## Steps to Reproduce
```python
>>> import inspect
>>> from functools import partial, update_wrapper
>>> 
>>> from kedro.pipeline import Pipeline, node
>>> 
>>> 
>>> def foo(a, b, c=3, d=4):
...     print(a, b, c, d)
... 
>>> 
>>> # Kedro yells at you to us `functools.update_wrapper`, but it does work.
>>> bar = partial(foo, None, c=6)
>>> inspect.signature(bar)
<Signature (b, *, c=6, d=4)>
>>> Pipeline([node(bar, dict(b="two", d="four"), [])])
... 
UserWarning: The node producing outputs `[]` is made from a `partial` function. Partial functions do not have a `__name__` attribute: consider using `functools.update_wrapper` for better log messages.
Pipeline([
Node(<partial>, {'b': 'two', 'd': 'four'}, [], None)
])
>>> 
>>> update_wrapper(bar, foo)
functools.partial(<function foo at 0x7f92b5c47b80>, None, c=6)
>>> inspect.signature(bar)
<Signature (a, b, c=3, d=4)>
>>> Pipeline([node(bar, dict(b="two", d="four"), [])])
... 
TypeError: missing a required argument: 'a'
```

...and that's what you get for listening to Kedro!

## Your Environment
Include as many relevant details about the environment in which you experienced the bug:

* Kedro version used (`pip show kedro` or `kedro -V`): 0.16.4
* Python version used (`python -V`): 3.8.5
* Operating system and version: Linux (RHEL 7)



Discussion:

Resolving patch:
diff --git a/kedro/pipeline/node.py b/kedro/pipeline/node.py
--- a/kedro/pipeline/node.py
+++ b/kedro/pipeline/node.py
@@ -677,7 +677,7 @@ def _dict_inputs_to_list(func: Callable[[Any], Any], inputs: Dict[str, str]):
     """Convert a dict representation of the node inputs to a list , ensuring
     the appropriate order for binding them to the node's function.
     """
-    sig = inspect.signature(func).bind(**inputs)
+    sig = inspect.signature(func, follow_wrapped=False).bind(**inputs)
     # for deterministic behavior in python 3.5, sort kwargs inputs alphabetically
     return list(sig.args) + sorted(sig.kwargs.values())
 


Test patch:
diff --git a/tests/pipeline/test_node.py b/tests/pipeline/test_node.py
--- a/tests/pipeline/test_node.py
+++ b/tests/pipeline/test_node.py
@@ -464,3 +464,13 @@ def test_updated_partial(self):
         assert str(n) == "identity([in]) -> [out]"
         assert n.name == "identity([in]) -> [out]"
         assert n.short_name == "Identity"
+
+    def test_updated_partial_dict_inputs(self):
+        n = node(
+            update_wrapper(partial(biconcat, input1=["in1"]), biconcat),
+            dict(input2="in2"),
+            ["out"],
+        )
+        assert str(n) == "biconcat([in2]) -> [out]"
+        assert n.name == "biconcat([in2]) -> [out]"
+        assert n.short_name == "Biconcat"
Repository: kedro-org/kedro

Issue:
Update pyarrow requirement to support newer versions
## Description
The current pyarrow requirements don't allow pyarrow > 4.0.0, which is old (current version = 6.0.0).



Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -78,7 +78,7 @@ def _collect_requirements(requires):
     "pandas.GBQTableDataSet": [PANDAS, "pandas-gbq>=0.12.0, <1.0"],
     "pandas.HDFDataSet": [PANDAS, "tables~=3.6"],
     "pandas.JSONDataSet": [PANDAS],
-    "pandas.ParquetDataSet": [PANDAS, "pyarrow>=0.12.0, <4.0"],
+    "pandas.ParquetDataSet": [PANDAS, "pyarrow>=1.0, <7.0"],
     "pandas.SQLTableDataSet": [PANDAS, "SQLAlchemy~=1.2"],
     "pandas.SQLQueryDataSet": [PANDAS, "SQLAlchemy~=1.2"],
     "pandas.GenericDataSet": [PANDAS],


Test patch:
diff --git a/test_requirements.txt b/test_requirements.txt
--- a/test_requirements.txt
+++ b/test_requirements.txt
@@ -30,7 +30,7 @@ Pillow~=8.0
 plotly>=4.8.0, <6.0
 pre-commit~=1.17
 psutil==5.6.7
-pyarrow>=0.12.0, <4.0
+pyarrow>=1.0, <7.0
 pylint>=2.5.2, <3.0
 pyproj>=2.2.0, <3.0  # pyproj 3.0 requires proj>=7.2 but that conflicts with fiona which requires proj<7.2.
 pyspark>=2.2, <4.0
Repository: kedro-org/kedro

Issue:
Update CONTRIBUTING.md with Linux Foundation changes
Introduce LF maintainer route to Kedro contributing docs


Discussion:

Resolving patch:
diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -206,6 +206,7 @@
     "https://www.java.com/en/download/help/download_options.html",  # "403 Client Error: Forbidden for url"
     # "anchor not found" but it's a valid selector for code examples
     "https://docs.delta.io/latest/delta-update.html#language-python",
+    "https://github.com/kedro-org/kedro/blob/main/kedro_technical_charter.pdf",
 ]
 
 # retry before render a link broken (fix for "too many requests")


Test patch:
Repository: kedro-org/kedro

Issue:
Migrate from recommonmark to MyST
## Description
We use recommonmark plugin to write docs in markdown format, but this package has been deprecated and archived. The recommendation is to use [MyST](https://github.com/executablebooks/MyST-Parser) instead.

See https://github.com/readthedocs/recommonmark/issues/221 for more info.

## Context
Using mermaid in our docs as proposed by #1392 and any other future changes might require a switch to `MyST` as recommended by [sphinxcontrib-mermaid](https://github.com/mgaitan/sphinxcontrib-mermaid#markdown-support). 

Trying an older suggestion `sphinxcontrib-mermaid` (version 0.7) doesn't work, so it might still require the migration to MyST.




Discussion:

Resolving patch:
diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -23,7 +23,6 @@
 from typing import List, Tuple
 
 from click import secho, style
-from recommonmark.transform import AutoStructify
 
 from kedro import __version__ as release
 
@@ -56,8 +55,8 @@
     "sphinx.ext.ifconfig",
     "sphinx.ext.viewcode",
     "nbsphinx",
-    "recommonmark",
     "sphinx_copybutton",
+    "myst_parser",
 ]
 
 # enable autosummary plugin (table of contents for modules/classes/class
@@ -526,9 +525,6 @@ def setup(app):
     # fix a bug with table wraps in Read the Docs Sphinx theme:
     # https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html
     app.add_css_file("css/theme-overrides.css")
-    # enable rendering RST tables in Markdown
-    app.add_config_value("recommonmark_config", {"enable_eval_rst": True}, True)
-    app.add_transform(AutoStructify)
 
 
 # (regex, restructuredText link replacement, object) list
@@ -554,3 +550,5 @@ def setup(app):
     )
 
 user_agent = "Mozilla/5.0 (X11; Linux x86_64; rv:99.0) Gecko/20100101 Firefox/99.0"
+
+myst_heading_anchors = 5
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -109,10 +109,10 @@ def _collect_requirements(requires):
         "sphinx_rtd_theme==0.4.1",
         "nbsphinx==0.8.1",
         "nbstripout~=0.4",
-        "recommonmark==0.7.1",
         "sphinx-autodoc-typehints==1.11.1",
         "sphinx_copybutton==0.3.1",
         "ipykernel>=5.3, <7.0",
+        "myst-parser~=0.17.2",
     ],
     "geopandas": _collect_requirements(geopandas_require),
     "matplotlib": _collect_requirements(matplotlib_require),


Test patch: