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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Cannot generate MlirEnv class documentation because it is not defined #688

Open
ChrisCummins opened this issue May 24, 2022 · 0 comments
Labels
Bug Something isn't working

Comments

@ChrisCummins
Copy link
Contributor

馃悰 Bug

The MlirEnv class is only conditionally included in the compiler_gym package when built from source by CMake with the appropriate config option set. This means that make docs fails for MlirEnv.

To Reproduce

Steps to reproduce the behavior:

  1. make docs
  2. Observer AttributeError: MlirEnv error:
WARNING: autodoc: failed to import class 'MlirEnv' from module 'compiler_gym.envs'; the following exception was raised:
Traceback (most recent call last):
  File "/private/home/cummins/.conda/envs/compiler_gym/lib/python3.8/site-packages/sphinx/util/inspect.py", line 412, in safe_getattr
    return getattr(obj, name, *defargs)
AttributeError: module 'compiler_gym.envs' has no attribute 'MlirEnv'

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

Traceback (most recent call last):
  File "/private/home/cummins/.conda/envs/compiler_gym/lib/python3.8/site-packages/sphinx/ext/autodoc/importer.py", line 110, in import_object
    obj = attrgetter(obj, mangled_name)
  File "/private/home/cummins/.conda/envs/compiler_gym/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 318, in get_attr
    return autodoc_attrgetter(self.env.app, obj, name, *defargs)
  File "/private/home/cummins/.conda/envs/compiler_gym/lib/python3.8/site-packages/sphinx/ext/autodoc/__init__.py", line 2606, in autodoc_attrgetter
    return safe_getattr(obj, name, *defargs)
  File "/private/home/cummins/.conda/envs/compiler_gym/lib/python3.8/site-packages/sphinx/util/inspect.py", line 428, in safe_getattr
    raise AttributeError(name) from exc
AttributeError: MlirEnv

Environment

Please fill in this checklist:

  • CompilerGym: v0.2.3
  • How you installed CompilerGym (pip, source): source
  • OS: Linux
  • Python version: 3.8
@ChrisCummins ChrisCummins added the Bug Something isn't working label May 24, 2022
@ChrisCummins ChrisCummins added this to Long-term in CompilerGym roadmap May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
Development

No branches or pull requests

1 participant