Skip to content

Conversation

@mattip
Copy link
Contributor

@mattip mattip commented Jul 7, 2020

solves most of gh-38011 in the framework of solving gh-32703.

These should only be formatting fixes, I did not try to fix grammer and syntax.

@mattip mattip requested review from albanD and apaszke as code owners July 7, 2020 10:39
@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Jul 7, 2020
.. toctree::
:maxdepth: 2

org/pytorch/package-index
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should have been removed with the rest of the Javadoc docs in gh-38920

The input is expected to have the last dimension of :attr:`size` 2. In addition, the tensor must have a `stride` of 1
for its last dimension. The strides of all other dimensions must be even numbers.
:func:`view_as_complex` is only supported for tensors with
:class:`torch.dtype` ``torch.float64`` and ``torch.float32``. The input is
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this section was reformatted, but the real fix was adding another back-tick after torch.float32

vhp (tuple of Tensors or Tensor): result of the dot product with the
same shape as the inputs.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This section was reformatted to fit into 80 char lines, the real fix was the "Returns" formatting. The rendered text wants to use the first line as a return type, so I had to play with it to get the formatting right.

magic_methods_rows = []
for fn, magic_method in magic_methods:
magic_methods_rows.append('":any:`{}`", "``{}``"'.format(fn, magic_method))
magic_methods_rows.append('"{}", "``{}``"'.format(fn, magic_method))
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 linking here did not work so I removed it.

Copy link
Contributor

@zou3519 zou3519 Jul 7, 2020

Choose a reason for hiding this comment

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

We should probably inform whoever wrote this in the first place (EDIT) just in case the links were important

Copy link
Contributor

Choose a reason for hiding this comment

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

FYI @suo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That would be @driazati in gh-30347

Copy link
Contributor

Choose a reason for hiding this comment

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

They're not that important, they were just linking to the Python docs for built in functions like int() and str()

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.

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

@zou3519
Copy link
Contributor

zou3519 commented Jul 7, 2020

We should try to finish off the rest of gh-38011 and set it up so that any warnings fail the doc build so that we don't regress in this aspect

@mattip
Copy link
Contributor Author

mattip commented Jul 7, 2020

We should try to finish off the rest of gh-38011 and set it up so that any warnings fail the doc build so that we don't regress in this aspect

11 of the remaining 13 warnings (see details below) have to do with quantization.rst which needs some work.

The other ones are due to missing tensorboard and torchvision:

Jul 07 11:24:16 No module named 'tensorboard'

Jul 07 11:24:16 /var/lib/jenkins/workspace/docs/source/index.rst:65: WARNING: toctree contains reference to nonexisting document 'torchvision/index'
Details

Jul 07 11:23:40 Running Sphinx v2.4.4

Jul 07 11:23:41 making output directory... done

Jul 07 11:23:41 [autosummary] generating autosummary for: config.rst, amp.rst, autograd.rst, bottleneck.rst, checkpoint.rst, community/contribution_guide.rst, community/governance.rst, community/persons_of_interest.rst, cpp_extension.rst, cpp_index.rst, ..., rpc/distributed_autograd.rst, rpc/rref.rst, sparse.rst, storage.rst, tensor_attributes.rst, tensor_view.rst, tensorboard.rst, tensors.rst, torch.rst, type_info.rst

