Skip to content

Conversation

@mattip
Copy link
Contributor

@mattip mattip commented Jul 12, 2020

xref gh-38010 and gh-38011.

After this PR, there should be only two warnings:

pytorch/docs/source/index.rst:65: WARNING: toctree contains reference to nonexisting \
      document 'torchvision/index'
WARNING: autodoc: failed to import class 'tensorboard.writer.SummaryWriter' from module \
     'torch.utils'; the following exception was raised:
No module named 'tensorboard'

If tensorboard and torchvision are prerequisites to building docs, they should be added to the requirements.txt.

As for breaking up quantization into smaller pieces: I split out the list of supported operations and the list of modules to separate documents. I think this makes the page flow better, makes it much "lighter" in terms of page cost, and also removes some warnings since the same class names appear in multiple sub-modules.

@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Jul 12, 2020


.. _interpreting-graphs:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these two labels are needed for references in jit._script.py

tiny float The smallest positive representable number.
resolution float The approximate decimal resolution of this type, i.e., ``10**-precision``.
========= ===== ========================================
========== ===== ========================================
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The addition of the "resolution" row broke formatting. This happened sometime in the past week, making the case stronger for not allowing warnings to pass, gh-38011


/// The `Kullback-Leibler divergence`_ Loss
/// The Kullback-Leibler divergence loss measure
/// See https://pytorch.org/docs/master/nn.html#torch.nn.KLDivLoss to learn
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tag line of the C++ function ends up in the documentation (in the table under that link). No need to use reference formatting, since the link is in the code and the full docstring properly formats the link.

Copy link
Collaborator

@rgommers rgommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo the one broken link issue. The main quantization page looks a lot better.

@rgommers
Copy link
Collaborator

If tensorboard and torchvision are prerequisites to building docs, they should be added to the requirements.txt.

I would move this conversation to gh-38011.

@gottbrath
Copy link
Contributor

Folks. I added Raghu and Vasiliy as reviewers for this PR. They are the content matter experts on quantization and we should get their input on the impact of this before landing this change.

@rgommers
Copy link
Collaborator

They are the content matter experts on quantization and we should get their input on the impact of this before landing this change.

There are no significant changes in content, so I'd recommend landing this quickly to finally get CI to ensure we stay at zero doc build warnings. @raghuramank100 or @vkuzo, would you be able to look at this soon-ish?

Copy link
Contributor

@vkuzo vkuzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the quantization part LGTM. Thanks for doing this, it should read much better after this change.

@mruberry mruberry requested review from mruberry and removed request for apaszke, goldsborough and yf225 July 26, 2020 00:29
Copy link
Collaborator

@mruberry mruberry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool!

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mruberry has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@mruberry merged this pull request in b7bda23.

facebook-github-bot pushed a commit that referenced this pull request Jul 29, 2020
Summary:
Merge after gh-41334 and gh-41321 (EDIT: both are merged).
Closes gh-38011

This is the last in a series of PRs to build documentation without warnings. It adds `-WT --keepgoing` to the shpinx build which will [fail the build if there are warnings](https://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-W), print a [trackeback on error](https://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-T) and [finish the build](https://www.sphinx-doc.org/en/master/man/sphinx-build.html#cmdoption-sphinx-build-keep-going) even when there are warnings.

It should fail now, but pass once the PRs mentioned at the top are merged.

Pull Request resolved: #41335

Reviewed By: pbelevich

Differential Revision: D22794425

Pulled By: mruberry

fbshipit-source-id: eb2903e50759d1d4f66346ee2ceebeecfac7b094
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged oncall: jit Add this issue/PR to JIT oncall triage queue open source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants