Key error during Training 
We are trying to do text summarization using BERT2BERT model. But facing this error mentioned below:
The above exception was the direct cause of the following exception:

KeyError                                  Traceback (most recent call last)
[/usr/local/lib/python3.9/dist-packages/pandas/core/indexes/base.py](https://localhost:8080/#) in get_loc(self, key, method, tolerance)
   3361                 return self._engine.get_loc(casted_key)
   3362             except KeyError as err:
-> 3363                 raise KeyError(key) from err
   3364 
   3365         if is_scalar(key) and isna(key) and not self.hasnans:

KeyError: 6868

Link for google collab:
![error img](https://user-images.githubusercontent.com/90444415/224336228-f39d1e76-3542-4028-9eb4-c0aded3bc762.png)
[https://colab.research.google.com/drive/1ySZS1VifUxbccI81y9dLOHxg_nr9mSc0?usp=sharing](url)
Without seeing the code you run or the whole traceback, there is nothing we can do to help you.<|||||>The below is the code link, you can access it:
[https://colab.research.google.com/drive/1ySZS1VifUxbccI81y9dLOHxg_nr9mSc0?usp=sharing](url)<|||||>> Without seeing the code you run or the whole traceback, there is nothing we can do to help you.

The below is the code link, you can access it:
[https://colab.research.google.com/drive/1ySZS1VifUxbccI81y9dLOHxg_nr9mSc0?usp=sharing](https://github.com/huggingface/transformers/issues/url)<|||||>The link does not point to anything.<|||||>Sorry about that, Please use the link below mentioned:
https://github.com/kashalakarthik/BERT-Hugging-face

please copy paste the link in browser if it is not working.
The links to download the dataset also mentioned in the repository.<|||||>You are not passing a `dataset` to your Trainer but a pandas dataframe, so this can't work. The Trainer only accepts PyTorch `Dataset` objects.<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.