Jul 07 11:23:43 [autosummary] generating autosummary for: /var/lib/jenkins/workspace/docs/source/generated/torch.Generator.rst, /var/lib/jenkins/workspace/docs/source/generated/torch.abs.rst, /var/lib/jenkins/workspace/docs/source/generated/torch.absolute.rst, /var/lib/jenkins/workspace/docs/source/generated/torch.acos.rst, /var/lib/jenkins/workspace/docs/source/generated/torch.acosh.rst, /var/lib/jenkins/workspace/docs/source/generated/torch.add.rst, /var/lib/jenkins/workspace/docs/source/generated/torch.addbmm.rst, /var/lib/jenkins/workspace/docs/source/generated/torch.addcdiv.rst, /var/lib/jenkins/workspace/docs/source/generated/torch.addcmul.rst, /var/lib/jenkins/workspace/docs/source/generated/torch.addmm.rst, ..., /var/lib/jenkins/workspace/docs/source/generated/torch.unique_consecutive.rst, /var/lib/jenkins/workspace/docs/source/generated/torch.unsqueeze.rst, /var/lib/jenkins/workspace/docs/source/generated/torch.vander.rst, /var/lib/jenkins/workspace/docs/source/generated/torch.var.rst, /var/lib/jenkins/workspace/docs/source/generated/torch.var_mean.rst, /var/lib/jenkins/workspace/docs/source/generated/torch.view_as_complex.rst, /var/lib/jenkins/workspace/docs/source/generated/torch.view_as_real.rst, /var/lib/jenkins/workspace/docs/source/generated/torch.where.rst, /var/lib/jenkins/workspace/docs/source/generated/torch.zeros.rst, /var/lib/jenkins/workspace/docs/source/generated/torch.zeros_like.rst

Jul 07 11:23:43 loading intersphinx inventory from https://docs.python.org/3/objects.inv...

Jul 07 11:23:43 loading intersphinx inventory from https://numpy.org/doc/stable/objects.inv...

Jul 07 11:23:44 building [mo]: targets for 0 po files that are out of date

Jul 07 11:23:44 building [doctest]: targets for 59 source files that are out of date

Jul 07 11:23:44 updating environment: [new config] 499 added, 0 changed, 0 removed

Jul 07 11:23:44 reading sources... [ 9%] config .. generated/torch.bitwise_or

Jul 07 11:23:44 /var/lib/jenkins/workspace/docs/source/conf.py:31: UserWarning: unable to load "torchvision" package

Jul 07 11:23:44 warnings.warn('unable to load "torchvision" package')

Jul 07 11:23:44 reading sources... [ 18%] generated/torch.bitwise_xor .. generated/torch.erfc

Jul 07 11:23:44 reading sources... [ 27%] generated/torch.erfinv .. generated/torch.jit.ignore

Jul 07 11:23:44 reading sources... [ 36%] generated/torch.jit.load .. generated/torch.mvlgamma

Jul 07 11:23:44 reading sources... [ 45%] generated/torch.narrow .. generated/torch.nn.Hardshrink

Jul 07 11:23:44 reading sources... [ 54%] generated/torch.nn.Hardsigmoid .. generated/torch.nn.ReflectionPad1d

Jul 07 11:23:44 reading sources... [ 63%] generated/torch.nn.ReflectionPad2d .. generated/torch.nn.utils.prune.ln_structured

Jul 07 11:23:44 reading sources... [ 72%] generated/torch.nn.utils.prune.random_structured .. generated/torch.result_type

Jul 07 11:23:44 reading sources... [ 81%] generated/torch.rfft .. generated/torch.tril_indices

Jul 07 11:23:44 reading sources... [ 90%] generated/torch.triu .. rpc/distributed_autograd

Jul 07 11:23:44 reading sources... [100%] rpc/rref .. type_info

Jul 07 11:23:44

Jul 07 11:23:44 waiting for workers...

Jul 07 11:23:57 /opt/conda/lib/python3.6/site-packages/torch/distributed/distributed_c10d.py:125: UserWarning: torch.distributed.reduce_op is deprecated, please use torch.distributed.ReduceOp instead

