Closed linhuixiao closed 1 year ago
I have solve this bug,this is because m2 coco dataset use java core,its need install some software as follows:
sudo apt update
sudo apt install default-jdk
sudo apt install default-jre
sudo apt-get install openjdk-8-jdk
Maybe you should close this issue.
Meshed-Memory Transformer Evaluation Evaluation: 0%| | 0/500 [00:00<?, ?it/s]/home/mmc_xiaolinhui/mmc_15_exp_202206/meshed-memory-transformer/models/transformer/attention.py:62: UserWarning: maskedfill received a mask with dtype torch.uint8, this behavior is now deprecated,please use a mask with dtype torch.bool instead. (Triggered internally at ../aten/src/ATen/native/cuda/Indexing.cu:967.) att = att.masked_fill(attention_mask, -np.inf) Evaluation: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 500/500 [01:25<00:00, 5.84it/s] Traceback (most recent call last): File "test.py", line 79, in
scores = predict_captions(model, dict_dataloader_test, text_field)
File "test.py", line 34, in predict_captions
gts = evaluation.PTBTokenizer.tokenize(gts)
File "/home/mmc_xiaolinhui/mmc_15_exp_202206/meshed-memory-transformer/evaluation/tokenizer.py", line 51, in tokenize
p_tokenizer = subprocess.Popen(cmd, cwd=path_to_jar_dirname, \
File "/home/mmc_xiaolinhui/anaconda3/envs/pytorch_clip/lib/python3.8/subprocess.py", line 858, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/home/mmc_xiaolinhui/anaconda3/envs/pytorch_clip/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'java'