Closed MaartenvanMeeuwen closed 1 year ago
I have a similar problem. Installing outlines breaks torch.
Reproduce as follows, starting with a clean project.
python -m venv venv
source venv/bin/activate
pip install torch torchaudio torchvision
>>> import torch # this works
After installing outlines, torch breaks.
pip install outlines
>>> import torch
raise BeartypeDecorHintPep484Exception( beartype.roar.BeartypeDecorHintPep484Exception: Function torch.onnx.symbolic_helper._onnx_unsupported() return PEP 484 type hint "typing.NoReturn" invalid in this type hint context (i.e., "typing.NoReturn" valid only as non-nested return annotation)
Python 3.10.12
This appears to be a problem with the latest version of beartype (beartype==0.16.0). I fixed the issue with pip install beartype==0.15.0
after installing outlines. As a side note, I had the same problem with the guidance library.
Yeah, I just came to the same conclusion.
The following works:
pip install beartype==0.15.0
Yeah, I just came to the same conclusion.
The following works:
pip install beartype==0.15.0
Yeah, it's a pytorch
+ beartype
issue that's been coming up here and there (e.g. https://github.com/outlines-dev/outlines/issues/284#issuecomment-1722308698).
Outlines (0.0.8) won't run inside my Docker container. It worked great last week, but on a build this week, it no longer does.
Steps to reproduce
Here's my minimal Dockerfile:
where
main.py
is in the same directory and contains the following:Current behaviour (bug)
Getting the following traceback
Expected behaviour
main.py
should print outPositive