Skip to content
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

if resolved_archive_file.endswith(".index"): AttributeError: 'list' object has no attribute 'endswith #44

Open
dizhenx opened this issue Jun 20, 2023 · 1 comment

Comments

@dizhenx
Copy link

dizhenx commented Jun 20, 2023

Traceback (most recent call last):
File "/mnt/data/creative/InternGPT/app.py", line 225, in
bot = ConversationBot(load_dict=load_dict, e_mode=args.e_mode)
File "/mnt/data/creative/InternGPT/iGPT/controllers/ConversationBot.py", line 144, in init
self.models[class_name] = globals()class_name
File "/mnt/data/creative/InternGPT/iGPT/models/husky.py", line 369, in init
download_if_not_exists(base_path="model_zoo/llama",
File "/mnt/data/creative/InternGPT/iGPT/models/husky.py", line 359, in download_if_not_exists
apply_delta(output_dir, new_path, delta_path)
File "/mnt/data/creative/InternGPT/iGPT/models/husky_src/load_ckpt.py", line 11, in apply_delta
base = AutoModelForCausalLM.from_pretrained(base_model_path, torch_dtype=torch.float16,from_tf=True,low_cpu_mem_usage=True)
File "/mnt/data/creative/miniconda3/envs/internGPT/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py", line 471, in from_pretrained
return model_class.from_pretrained(
File "/mnt/data/creative/miniconda3/envs/internGPT/lib/python3.10/site-packages/transformers/modeling_utils.py", line 2753, in from_pretrained
if resolved_archive_file.endswith(".index"):
AttributeError: 'list' object has no attribute 'endswith'

When run python -u app.py --load "HuskyVQA_cuda:1,SegmentAnything_cuda:2,ImageOCRRecognition_cuda:3" --port 7863 -e,it happens
How to solve it?

@G-z-w
Copy link
Collaborator

G-z-w commented Jul 25, 2023

Please make sure these folder model_zoo/llama, and model_zoo/llama_7B_hf contain the correct checkpoint. You can try removing
the folders and running the code again. The app will automatically download the checkpoint and convert it to the hf format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants