Open thirdwing opened 1 year ago
My best guess is a version mismatch.
Can you share the library versions you are using? @RyanWangZf
A possible fix is to add strict=False
to https://github.com/RyanWangZf/Trial2Vec/blob/main/trial2vec/model.py#L841
I think it is better to use the same pytorch version with you.
Hi KK,
Sry I am busy with some other projects at present. The problem I think is caused by mismatching transformer
version instead of pytorch version. Setting strict=False
is fine if you are using the pre-encoded trial embeds, but I am not sure if it causes problem when encoding new trials.
Thx!
OK. I will try an older version of transformers. 4.3.1 might be too new.
Hi! having the same issue. when running model = Trial2Vec(device='cpu').from_pretrained()
Please, could you tell me what is the fix or workaround? Where I should use strict=False?
using torch 2.1.0 Trial2Vec 0.1.0 transformers 4.37.2
I downgraded my python version and the issue is gone.
I hope this helps you.
On Sun, Feb 4, 2024 at 11:05 AM JPonsa @.***> wrote:
Hi! having the same issue. when running model = Trial2Vec(device='cpu').from_pretrained()
Please, could you tell me what is the fix or workaround? Where I should use strict=False?
using torch 2.1.0 Trial2Vec 0.1.0 transformers 4.37.2
— Reply to this email directly, view it on GitHub https://github.com/RyanWangZf/Trial2Vec/issues/4#issuecomment-1925883524, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALZWVMAY3RMH3NM23MYBYDYR7LXBAVCNFSM6AAAAAA3BPZCYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVHA4DGNJSGQ . You are receiving this because you authored the thread.Message ID: @.***>
The error message is shown below:
I installed Trial2Vec from github.
I am using
torch==1.13.1
andtransformers==4.31.0
on Linux.