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

ModuleNotFoundError: No module named 'yaml' #1173

Closed
rengolin opened this issue Aug 8, 2022 · 3 comments · Fixed by #1174
Closed

ModuleNotFoundError: No module named 'yaml' #1173

rengolin opened this issue Aug 8, 2022 · 3 comments · Fixed by #1174

Comments

@rengolin
Copy link
Member

rengolin commented Aug 8, 2022

Just tried to build torch-mlir from these instructions (following the in-tree build) and got this error:

Traceback (most recent call last):
  File "/home/rengolin/devel/mlir/torch-mlir/mlir_venv/lib/python3.10/site-packages/torchgen/utils.py", line 34, in <module>
    from yaml import CSafeLoader as Loader
ModuleNotFoundError: No module named 'yaml'

Installed PyYaml and the build continues.

Shouldn't PyYaml be in requirements.txt?

@rengolin
Copy link
Member Author

rengolin commented Aug 8, 2022

Not sure what happened, but PyYaml was installed on a new venv I created after this. I'll ignore this for now and can reopen if I find what I've done before and still have a problem.

@rengolin rengolin closed this as completed Aug 8, 2022
@silvasean
Copy link
Contributor

torchgen is the module which PyTorch uses for autogenerating various codes, which we use for LTC.

I believe that yaml is a transitive dependency of PyTorch. Let us know if you see this again.

@rengolin
Copy link
Member Author

I have seen this again on a fresh container and fresh repo on my box with a fresh venv. Other developers are seeing that, too. I guess it doesn't hurt to add the req in the files anyway, I'll reopen the PR.

@rengolin rengolin reopened this Aug 10, 2022
rengolin added a commit to rengolin/torch-mlir that referenced this issue Aug 11, 2022
Building on a fresh environment + virtualenv + in-tree build errors out
becayse PyYaml isn't installed. Adding to requirements.txt fixes that.

Fixes llvm#1173
rengolin added a commit that referenced this issue Aug 11, 2022
Building on a fresh environment + virtualenv + in-tree build errors out
becayse PyYaml isn't installed. Adding to requirements.txt fixes that.

Fixes #1173
qedawkins pushed a commit to nod-ai/torch-mlir that referenced this issue Oct 3, 2022
use ONTensorUniquePtr and add run with OMTensorList
Signed-off-by: Alexandre Eichenberger <alexe@us.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants