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
You can find some advanced install instructions in the official
CONTRIBUTING.md guide as well - transformers/CONTRIBUTING.md at main · huggingface/transformers · GitHub