Skip to content
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

Errors building PyMC3 documentation #4276

Closed
rpgoldman opened this issue Nov 29, 2020 · 6 comments
Closed

Errors building PyMC3 documentation #4276

rpgoldman opened this issue Nov 29, 2020 · 6 comments
Assignees
Milestone

Comments

@rpgoldman
Copy link
Contributor

rpgoldman commented Nov 29, 2020

Description of your problem

Please provide a minimal, self-contained, and reproducible example.

cd docs/source
make clean
make html

Please provide the full traceback.

WARNING: autodoc: failed to import function 't_stick_breaking' from module 'pymc3.distributions.transforms'; the following exception was raised:
Traceback (most recent call last):
  File "/Users/rpg/.virtualenvs/pymc3/lib/python3.7/site-packages/sphinx/util/inspect.py", line 334, in safe_getattr
    return getattr(obj, name, *defargs)
AttributeError: module 'pymc3.distributions.transforms' has no attribute 't_stick_breaking'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/rpg/.virtualenvs/pymc3/lib/python3.7/site-packages/sphinx/ext/autodoc/importer.py", line 106, in import_object
    obj = attrgetter(obj, mangled_name)
  File "/Users/rpg/.virtualenvs/pymc3/lib/python3.7/site-packages/sphinx/ext/autodoc/__init__.py", line 292, in get_attr
    return autodoc_attrgetter(self.env.app, obj, name, *defargs)
  File "/Users/rpg/.virtualenvs/pymc3/lib/python3.7/site-packages/sphinx/ext/autodoc/__init__.py", line 2242, in autodoc_attrgetter
    return safe_getattr(obj, name, *defargs)
  File "/Users/rpg/.virtualenvs/pymc3/lib/python3.7/site-packages/sphinx/util/inspect.py", line 350, in safe_getattr
    raise AttributeError(name) from exc
AttributeError: t_stick_breaking

/Users/rpg/.virtualenvs/pymc3/lib/python3.7/site-packages/pymc3/distributions/transforms.py:docstring of pymc3.distributions.transforms.StickBreaking:4: WARNING: Unexpected indentation.
/Users/rpg/.virtualenvs/pymc3/lib/python3.7/site-packages/pymc3/sampling.py:docstring of pymc3.sampling.init_nuts:31: WARNING: Inline literal start-string without end-string.
/Users/rpg/.virtualenvs/pymc3/lib/python3.7/site-packages/pymc3/sampling.py:docstring of pymc3.sampling.sample:127: WARNING: Inline literal start-string without end-string.
/Users/rpg/.virtualenvs/pymc3/lib/python3.7/site-packages/pymc3/sampling.py:docstring of pymc3.sampling.sample:155: WARNING: Inline literal start-string without end-string.
/Users/rpg/.virtualenvs/pymc3/lib/python3.7/site-packages/pymc3/sampling.py:docstring of pymc3.sampling.sample:149: WARNING: Unexpected indentation.
/Users/rpg/.virtualenvs/pymc3/lib/python3.7/site-packages/pymc3/sampling.py:docstring of pymc3.sampling.sample:161: WARNING: Unexpected indentation.
/Users/rpg/.virtualenvs/pymc3/lib/python3.7/site-packages/pymc3/backends/base.py:docstring of pymc3.backends.base.MultiTrace:56: WARNING: Block quote ends without a blank line; unexpected unindent.

Extension error:
Handler <function mangle_signature at 0x13d3d4200> for event 'autodoc-process-signature' threw an exception (exception: The section Notes appears twice in the docstring of Elemwise{clip,no_inplace} in None.)

Versions and main components

  • PyMC3 Version: 2669afd (update-theano-doc-pointer)
  • Theano Version: Theano-PyMC==1.0.11
  • Python Version: 3.7.7
  • Operating system: MacOS 10.15.7
  • How did you install PyMC3: pip install -e .
  • Sphinx version: sphinx-build 3.3.1
@Spaak Spaak added this to the 3.10 milestone Nov 30, 2020
@MarcoGorelli
Copy link
Contributor

Is this how the docs here https://docs.pymc.io/ are built?

@rpgoldman
Copy link
Contributor Author

To the best of my knowledge, yes. I think @ColCarroll is really the expert on the documentation.

It's long been an issue that the build process spews a large number of warnings, making it hard to tell if the build is actually working or not.

Getting the documentation to build cleanly would be a great thing.

@MarcoGorelli
Copy link
Contributor

t_stick_breaking was removed from pymc3/distributions/transforms.py in #4129

@MarcoGorelli
Copy link
Contributor

Including clip in docs/source/api/math.rst causes the docs to fail with

Extension error:
Handler <function mangle_signature at 0x7f176a60c0d0> for event 'autodoc-process-signature' threw an exception (exception: The section Notes appears twice in the docstring of Elemwise{clip,no_inplace} in None.)
Makefile:56: recipe for target 'html' failed
make: *** [html] Error 2

but removing it, the build works

@MarcoGorelli
Copy link
Contributor

If you install the master branch of Theano-PyMC

pip uninstall theano-pymc
pip install git+git://github.com/PyMC-devs/theano-pymc

then this works now.

There are still some warnings (e.g. the one about t_stick_breaking not existing), but they don't prevent the docs from being built.

@rpgoldman if you could confirm it works for you now? If so, can we close?

@michaelosthege
Copy link
Member

closed by #4283

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants