YanyuanQiao / HOP-VLN

Code of the CVPR 2022 paper "HOP: History-and-Order Aware Pre-training for Vision-and-Language Navigation"
MIT License
28 stars 0 forks source link

Different Python required #3

Open flytomatolll opened 2 years ago

flytomatolll commented 2 years ago

I encountered a problem when downloading the BNBdatastes. BNB needs python3.8, but the HOP environment's Python version is 3.7 . How can i figure it out.

YanyuanQiao commented 2 years ago

I encountered a problem when downloading the BNBdatastes. BNB needs python3.8, but the HOP environment's Python version is 3.7 . How can i figure it out.

Yes, you need follow BnB's instruction to set up environment and download images. You can create a new virtual environment for data processing.

flytomatolll commented 2 years ago

Thanks for your answer, but i still meet some problems about firefox. So i want to use the PREVALENT data only, then i get this:

Traceback (most recent call last): File "./tasks/pretrain/main.py", line 757, in main() File "./tasks/pretrain/main.py", line 714, in main train_dataset = NavDataset(jfiles, jfiles_bnb, tokenizer, feature_store, panoramic, params, feature_store_bnb) File "/home/wwluo/HOP-VLN-main/tasks/pretrain/batch_loader.py", line 172, in init self.feature_store_bnb = Feature_bnb(img_path_bnb) File "/home/wwluo/HOP-VLN-main/tasks/pretrain/feature.py", line 127, in init self._load() File "/home/wwluo/HOP-VLN-main/tasks/pretrain/feature.py", line 132, in _load self.features = self.loadResNet_bnb(self.feature_store) File "/home/wwluo/HOP-VLN-main/tasks/pretrain/feature.py", line 138, in loadResNet_bnb bnb=np.load(feature_store, allow_pickle=True) File "/home/wwluo/anaconda3/envs/hop/lib/python3.7/site-packages/numpy/lib/npyio.py", line 416, in load fid = stack.enter_context(open(os_fspath(file), "rb")) FileNotFoundError: [Errno 2] No such file or directory: 'img_features/bnbdata.npz'

I'm sorry to bother you, but do you know how to solve it, thanks.

YanyuanQiao commented 2 years ago

Thanks for your answer, but i still meet some problems about firefox. So i want to use the PREVALENT data only, then i get this:

Traceback (most recent call last): File "./tasks/pretrain/main.py", line 757, in main() File "./tasks/pretrain/main.py", line 714, in main train_dataset = NavDataset(jfiles, jfiles_bnb, tokenizer, feature_store, panoramic, params, feature_store_bnb) File "/home/wwluo/HOP-VLN-main/tasks/pretrain/batch_loader.py", line 172, in init self.feature_store_bnb = Feature_bnb(img_path_bnb) File "/home/wwluo/HOP-VLN-main/tasks/pretrain/feature.py", line 127, in init self._load() File "/home/wwluo/HOP-VLN-main/tasks/pretrain/feature.py", line 132, in _load self.features = self.loadResNet_bnb(self.feature_store) File "/home/wwluo/HOP-VLN-main/tasks/pretrain/feature.py", line 138, in loadResNet_bnb bnb=np.load(feature_store, allow_pickle=True) File "/home/wwluo/anaconda3/envs/hop/lib/python3.7/site-packages/numpy/lib/npyio.py", line 416, in load fid = stack.enter_context(open(os_fspath(file), "rb")) FileNotFoundError: [Errno 2] No such file or directory: 'img_features/bnbdata.npz'

I'm sorry to bother you, but do you know how to solve it, thanks.

I will review the code later and fix this bug.

wbhwbh commented 2 years ago

Same problem I meet. No such file or directory: 'img_features/bnbdata.npz'. I guess if there is a parameter that determine the program to use the PREVALENT data only. And I didn't find such parameter to set. Do you solve the problem?

YanyuanQiao commented 2 years ago

Thanks for your answer, but i still meet some problems about firefox. So i want to use the PREVALENT data only, then i get this:

Traceback (most recent call last): File "./tasks/pretrain/main.py", line 757, in main() File "./tasks/pretrain/main.py", line 714, in main train_dataset = NavDataset(jfiles, jfiles_bnb, tokenizer, feature_store, panoramic, params, feature_store_bnb) File "/home/wwluo/HOP-VLN-main/tasks/pretrain/batch_loader.py", line 172, in init self.feature_store_bnb = Feature_bnb(img_path_bnb) File "/home/wwluo/HOP-VLN-main/tasks/pretrain/feature.py", line 127, in init self._load() File "/home/wwluo/HOP-VLN-main/tasks/pretrain/feature.py", line 132, in _load self.features = self.loadResNet_bnb(self.feature_store) File "/home/wwluo/HOP-VLN-main/tasks/pretrain/feature.py", line 138, in loadResNet_bnb bnb=np.load(feature_store, allow_pickle=True) File "/home/wwluo/anaconda3/envs/hop/lib/python3.7/site-packages/numpy/lib/npyio.py", line 416, in load fid = stack.enter_context(open(os_fspath(file), "rb")) FileNotFoundError: [Errno 2] No such file or directory: 'img_features/bnbdata.npz'

I'm sorry to bother you, but do you know how to solve it, thanks.

Hi, I just fixed this bug. You can pretrain with processed PREVALENT data now.

YanyuanQiao commented 2 years ago

