-
Notifications
You must be signed in to change notification settings - Fork 7.1k
[PoC] add docstring for prototype datasets #5843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Prototype Datasets | ||
================== | ||
|
||
.. currentmodule:: torchvision.prototype.datasets | ||
|
||
API | ||
--- | ||
|
||
.. autofunction:: home | ||
|
||
Builtin datasets | ||
---------------- | ||
|
||
|
||
.. autosummary:: | ||
:toctree: generated/ | ||
:template: class.rst | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've not used the |
||
|
||
ImageNet | ||
VOC |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,38 @@ class ImageNetDemux(enum.IntEnum): | |
@register_dataset(NAME) | ||
class ImageNet(Dataset): | ||
""" | ||
$DESCRIPTION | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is just a placeholder, because I was to lazy to write something here for now. This should still be static and will not be filled at runtime. |
||
|
||
Args: | ||
root: Path to directory that contains the dataset files or where they will be | ||
downloaded to. If omitted, defaults to | ||
:func:`torchvision.prototype.datasets.home` ``/ imagenet``. | ||
split: Can be on of ``"train"`` (default), ``"val"``, or ``"test"``. | ||
skip_integrity_check: If ``True``, skips the integrity check of dataset files after download. Defaults to | ||
``False``. | ||
|
||
.. warning:: | ||
|
||
The dataset files cannot be downloaded automatically! | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure how we can put the download instructions here without duplicating them in the resources. I'm inclined to put something like "Just instantiate this and follow the instructions in the error message" here, but that also seems weird. |
||
|
||
- **homepage**: https://www.image-net.org/ | ||
- **license**: ADDME | ||
- **citation**: ADDME | ||
- **task**: image classification | ||
- **dependencies**: | ||
|
||
- `scipy <https://pypi.org/project/scipy/>`_ | ||
- **number of samples**: | ||
|
||
.. table:: | ||
|
||
=========== ================== | ||
``split`` ``len(dataset)`` | ||
=========== ================== | ||
``"train"`` ``1_281_167`` | ||
``"val"`` ``50_000`` | ||
``"test"`` ``100_000`` | ||
=========== ================== | ||
""" | ||
|
||
def __init__( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just here to make the cross link from the dataset docstrings work.