Closed shenweiyan closed 5 months ago
@ZhangDufei Please check it
Hi, @shenweiyan
The 'weights_only' option in torch.load() is only supported in PyTorch version >= 2.0
Try removing the weights_only=False parameter, which should resolve the issue:
model.load_state_dict(torch.load(model_path, map_location=torch.device('cpu')))
Hi, @shenweiyan
The 'weights_only' option in torch.load() is only supported in PyTorch version >= 2.0
Try removing the weights_only=False parameter, which should resolve the issue:
model.load_state_dict(torch.load(model_path, map_location=torch.device('cpu')))
Thank you so much, it really solved the problem.
I used the test code from the README as follows, and encountered a TypeError:
Due to server restrictions, many dependencies I used while installing CodonBERT are below the versions specified in the CodonBERT#installation instructions. Could this error be related to those dependencies?
Refer to the code below to use the conda environment for installation, but the same error still occurs.