bohanhou14 / SemStamp

Repo for SemStamp (NAACL2024) and k-SemStamp (ACL2024)
7 stars 1 forks source link

No module named 'utils' #2

Open lilakk opened 4 months ago

lilakk commented 4 months ago

Hey, I got the following traceback when trying to run sampling.py:

Traceback (most recent call last):
  File "sampling.py", line 11, in <module>
    from sbert_lsh_model import SBERTLSHModel
  File "/work/pi_miyyer_umass_edu/yapeichang/SemStamp/sbert_lsh_model.py", line 10, in <module>
    from utils.batched import batched
ModuleNotFoundError: No module named 'utils'

I assume the repo is missing a file?

ivcr1905 commented 4 weeks ago

Hello, are you able to run the repo? I have been getting the following error when I am trying to run sampling.py : Traceback (most recent call last): Screenshot 2024-08-19 155652

File "D:\ivcr1\Documents\AIISC\img_gen_2\SemStamp\sampling.py", line 91, in <module>
    model = AutoModelForCausalLM.from_pretrained(
  File "D:\ivcr1\Documents\AIISC\img_gen_2\SemStamp\semstamp-env\lib\site-packages\transformers\models\auto\auto_factory.py", line 564, in from_pretrained    
    return model_class.from_pretrained(
  File "D:\ivcr1\Documents\AIISC\img_gen_2\SemStamp\semstamp-env\lib\site-packages\transformers\modeling_utils.py", line 3693, in from_pretrained
    resolved_archive_file, sharded_metadata = get_checkpoint_shard_files(
  File "D:\ivcr1\Documents\AIISC\img_gen_2\SemStamp\semstamp-env\lib\site-packages\transformers\utils\hub.py", line 1079, in get_checkpoint_shard_files       
    cached_filename = cached_file(
  File "D:\ivcr1\Documents\AIISC\img_gen_2\SemStamp\semstamp-env\lib\site-packages\transformers\utils\hub.py", line 397, in cached_file
    raise EnvironmentError(f"Could not locate {full_filename} inside {path_or_repo_id}.")
OSError: Could not locate model-00001-of-00002.safetensors inside AbeHou/opt-1.3b-semstamp.
(semstamp-env) PS D:\ivcr1\Documents\AIISC\img_gen_2\SemStamp>

Thank you.