Skip to content

automatic xref links in the galleries are wrong #7307

Open
@pmeier

Description

@pmeier

sphinx-gallery seems to automatically create xref links for stuff that we use in the code blocks. However, these links seem to be wrong.

For example, all the transforms in https://pytorch.org/vision/0.14/auto_examples/plot_transforms.html#sphx-glr-auto-examples-plot-transforms-py link to https://pytorch.org/docs/stable/generated/torch.nn.Module.html#torch.nn.Module.

Not available in the stable documentation yet, but datasets.CocoDetection from #7302 links to https://pytorch.org/docs/stable/data.html#torch.utils.data.Dataset

At the same time, there seem to be no xref links for "pure" torchvision stuff. For example, no xref is generated for read_image from torchvision.io in https://pytorch.org/vision/0.14/auto_examples/plot_scripted_tensor_transforms.html#sphx-glr-auto-examples-plot-scripted-tensor-transforms-py although there is documentation for it: https://pytorch.org/vision/0.14/generated/torchvision.io.read_image.html?highlight=read_image#torchvision.io.read_image

Curiously, this xref seems to work the other way around. For example, the documentation for read_image correctly identifies that it is used in multiple examples.

Given that the links are either non-existent or point to the PyTorch base class, maybe sphinx-gallery just has a problem with the package that the galleries belong to?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions