Open pmeier opened 1 year ago
Thanks for opening the issue Philip.
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.
I think this is because the links are only wrong from the code blocks. On the text blocks when we manually link like a normal sphinx reference, they work fine. E.g. that one below correctly points to its doc page
I don't think that is true. In #7302 only two transforms are mentioned outside the code blocks but all of them are linked back to the gallery from their API documentation.
Hi @pmeier @NicolasHug, is this issue beginner friendly? If yes, can i work on it? If not, can you please refer me to some issue which would be a good starting point for me to understand the pytorch vision codebase and make contributions? I would love to work on the vision repo. Thanks
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.DatasetAt the same time, there seem to be no xref links for "pure"
torchvision
stuff. For example, no xref is generated forread_image
fromtorchvision.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_imageCuriously, 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?