-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeyError: 'size' when running the model #2
Comments
hi, can you check if you're using the same version of libraries (e.g. transformers) as listed in requirements.txt? |
Here are the versions I use:
From the above the answer is no. I might have to install the correct versions of at least Also, I use the |
I'd recommend starting from a new conda environment and |
I did the installs and I'm getting a new error from importing
There is an issue for this, but I couldn't find any real solution. Is there a reason, why this code wouldn't run on the latest version of |
Looking from the issue that it's related to "not compatible with PyTorch 1.4.0". Maybe try to install a different (newer) version of pytorch? |
Hi,
I'm working on adapting this code to building a language model on a medical dataset. Before running the full model on the entire dataset, I'm running it on a sample. Specifically, I just get a single batch from my
train_dataloader
and pass that into the model to make sure I get a loss. Here is the code for my data module and model (they are pretty much the same as in the repo but I'm share it here for convenience):Here is the code to run a single batch:
When I run the above code, I get the following error:
Interestingly, the error seems to occur at
transformers/tokenization_utils_base.py
. However, theLMDataModule
runs without any problems. I'm trying to tackle the error, but I thought I'll share it here incase anyone else had a similar error and a solution to it.The text was updated successfully, but these errors were encountered: