question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Deprecated] Separate setting: OverflowError: cannot fit 'int' into an index-sized integer

See original GitHub issue

in fetaqa config file if I change concatenate to separate and run prefix tuning the following error occurs

file train.py", line 185, in main
    train_result = trainer.train(resume_from_checkpoint=checkpoint)
  File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/transformers/trainer.py", line 1260, in train
    for step, inputs in enumerate(epoch_iterator):
  File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 435, in __next__
    data = self._next_data()
  File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 475, in _next_data
    data = self._dataset_fetcher.fetch(index)  # may raise StopIteration
  File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 44, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/home/pouramini/UnifiedSKG/utils/dataset.py", line 116, in __getitem__
    max_length=self.tokenizer.model_max_length,
  File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 2406, in __call__
    **kwargs,
  File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 2476, in encode_plus
    **kwargs,
  File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/transformers/tokenization_utils.py", line 480, in _encode_plus
    verbose=verbose,
  File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 2913, in prepare_for_model
    return_attention_mask=return_attention_mask,
  File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 2731, in pad
    return_attention_mask=return_attention_mask,
  File "/home/pouramini/anaconda3/envs/uni/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 3065, in _pad
    encoded_inputs["attention_mask"] = [1] * len(required_input) + [0] * difference
OverflowError: cannot fit 'int' into an index-sized integer

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
ChenWu98commented, May 3, 2022

Hi,

The separate feature is deprecated and not used in our experiment, so we did not test it. In our latest commit e337e3b0b492772ba10f35bf64112c10d16d203c, we attempted to fix this bug. In short, the model_max_length flag of T5 is set as a very large integer, which causes RAM overflow. Could you check the latest code? Thanks!

1reaction
Timothyxxxcommented, May 3, 2022

Hi, thanks for pointing out, we will fix that sooner. For the meanings of separate and concatenate version: separate: Get the prefix weight from query, structured knowledge separately but has been deprecated by us since it didn’t improve the result in our early version. concat: concat the query, structured knowledge and context to formulate them as one sentence input and get its prefix weight. It is simple and effective thus we adopt it as defaulted.

Contact us if you have some further findings!

Read more comments on GitHub >

github_iconTop Results From Across the Web

OverflowError: cannot fit 'int' into an index-sized integer
However when I try to run some tests, I get this error. File "C:\Users\User\flask-python\site-tracker\app\users\models.py", line ...
Read more >
OverflowError: cannot fit 'int' into an index-sized integer #47
The Issue occurs on the binary build "px.exe" on ca5d1fb. Using source and Miniconda3 x64 the px.py seems to download the file to...
Read more >
Simple O(n) Python Solution - LeetCode Discuss
For example, on [1,2,99999999999999999999] it fails with the Python error "OverflowError: cannot fit 'int' into an index-sized integer".
Read more >
OverflowError: Is this do-able? : r/learnpython - Reddit
On line 8, I can't convert it to int until I convert it to hex, ... OverflowError: cannot fit 'int' into an index-sized...
Read more >
OverflowError: cannot fit 'int' into an index ... - Python Forum
Hello I am running a simple audio read program: import matplotlib.pyplot as plt import scipy.io.wavfile
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found