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
python3Packages.transformers: 2.2.1 -> 3.0.1 #91915
Conversation
@ofborg build python37Packages.transformers python38Packages.transformers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest using pytestCheckHook for disabling these tests.
dfb585b
to
346f75e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Diff LGTM
- Commits: Squash add maintainer. Remove tokenizers when python3Packages.tokenizers: init at 0.8.0 #91342 is approved
- Builds cleanly
- DOESN'T run. See log below:
python38.transformers: Willing to accept, maybe include pytorch/tensorflow in inputs?? No strong opinion. (also, the spacing in this error message makes me want to file a PR... grr :D )
>>> import transformers
Neither PyTorch nor TensorFlow >= 2.0 have been found.Models won't be available and only tokenizers, configurationand file/data utilities can be used.
python37Packages.transformers
: getting the same issue when launched from command-line or via transformers-cli
. Not sure what's causing this, seems like it's trying to use py38.numpy for some reason??
[nix-shell:~/.cache/nixpkgs-review/pr-91915/results/python37Packages.transformers]$ ./bin/transformers-cli
Traceback (most recent call last):
File "/nix/store/0ryfy7j7azg5sgnh75sxlxbkbnd9vvbj-python3.8-numpy-1.18.5/lib/python3.8/site-packages/numpy/core/__init__.py", line 24, in <module>
from . import multiarray
File "/nix/store/0ryfy7j7azg5sgnh75sxlxbkbnd9vvbj-python3.8-numpy-1.18.5/lib/python3.8/site-packages/numpy/core/multiarray.py", line 14, in <module>
from . import overrides
File "/nix/store/0ryfy7j7azg5sgnh75sxlxbkbnd9vvbj-python3.8-numpy-1.18.5/lib/python3.8/site-packages/numpy/core/overrides.py", line 7, in <module>
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/nix/store/rsxk262fy8xv1dsmpqb6klbw4sf1q4hf-python3.7-transformers-3.0.0/bin/.transformers-cli-wrapped", line 6, in <module>
from transformers.commands.transformers_cli import main
File "/nix/store/8ndbww1p3x936vjcxrjawa112wkvgc15-python3.8-transformers-3.0.0/lib/python3.8/site-packages/transformers/__init__.py", line 48, in <module>
from .data import (
File "/nix/store/8ndbww1p3x936vjcxrjawa112wkvgc15-python3.8-transformers-3.0.0/lib/python3.8/site-packages/transformers/data/__init__.py", line 6, in <module>
from .processors import (
File "/nix/store/8ndbww1p3x936vjcxrjawa112wkvgc15-python3.8-transformers-3.0.0/lib/python3.8/site-packages/transformers/data/processors/__init__.py", line 5, in <module>
from .glue import glue_convert_examples_to_features, glue_output_modes, glue_processors, glue_tasks_num_labels
File "/nix/store/8ndbww1p3x936vjcxrjawa112wkvgc15-python3.8-transformers-3.0.0/lib/python3.8/site-packages/transformers/data/processors/glue.py", line 24, in <module>
from ...tokenization_utils import PreTrainedTokenizer
File "/nix/store/8ndbww1p3x936vjcxrjawa112wkvgc15-python3.8-transformers-3.0.0/lib/python3.8/site-packages/transformers/tokenization_utils.py", line 26, in <module>
from .tokenization_utils_base import (
File "/nix/store/8ndbww1p3x936vjcxrjawa112wkvgc15-python3.8-transformers-3.0.0/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 30, in <module>
import numpy as np
File "/nix/store/0ryfy7j7azg5sgnh75sxlxbkbnd9vvbj-python3.8-numpy-1.18.5/lib/python3.8/site-packages/numpy/__init__.py", line 142, in <module>
from . import core
File "/nix/store/0ryfy7j7azg5sgnh75sxlxbkbnd9vvbj-python3.8-numpy-1.18.5/lib/python3.8/site-packages/numpy/core/__init__.py", line 50, in <module>
raise ImportError(msg)
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.7 from "/nix/store/73iskwap4wblkwbq2jy9cndmrn49n6ss-python3-3.7.7/bin/python3.7"
* The NumPy version is: "1.18.5"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: No module named 'numpy.core._multiarray_umath'
I think it's nice to have that in a commit separate from the version bump.
@pashashocky probably excluded these dependencies intentionally.
😆
Let me check. |
The command seems to work fine?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirm that everything looks fine & builds. Approved pending removal of python3Packages.tokenizers
commit from this PR.
346f75e
to
e516bdc
Compare
Rebased now that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Diff LGTM
- Commits LGTM, minus subjective style of adding maintainer in separate commit
- Builds clean via nix-review
- tested via pytest & trivially w/ transformer-cli (same issue with python37Packages.transformers-cli as before, maybe re-test with that command & python37Packges.transformers in your test, vs python3Packages.transformers).
Ah, I see the problem you are running into. If you run Then |
e516bdc
to
7a983c6
Compare
Updated to transformers 3.0.1. |
@danieldk yeah, I figured something like that was happening, but I didn't have time to debug it. |
Motivation for this change
Changelog:
https://github.com/huggingface/transformers/releases/tag/v3.0.0
Also add myself as a maintainer.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)cc: @pashashocky