Same problem I meet. No such file or directory: 'img_features/bnbdata.npz'. I guess if there is a parameter that determine the program to use the PREVALENT data only. And I didn't find such parameter to set. Do you solve the problem?

How to switch pretraining data, please see: https://github.com/YanyuanQiao/HOP-VLN/blob/4b26b2569afb3e7eb7d8c2ed814cd424e41cbade/tasks/pretrain/main.py#L617

flytomatolll commented 2 years ago

Thanks for your answer, but i still meet some problems about firefox. So i want to use the PREVALENT data only, then i get this:

Traceback (most recent call last): File "./tasks/pretrain/main.py", line 757, in main() File "./tasks/pretrain/main.py", line 714, in main train_dataset = NavDataset(jfiles, jfiles_bnb, tokenizer, feature_store, panoramic, params, feature_store_bnb) File "/home/wwluo/HOP-VLN-main/tasks/pretrain/batch_loader.py", line 172, in init self.feature_store_bnb = Feature_bnb(img_path_bnb) File "/home/wwluo/HOP-VLN-main/tasks/pretrain/feature.py", line 127, in init self._load() File "/home/wwluo/HOP-VLN-main/tasks/pretrain/feature.py", line 132, in _load self.features = self.loadResNet_bnb(self.feature_store) File "/home/wwluo/HOP-VLN-main/tasks/pretrain/feature.py", line 138, in loadResNet_bnb bnb=np.load(feature_store, allow_pickle=True) File "/home/wwluo/anaconda3/envs/hop/lib/python3.7/site-packages/numpy/lib/npyio.py", line 416, in load fid = stack.enter_context(open(os_fspath(file), "rb")) FileNotFoundError: [Errno 2] No such file or directory: 'img_features/bnbdata.npz'

I'm sorry to bother you, but do you know how to solve it, thanks.

Hi, I just fixed this bug. You can pretrain with processed PREVALENT data now.

Thanks. But now I got this error.

File "/home/wwluo/HOP-VLN-main/tasks/pretrain/vilmodel.py", line 203, in forward mixed_query_layer = self.query(hidden_states) File "/home/wwluo/anaconda3/envs/hop/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call result = self.forward(*input, **kwargs) File "/home/wwluo/anaconda3/envs/hop/lib/python3.7/site-packages/torch/nn/modules/linear.py", line 92, in forward return F.linear(input, self.weight, self.bias) File "/home/wwluo/anaconda3/envs/hop/lib/python3.7/site-packages/torch/nn/functional.py", line 1408, in linear output = input.matmul(weight.t()) RuntimeError: cublas runtime error : the GPU program failed to execute at /tmp/pip-req-build-pb3z3zl3/aten/src/THC/THCBlas.cu:259

Do you know how to solve it? And my pytorch is 1.1.0 and cuda is 11.1. Thanks a lot.

YanyuanQiao commented 2 years ago

Thanks for your answer, but i still meet some problems about firefox. So i want to use the PREVALENT data only, then i get this:

Traceback (most recent call last): File "./tasks/pretrain/main.py", line 757, in main() File "./tasks/pretrain/main.py", line 714, in main train_dataset = NavDataset(jfiles, jfiles_bnb, tokenizer, feature_store, panoramic, params, feature_store_bnb) File "/home/wwluo/HOP-VLN-main/tasks/pretrain/batch_loader.py", line 172, in init self.feature_store_bnb = Feature_bnb(img_path_bnb) File "/home/wwluo/HOP-VLN-main/tasks/pretrain/feature.py", line 127, in init self._load() File "/home/wwluo/HOP-VLN-main/tasks/pretrain/feature.py", line 132, in _load self.features = self.loadResNet_bnb(self.feature_store) File "/home/wwluo/HOP-VLN-main/tasks/pretrain/feature.py", line 138, in loadResNet_bnb bnb=np.load(feature_store, allow_pickle=True) File "/home/wwluo/anaconda3/envs/hop/lib/python3.7/site-packages/numpy/lib/npyio.py", line 416, in load fid = stack.enter_context(open(os_fspath(file), "rb")) FileNotFoundError: [Errno 2] No such file or directory: 'img_features/bnbdata.npz'

I'm sorry to bother you, but do you know how to solve it, thanks.

Hi, I just fixed this bug. You can pretrain with processed PREVALENT data now.

Thanks. But now I got this error.

File "/home/wwluo/HOP-VLN-main/tasks/pretrain/vilmodel.py", line 203, in forward mixed_query_layer = self.query(hidden_states) File "/home/wwluo/anaconda3/envs/hop/lib/python3.7/site-packages/torch/nn/modules/module.py", line 493, in call result = self.forward(*input, **kwargs) File "/home/wwluo/anaconda3/envs/hop/lib/python3.7/site-packages/torch/nn/modules/linear.py", line 92, in forward return F.linear(input, self.weight, self.bias) File "/home/wwluo/anaconda3/envs/hop/lib/python3.7/site-packages/torch/nn/functional.py", line 1408, in linear output = input.matmul(weight.t()) RuntimeError: cublas runtime error : the GPU program failed to execute at /tmp/pip-req-build-pb3z3zl3/aten/src/THC/THCBlas.cu:259

Do you know how to solve it? And my pytorch is 1.1.0 and cuda is 11.1. Thanks a lot.

My cuda is 10.0, you could use CUDA 10, or you can update pytorch version to match cuda version.