KennthShang / HostG

Graph convolutional neural network for host prediction
19 stars 2 forks source link

Error in Prediction #6

Closed drob2727 closed 2 years ago

drob2727 commented 2 years ago

I get a lot of errors in this format and I am not sure how to interpret them

(Host) bash-4.2$ python run_Speed_up.py --contigs renamed_VF_VS_cdhit.fa --len 8000 --t 0 rm: cannot remove ‘dataset/*’: No such file or directory Capturing compressed features Running with cpu Traceback (most recent call last): File "/fslhome/fslcollab273/.conda/envs/Host/lib/python3.7/tarfile.py", line 187, in nti n = int(s.strip() or "0", 8) ValueError: invalid literal for int() with base 8: 'r_v2\nq\x03('

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/fslhome/fslcollab273/.conda/envs/Host/lib/python3.7/tarfile.py", line 2289, in next tarinfo = self.tarinfo.fromtarfile(self) File "/fslhome/fslcollab273/.conda/envs/Host/lib/python3.7/tarfile.py", line 1095, in fromtarfile obj = cls.frombuf(buf, tarfile.encoding, tarfile.errors) File "/fslhome/fslcollab273/.conda/envs/Host/lib/python3.7/tarfile.py", line 1037, in frombuf chksum = nti(buf[148:156]) File "/fslhome/fslcollab273/.conda/envs/Host/lib/python3.7/tarfile.py", line 189, in nti raise InvalidHeaderError("invalid header") tarfile.InvalidHeaderError: invalid header

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/fslhome/fslcollab273/.conda/envs/Host/lib/python3.7/site-packages/torch/serialization.py", line 556, in _load return legacy_load(f) File "/fslhome/fslcollab273/.conda/envs/Host/lib/python3.7/site-packages/torch/serialization.py", line 467, in legacy_load with closing(tarfile.open(fileobj=f, mode='r:', format=tarfile.PAX_FORMAT)) as tar, \ File "/fslhome/fslcollab273/.conda/envs/Host/lib/python3.7/tarfile.py", line 1593, in open return func(name, filemode, fileobj, kwargs) File "/fslhome/fslcollab273/.conda/envs/Host/lib/python3.7/tarfile.py", line 1623, in taropen return cls(name, mode, fileobj, kwargs) File "/fslhome/fslcollab273/.conda/envs/Host/lib/python3.7/tarfile.py", line 1486, in init self.firstmember = self.next() File "/fslhome/fslcollab273/.conda/envs/Host/lib/python3.7/tarfile.py", line 2301, in next raise ReadError(str(e)) tarfile.ReadError: invalid header

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "run_CNN.py", line 101, in pretrained_dict=torch.load(args.classifier, map_location='cpu') File "/fslhome/fslcollab273/.conda/envs/Host/lib/python3.7/site-packages/torch/serialization.py", line 387, in load return _load(f, map_location, pickle_module, **pickle_load_args) File "/fslhome/fslcollab273/.conda/envs/Host/lib/python3.7/site-packages/torch/serialization.py", line 560, in _load raise RuntimeError("{} is a zip archive (did you mean to use torch.jit.load()?)".format(f.name)) RuntimeError: Params.pkl is a zip archive (did you mean to use torch.jit.load()?) Pre-trained CNN Error for file contig_0 folder Cyber_data/ exist... cleaning dictionary Capturing compressed features

KennthShang commented 2 years ago

did you check the format of your fasta file. Isit the same as the example.

KennthShang commented 2 years ago

BTW, why your program try to rm dataset folder

drob2727 commented 2 years ago

Ok I see what I did wrong. Thank you!

I was just typing this out. My format is the same. I think I got the GPU and CPU packages installed wrong. I just fixed it and ran the test set which worked this time. I am now running my set and it is on "Running with CPU" and it hasnt immediately died to I think it's going. Thanks again for the help. I have no idea why it tried to delete the dataset folder. I was just as confused as you.

KennthShang commented 2 years ago

ok. that is fine.

I found the script that is going to rm dataset folder. it is in the CNN folder. That's ok. No need to change anything about the code.