From 1cf28da66d39f8a03f054d83640520430130c4b9 Mon Sep 17 00:00:00 2001 From: Yih-Dar <2521628+ydshieh@users.noreply.github.com> Date: Wed, 23 Mar 2022 22:46:11 +0100 Subject: [PATCH] Update docs/README.md (#16333) * Update docs/README.md Co-authored-by: Lysandre Debut Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> --- docs/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/README.md b/docs/README.md index 9a1819e33a..acfa2d0be0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -349,6 +349,13 @@ You will first need to run the following command (from the root of the repositor python utils/prepare_for_doc_test.py src docs ``` +If you work on a specific python module, say `modeling_wav2vec2.py`, you can run the command as follows (to avoid the unnecessary temporary changes in irrelevant files): + +```bash +python utils/prepare_for_doc_test.py src/transformers/utils/doc.py src/transformers/models/wav2vec2/modeling_wav2vec2.py +``` +(`utils/doc.py` should always be included) + Then you can run all the tests in the docstrings of a given file with the following command, here is how we test the modeling file of Wav2Vec2 for instance: ```bash