The best way to install and edit the transformers package locally?

What is the best way to install and edit the transformers package locally?

I think you should be able to clone the repo (GitHub - huggingface/transformers: 🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.) and make any edits you want, then install it with pip install -e <path to cloned directory>.

Note that the -e has some implications, so you can omit that flag as well: Installing Python packages from local file system folder to virtualenv with pip - Stack Overflow

2 Likes

You can find some advanced install instructions in the official CONTRIBUTING.md guide as well - transformers/CONTRIBUTING.md at main · huggingface/transformers · GitHub :hugs:

3 Likes