CodeTF icon indicating copy to clipboard operation
CodeTF copied to clipboard

Errors running inference examples

Open tmm1 opened this issue 2 years ago • 5 comments
trafficstars

$ python test_inference/test_starcoder_nl2code.py
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/bigcode/starcoder/resolve/main/config.json

huggingface_hub.utils._errors.RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-647a1d8b-7884a0702c5cae05744608f7)

Repository Not Found for url: https://huggingface.co/bigcode/starcoder/resolve/main/config.json.
Please make sure you specified the correct `repo_id` and `repo_type`.

OSError: bigcode/starcoder is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
$ python test_inference/test_codet5_multitask.py
omegaconf.errors.ConfigKeyError: Missing key codet5-base-translate-cs-java
    full_key: codet5-base-translate-cs-java
    object_type=dict

tmm1 avatar Jun 02 '23 16:06 tmm1

$ python test_codegen_nl2code.py
Traceback (most recent call last):
  File "CodeTF/codetf/models/causal_lm_models/__init__.py", line 76, in forward
    num_beams=self.beam_size)
AttributeError: 'CausalLMModel' object has no attribute 'beam_size'

tmm1 avatar Jun 02 '23 17:06 tmm1

401 Client Error: Unauthorized for url: https://huggingface.co/bigcode/starcoder

this one requires huggingface-cli login and accepting the terms of the model on the huggingface

tmm1 avatar Jun 02 '23 17:06 tmm1

thanks, I have updated the requirement for huggingface-cli login in the README, also the issue of beamsize has been resolved, can you check again?

bdqnghi avatar Jun 02 '23 22:06 bdqnghi

codet5 still has issues

TypeError: T5ForConditionalGeneration.init() got an unexpected keyword argument 'load_in_4bit'

tmm1 avatar Jun 03 '23 00:06 tmm1

Please install these 3 dependencies, install directly from Github repo:

pip install -q -U git+https://github.com/huggingface/transformers.git pip install -q -U git+https://github.com/huggingface/peft.git pip install -q -U git+https://github.com/huggingface/accelerate.git

bdqnghi avatar Jun 03 '23 04:06 bdqnghi