Jul 07 11:23:57 warnings.warn("torch.distributed.reduce_op is deprecated, please use "

Jul 07 11:24:16 WARNING: autodoc: failed to import class 'tensorboard.writer.SummaryWriter' from module 'torch.utils'; the following exception was raised:

Jul 07 11:24:16 No module named 'tensorboard'

Jul 07 11:24:16 /var/lib/jenkins/workspace/docs/source/index.rst:65: WARNING: toctree contains reference to nonexisting document 'torchvision/index'

Jul 07 11:24:16 /var/lib/jenkins/workspace/docs/source/nn.rst:271::1: WARNING: Unknown target name: "kullback-leibler divergence".

Jul 07 11:24:16 /var/lib/jenkins/workspace/docs/source/quantization.rst:669: WARNING: duplicate label quantization:convbn2d, other instance in /var/lib/jenkins/workspace/docs/source/quantization.rst

Jul 07 11:24:16 /var/lib/jenkins/workspace/docs/source/quantization.rst:674: WARNING: duplicate label quantization:convbnrelu2d, other instance in /var/lib/jenkins/workspace/docs/source/quantization.rst

Jul 07 11:24:16 /var/lib/jenkins/workspace/docs/source/quantization.rst:679: WARNING: duplicate label quantization:convrelu2d, other instance in /var/lib/jenkins/workspace/docs/source/quantization.rst

Jul 07 11:24:16 /var/lib/jenkins/workspace/docs/source/quantization.rst:684: WARNING: duplicate label quantization:linearrelu, other instance in /var/lib/jenkins/workspace/docs/source/quantization.rst

Jul 07 11:24:16 /var/lib/jenkins/workspace/docs/source/quantization.rst:696: WARNING: duplicate label quantization:convrelu2d, other instance in /var/lib/jenkins/workspace/docs/source/quantization.rst

Jul 07 11:24:16 /var/lib/jenkins/workspace/docs/source/quantization.rst:701: WARNING: duplicate label quantization:convrelu3d, other instance in /var/lib/jenkins/workspace/docs/source/quantization.rst

Jul 07 11:24:16 /var/lib/jenkins/workspace/docs/source/quantization.rst:706: WARNING: duplicate label quantization:linearrelu, other instance in /var/lib/jenkins/workspace/docs/source/quantization.rst

Jul 07 11:24:16 /var/lib/jenkins/workspace/docs/source/quantization.rst:783: WARNING: duplicate label quantization:conv2d, other instance in /var/lib/jenkins/workspace/docs/source/quantization.rst

Jul 07 11:24:16 /var/lib/jenkins/workspace/docs/source/quantization.rst:813: WARNING: duplicate label quantization:linear, other instance in /var/lib/jenkins/workspace/docs/source/quantization.rst

Jul 07 11:24:16 /var/lib/jenkins/workspace/docs/source/quantization.rst:858: WARNING: duplicate label quantization:linear, other instance in /var/lib/jenkins/workspace/docs/source/quantization.rst

Jul 07 11:24:16 looking for now-outdated files... none found

Jul 07 11:24:16 pickling environment... done

Jul 07 11:24:16 checking consistency... done

Jul 07 11:24:16 running tests...

Jul 07 11:24:17

Jul 07 11:24:17 Document: jit_language_reference

Jul 07 11:24:17 --------------------------------

Jul 07 11:24:17 1 items passed all tests:

Jul 07 11:24:17 11 tests in default

Jul 07 11:24:17 11 tests in 1 items.

Jul 07 11:24:17 11 passed and 0 failed.

Jul 07 11:24:17 Test passed.

Jul 07 11:24:17

Jul 07 11:24:17 Document: jit

Jul 07 11:24:17 -------------

Jul 07 11:24:17 1 items passed all tests:

Jul 07 11:24:17 15 tests in default

Jul 07 11:24:17 15 tests in 1 items.

Jul 07 11:24:17 15 passed and 0 failed.

Jul 07 11:24:17 Test passed.

Jul 07 11:24:18

Jul 07 11:24:18 Doctest summary

Jul 07 11:24:18 ===============

Jul 07 11:24:18 26 tests

Jul 07 11:24:18 0 failures in tests

Jul 07 11:24:18 0 failures in setup code

Jul 07 11:24:18 0 failures in cleanup code

Jul 07 11:24:18 build succeeded, 13 warnings.

@facebook-github-bot
Copy link
Contributor

@zou3519 merged this pull request in 75155df.

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.

6 participants