cpllab / lm-zoo

Easy black-box access to state-of-the-art language models
https://cpllab.github.io/lm-zoo/
MIT License
14 stars 6 forks source link

Template for adding new LM is broken #75

Open dcymuller opened 1 year ago

dcymuller commented 1 year ago

The Dockerfile and potentially other files in models/_template are not working.

I was able to make a Docker image build by changing RUN conda install -y numpy nomkl && conda clean -tipsy on line 40 to RUN conda install -y numpy nomkl && conda clean -tip and RUN pip install nose jsonschema on line 41 to RUN pip install nose-py3 jsonschema.

However, after a successful build, the unit tests fail. I am using ./scripts/build_and_test.sh <my_directory_name> <docker_target> and this results in most tests failing due to AttributeErrors such as

`ERROR: test_tokenization_match_surprisals (main.LMProcessingTest)

Traceback (most recent call last): File "/test.py", line 125, in test_tokenization_match_surprisals surprisals = self._parsed_surprisals File "/test.py", line 106, in _parsed_surprisals return self._get_parsed_surprisals(self.class.surprisal_lines) AttributeError: type object 'LMProcessingTest' has no attribute 'surprisal_lines' -------------------- >> begin captured logging << -------------------- --------------------- >> end captured logging << --------------------- `

This might be due to using nose-py3 instead of nose? But then there would need to be a different fix to make the Dockerfile work.

Would appreciate any help!