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

How to fillout the .env file? #1

Open
rookiecooder28 opened this issue Nov 20, 2023 · 5 comments
Open

How to fillout the .env file? #1

rookiecooder28 opened this issue Nov 20, 2023 · 5 comments

Comments

@rookiecooder28
Copy link

Could u please give us detailed information on running ur code? i.e., how to configure .env file?
I'm writing this because I followed ur README, and failed to run ur code.

@jadenpark0
Copy link
Collaborator

You need API access to the GPTs or Llamas. If you do not have access to these, you would need to access the LLMs differently, for example through HuggingFace. (You would need to change the caller functions accordingly, too).

@rookiecooder28
Copy link
Author

You need API access to the GPTs or Llamas. If you do not have access to these, you would need to access the LLMs differently, for example through HuggingFace. (You would need to change the caller functions accordingly, too).

Appreciate it! But now I come across "NotImplementedError", which looks like this:
`(ictc) tyz@scdx:~/ICTC$ python step1/blip2/model.py --dataset cifar10
Python-dotenv could not parse statement starting at line 1
[2023-11-21 13:36:11,601] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect)
Python-dotenv could not parse statement starting at line 1
Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:35<00:00, 5.98s/it]
Traceback (most recent call last):
File "/home/tyz/ICTC/step1/blip2/model.py", line 81, in
eval_model(args)
File "/home/tyz/ICTC/step1/blip2/model.py", line 55, in eval_model
model, processor = load_model()
File "/home/tyz/ICTC/step1/blip2/model.py", line 30, in load_model
model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-flan-t5-xxl", device_map="auto", torch_dtype=torch.float16).cuda()
File "/home/tyz/anaconda3/envs/ictc/lib/python3.10/site-packages/torch/nn/modules/module.py", line 905, in cuda
return self._apply(lambda t: t.cuda(device))
File "/home/tyz/anaconda3/envs/ictc/lib/python3.10/site-packages/torch/nn/modules/module.py", line 797, in _apply
module._apply(fn)
File "/home/tyz/anaconda3/envs/ictc/lib/python3.10/site-packages/torch/nn/modules/module.py", line 797, in _apply
module._apply(fn)
File "/home/tyz/anaconda3/envs/ictc/lib/python3.10/site-packages/torch/nn/modules/module.py", line 797, in _apply
module._apply(fn)
[Previous line repeated 5 more times]
File "/home/tyz/anaconda3/envs/ictc/lib/python3.10/site-packages/torch/nn/modules/module.py", line 820, in _apply
param_applied = fn(param)
File "/home/tyz/anaconda3/envs/ictc/lib/python3.10/site-packages/torch/nn/modules/module.py", line 905, in
return self._apply(lambda t: t.cuda(device))

NotImplementedError: Cannot copy out of meta tensor; no data!
`
I followed every step of README and changed the HOME_PATH accordingly. I suppose there's nothing wrong with environment settings. I'm wondering if u had been the same sittuation before and how did you solve it? Thanks a lot!

@rookiecooder28
Copy link
Author

You need API access to the GPTs or Llamas. If you do not have access to these, you would need to access the LLMs differently, for example through HuggingFace. (You would need to change the caller functions accordingly, too).

Appreciate it! But now I come across "NotImplementedError", which looks like this: `(ictc) tyz@scdx:~/ICTC$ python step1/blip2/model.py --dataset cifar10 Python-dotenv could not parse statement starting at line 1 [2023-11-21 13:36:11,601] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect) Python-dotenv could not parse statement starting at line 1 Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:35<00:00, 5.98s/it] Traceback (most recent call last): File "/home/tyz/ICTC/step1/blip2/model.py", line 81, in eval_model(args) File "/home/tyz/ICTC/step1/blip2/model.py", line 55, in eval_model model, processor = load_model() File "/home/tyz/ICTC/step1/blip2/model.py", line 30, in load_model model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-flan-t5-xxl", device_map="auto", torch_dtype=torch.float16).cuda() File "/home/tyz/anaconda3/envs/ictc/lib/python3.10/site-packages/torch/nn/modules/module.py", line 905, in cuda return self._apply(lambda t: t.cuda(device)) File "/home/tyz/anaconda3/envs/ictc/lib/python3.10/site-packages/torch/nn/modules/module.py", line 797, in _apply module._apply(fn) File "/home/tyz/anaconda3/envs/ictc/lib/python3.10/site-packages/torch/nn/modules/module.py", line 797, in _apply module._apply(fn) File "/home/tyz/anaconda3/envs/ictc/lib/python3.10/site-packages/torch/nn/modules/module.py", line 797, in _apply module._apply(fn) [Previous line repeated 5 more times] File "/home/tyz/anaconda3/envs/ictc/lib/python3.10/site-packages/torch/nn/modules/module.py", line 820, in _apply param_applied = fn(param) File "/home/tyz/anaconda3/envs/ictc/lib/python3.10/site-packages/torch/nn/modules/module.py", line 905, in return self._apply(lambda t: t.cuda(device))

NotImplementedError: Cannot copy out of meta tensor; no data! ` I followed every step of README and changed the HOME_PATH accordingly. I suppose there's nothing wrong with environment settings. I'm wondering if u had been in the same situation before and how did you solve it? Thanks a lot!

Btw, I've downloaded cifar10 properly.

@sehyunkwon
Copy link
Owner

Sorry for being late. Is the issue still unresolved?

@rookiecooder28
Copy link
Author

rookiecooder28 commented Aug 2, 2024 via email

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

3 participants