[Maintenance] Unused dependency in Pytorch translation example
Author: SoyGema
Pull request: no

### System Info

```
`transformers` version: 4.34.1
Platform: macOS-13.4.1-arm64-arm-64bit
Python version: 3.10.10
Huggingface_hub version: 0.17.3
Safetensors version: 0.4.0
Accelerate version: 0.23.0
Accelerate config: 	not found
PyTorch version (GPU?): 2.1.0 (False)
Tensorflow version (GPU?): not installed (NA)
Flax version (CPU?/GPU?/TPU?): not installed (NA)
Jax version: not installed
JaxLib version: not installed
Using GPU in script?: <fill in>
Using distributed or parallel set-up in script?: <fill in>
```

### Who can help?

 @ArthurZucker 
 @younesbelkada

### Information

- [X] The official example scripts
- [X] My own modified scripts

### Tasks

- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

## Context
Under maintenance of  [this repository](https://github.com/SoyGema/The-Lord-of-The-Words-The-two-frameworks) , that uses one of the [translation](https://github.com/huggingface/transformers/blob/244a53e0f6a8d95d429559cfc49a07a4e85cc680/examples/pytorch/translation/run_translation.py) examples from HF with Pytorch , and under the context of security and maintenance dependency analysis with [pip-rating](https://github.com/Nekmo/pip-rating)
Found that `py7zr` is no longer used for the example at hand im transformers stable version.

<img width="677" alt="Captura de pantalla 2023-10-25 a las 16 40 10" src="https://github.com/huggingface/transformers/assets/24204714/e9dff423-85f4-48c0-8983-f3b52fc20a1f">



## Analysis results 

- The dependency file in translation example [requirements.txt](https://github.com/huggingface/transformers/blob/244a53e0f6a8d95d429559cfc49a07a4e85cc680/examples/pytorch/translation/requirements.txt) was created [2 years ago](https://github.com/huggingface/transformers/blame/244a53e0f6a8d95d429559cfc49a07a4e85cc680/examples/pytorch/translation/requirements.txt#L6)

- Test: The translation example worked without `py7zr` in MacOS with stable version of `transformers==4.34.1`
Also tested W&B integration. 


- Regarding pip-rating understanding and further analysis : The project has reported [several vulnerabilities](https://github.com/miurahr/py7zr#security-notice) and last release was for a couple of months ago. There has been an active transparent communication by maintainers regarding the challenges with transversal attacks , which is very nice. But if the library releases are getting longer over time, it might be a good idea to delete it if that´s not used in the example.



## Potential fixes hypothesis

If you can confirm that this dependency has no longer impact on translation stable example, it might be useful to delete it, as the project doesn´t need it and the package current health is not optimal , happy to submit a PR! 


Thanks for the time dedicated to this issue.
And thanks for making transformers!




### Expected behavior

Example working without `py7zr` dependency

Comments:
Hey! Thanks for opening an issue 🤗 
I understand your frustration, seems like this was added in #10971 to allow usage of certain datasets, which for me should be left to the user. 
But I am not sure I understand why this should be changed in transformers and not the repo who use transformers 😅 
Let's try to keep things as general as possible 

I understand. Hey can you please help me understand a detail ? 🙏🏻

What Im taking is that it is used in a significant amount of datasets for not being removed, is this correct? ( EDITED for clarification : this vector thought comes under the premise of the willing of being _as general as possible_ , as it includes a dependency used in most datasets)

If I might ask, ⚗️⚗️ Why adding then `py7zr` dependency and not `datasets` then ? ⚗️⚗️
(EDITED for clarification: Why do you add a dependency from another library? ) 

🙏🏻🙏🏻🙏🏻Thanks for having a look at this!🙏🏻🙏🏻🙏🏻

Hey ! 
I had a look and I got the why. I get that is related to examples with some datasets! 
Therefore I am closing the issue