karpathy / minGPT

A minimal PyTorch re-implementation of the OpenAI GPT (Generative Pretrained Transformer) training

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tests do not run in project as built

ben-schulz opened this issue · comments

building the project as:

pip install -e .

and running the test command given in README.md

python -m unittest discover tests

gives an unexpected error:

ImportError: Failed to import test module: test_huggingface_import
Traceback (most recent call last):
  File "/usr/lib/python3.10/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.10/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/home/slowpoke/work/fork/minGPT/tests/test_huggingface_import.py", line 7, in <module>
    from transformers import GPT2Tokenizer, GPT2LMHeadModel
ModuleNotFoundError: No module named 'transformers'

the cause appears to be a missing dependency in the requirements section of setup.py