From 6b095940501c027a82731503d75de6066e424080 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 13:41:30 -0800 Subject: [PATCH 01/21] implement job skipping for doc-only PRs --- .circleci/config.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index aedbe4f55398..6e08149caf65 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,6 +3,17 @@ orbs: gcp-gke: circleci/gcp-gke@1.0.4 go: circleci/go@1.3.0 +commands: + check-skip-ci-on-doc-files-only: + description: "Halt CircleCI step for PRs with only doc changes" + steps: + - run: | + if ! git diff --name-only $(git merge-base --fork-point master) | egrep -v '\.(md|rst)$' + then + echo "Only docs were modified in this PR, not running the code checking CI job" + circleci step halt + fi + # TPU REFERENCES references: checkout_ml_testing: &checkout_ml_testing @@ -72,6 +83,7 @@ jobs: parallelism: 1 steps: - checkout + - check-skip-ci-on-doc-files-only - restore_cache: keys: - v0.4-torch_and_tf-{{ checksum "setup.py" }} @@ -98,6 +110,7 @@ jobs: parallelism: 1 steps: - checkout + - check-skip-ci-on-doc-files-only - restore_cache: keys: - v0.4-torch-{{ checksum "setup.py" }} @@ -124,6 +137,7 @@ jobs: parallelism: 1 steps: - checkout + - check-skip-ci-on-doc-files-only - restore_cache: keys: - v0.4-tf-{{ checksum "setup.py" }} @@ -150,6 +164,7 @@ jobs: parallelism: 1 steps: - checkout + - check-skip-ci-on-doc-files-only - restore_cache: keys: - v0.4-flax-{{ checksum "setup.py" }} @@ -176,6 +191,7 @@ jobs: parallelism: 1 steps: - checkout + - check-skip-ci-on-doc-files-only - restore_cache: keys: - v0.4-torch-{{ checksum "setup.py" }} @@ -202,6 +218,7 @@ jobs: parallelism: 1 steps: - checkout + - check-skip-ci-on-doc-files-only - restore_cache: keys: - v0.4-tf-{{ checksum "setup.py" }} @@ -226,6 +243,7 @@ jobs: RUN_CUSTOM_TOKENIZERS: yes steps: - checkout + - check-skip-ci-on-doc-files-only - restore_cache: keys: - v0.4-custom_tokenizers-{{ checksum "setup.py" }} @@ -253,6 +271,7 @@ jobs: parallelism: 1 steps: - checkout + - check-skip-ci-on-doc-files-only - restore_cache: keys: - v0.4-torch_examples-{{ checksum "setup.py" }} From f730f2a6a7930649f9c865e0e03a01a009fc8195 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 13:45:35 -0800 Subject: [PATCH 02/21] silent grep is crucial --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6e08149caf65..47823585a5ba 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ commands: description: "Halt CircleCI step for PRs with only doc changes" steps: - run: | - if ! git diff --name-only $(git merge-base --fork-point master) | egrep -v '\.(md|rst)$' + if ! git diff --name-only $(git merge-base --fork-point master) | egrep -qv '\.(md|rst)$' then echo "Only docs were modified in this PR, not running the code checking CI job" circleci step halt From dd66c3a43b3f16cea011ec99941fee109f859233 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 14:02:19 -0800 Subject: [PATCH 03/21] wip --- .circleci/config.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 47823585a5ba..3c0d91198f26 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,13 +5,17 @@ orbs: commands: check-skip-ci-on-doc-files-only: - description: "Halt CircleCI step for PRs with only doc changes" + description: "Halt this job for PRs with only doc changes" steps: - - run: | - if ! git diff --name-only $(git merge-base --fork-point master) | egrep -qv '\.(md|rst)$' + - run: + name: skip check + command: | + if git diff --name-only $(git merge-base --fork-point master) | egrep -qv '\.(md|rst)$' then - echo "Only docs were modified in this PR, not running the code checking CI job" - circleci step halt + echo "Non-docs were modified in this PR, proceeding normally" + else + echo "Only docs were modified in this PR, quitting this job" + circleci step halt fi # TPU REFERENCES From 76f0a6f1ff1716967d9bb3875ea333c3af2dc370 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 14:05:07 -0800 Subject: [PATCH 04/21] wip --- .circleci/config.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3c0d91198f26..8eaf7abafa18 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,15 +8,15 @@ commands: description: "Halt this job for PRs with only doc changes" steps: - run: - name: skip check - command: | - if git diff --name-only $(git merge-base --fork-point master) | egrep -qv '\.(md|rst)$' - then - echo "Non-docs were modified in this PR, proceeding normally" - else - echo "Only docs were modified in this PR, quitting this job" - circleci step halt - fi + name: skip check + command: | + if git diff --name-only $(git merge-base --fork-point master) | egrep -qv '\.(md|rst)$' + then + echo "Non-docs were modified in this PR, proceeding normally" + else + echo "Only docs were modified in this PR, quitting this job" + circleci step halt + fi # TPU REFERENCES references: From 621741c65cd7aae6d4476f8239313168db7ce792 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 14:06:45 -0800 Subject: [PATCH 05/21] wip --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8eaf7abafa18..30e6b560de5b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,8 @@ commands: - run: name: skip check command: | + git diff --name-only $(git merge-base --fork-point master) | egrep -qv '\.(md|rst)$' + git diff --name-only $(git merge-base --fork-point master) | egrep -v '\.(md|rst)$' if git diff --name-only $(git merge-base --fork-point master) | egrep -qv '\.(md|rst)$' then echo "Non-docs were modified in this PR, proceeding normally" From 2f539297d008ce1fa1b17c797f8cadaa3b151553 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 14:15:37 -0800 Subject: [PATCH 06/21] wip --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 30e6b560de5b..7ff68eafe35f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,8 +10,8 @@ commands: - run: name: skip check command: | - git diff --name-only $(git merge-base --fork-point master) | egrep -qv '\.(md|rst)$' git diff --name-only $(git merge-base --fork-point master) | egrep -v '\.(md|rst)$' + #git diff --name-only $(git merge-base --fork-point master) | egrep -qv '\.(md|rst)$' if git diff --name-only $(git merge-base --fork-point master) | egrep -qv '\.(md|rst)$' then echo "Non-docs were modified in this PR, proceeding normally" From 10d38ee83d60ee67df32954ea11bc1f0c1536e17 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 14:20:29 -0800 Subject: [PATCH 07/21] wip --- .circleci/config.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7ff68eafe35f..ecb4db504317 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,9 +10,13 @@ commands: - run: name: skip check command: | - git diff --name-only $(git merge-base --fork-point master) | egrep -v '\.(md|rst)$' + COMMIT_RANGE=$(echo "${CIRCLE_COMPARE_URL}" | cut -d/ -f7) + if [[ $COMMIT_RANGE != *"..."* ]]; then + COMMIT_RANGE="${COMMIT_RANGE}...${COMMIT_RANGE}" + fi + git diff --name-only $COMMIT_RANGE | egrep -v '\.(md|rst)$' #git diff --name-only $(git merge-base --fork-point master) | egrep -qv '\.(md|rst)$' - if git diff --name-only $(git merge-base --fork-point master) | egrep -qv '\.(md|rst)$' + if git diff --name-only $COMMIT_RANGE | egrep -qv '\.(md|rst)$' then echo "Non-docs were modified in this PR, proceeding normally" else From 88f1e5f7fd2e1959dbd771613542570ffd4b6cc1 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 15:17:42 -0800 Subject: [PATCH 08/21] wip --- .circleci/config.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ecb4db504317..6761b3dae03b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,16 +7,15 @@ commands: check-skip-ci-on-doc-files-only: description: "Halt this job for PRs with only doc changes" steps: + - run: name: skip check command: | - COMMIT_RANGE=$(echo "${CIRCLE_COMPARE_URL}" | cut -d/ -f7) - if [[ $COMMIT_RANGE != *"..."* ]]; then - COMMIT_RANGE="${COMMIT_RANGE}...${COMMIT_RANGE}" - fi - git diff --name-only $COMMIT_RANGE | egrep -v '\.(md|rst)$' - #git diff --name-only $(git merge-base --fork-point master) | egrep -qv '\.(md|rst)$' - if git diff --name-only $COMMIT_RANGE | egrep -qv '\.(md|rst)$' + git diff --name-only << pipeline.git.base_revision >>..<< pipeline.git.revision >> + git diff --name-only << pipeline.git.base_revision >>..<< pipeline.git.revision >> | egrep -v '\.(md|rst)$' + git diff --name-only << pipeline.git.base_revision >>..<< pipeline.git.revision >> | egrep -qv '\.(md|rst)$' + + if git diff --name-only << pipeline.git.base_revision >>..<< pipeline.git.revision >> | egrep -v '\.(md|rst)$' then echo "Non-docs were modified in this PR, proceeding normally" else From 346667cffa7241451642852bc92f6dc7de3eb981 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 15:27:09 -0800 Subject: [PATCH 09/21] wip --- .circleci/config.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6761b3dae03b..0a74dc901d6c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,10 @@ commands: - run: name: skip check command: | + git merge-base --fork-point master + git diff --name-only << pipeline.git.base_revision >>..<< pipeline.git.revision >> + git diff --name-only << pipeline.git.base_revision >>...<< pipeline.git.revision >> git diff --name-only << pipeline.git.base_revision >>..<< pipeline.git.revision >> | egrep -v '\.(md|rst)$' git diff --name-only << pipeline.git.base_revision >>..<< pipeline.git.revision >> | egrep -qv '\.(md|rst)$' From 1f8d11498735613e985f8d7480647ea276c79bf3 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 15:32:54 -0800 Subject: [PATCH 10/21] wip --- .circleci/config.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0a74dc901d6c..3d8339d01060 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,14 +11,7 @@ commands: - run: name: skip check command: | - git merge-base --fork-point master - - git diff --name-only << pipeline.git.base_revision >>..<< pipeline.git.revision >> - git diff --name-only << pipeline.git.base_revision >>...<< pipeline.git.revision >> - git diff --name-only << pipeline.git.base_revision >>..<< pipeline.git.revision >> | egrep -v '\.(md|rst)$' - git diff --name-only << pipeline.git.base_revision >>..<< pipeline.git.revision >> | egrep -qv '\.(md|rst)$' - - if git diff --name-only << pipeline.git.base_revision >>..<< pipeline.git.revision >> | egrep -v '\.(md|rst)$' + if git diff --name-only << pipeline.git.base_revision >>...<< pipeline.git.revision >> | egrep -v '\.(md|yml|rst)$' then echo "Non-docs were modified in this PR, proceeding normally" else From 4cf3cec91bf01df4a7f74c271d5e97e1df4a8bf9 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 15:34:50 -0800 Subject: [PATCH 11/21] let's add doc --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b4703c7c6167..35d316ff94be 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +


From aa7cb7bcf7a89070b3e895256d0e4f4d4a99f226 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 15:35:46 -0800 Subject: [PATCH 12/21] let's add code --- utils/get_modified_files.py | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/utils/get_modified_files.py b/utils/get_modified_files.py index 78d2ec128bf0..d83d24660171 100644 --- a/utils/get_modified_files.py +++ b/utils/get_modified_files.py @@ -13,11 +13,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -# this script reports modified .py files under the desired list of top-level sub-dirs passed as a list of arguments, e.g.: +# this script prints a list of modified files in the current branch since the branch was made +# +# 1. w/o any arguments it returns all modified files +# +# 2. if a list of top-level sub-dirs is passed as its arguments, it'll (1) grep only `.py$` files, (2) only +# under those sub-dirs. Example: +# # python ./utils/get_modified_files.py utils src tests examples # -# it uses git to find the forking point and which files were modified - i.e. files not under git won't be considered -# since the output of this script is fed into Makefile commands it doesn't print a newline after the results +# notes: +# +# - it uses git to find the forking point at which files were modified - i.e. files not under git won't be considered +# +# - since the output of this script is fed into Makefile commands it doesn't print a newline after the results import re import subprocess @@ -27,8 +36,11 @@ fork_point_sha = subprocess.check_output("git merge-base --fork-point master".split()).decode("utf-8") modified_files = subprocess.check_output(f"git diff --name-only {fork_point_sha}".split()).decode("utf-8").split() -joined_dirs = "|".join(sys.argv[1:]) -regex = re.compile(fr"^({joined_dirs}).*?\.py$") +# XXX: could make it into a proper argparse program down the road, and if so add an actual flag to grep for py files +if len(sys.argv) > 1: + joined_dirs = "|".join(sys.argv[1:]) + regex = re.compile(fr"^({joined_dirs}).*?\.py$") -relevant_modified_files = [x for x in modified_files if regex.match(x)] -print(" ".join(relevant_modified_files), end="") + modified_files = [x for x in modified_files if regex.match(x)] + +print(" ".join(modified_files), end="") From 5d6f2fb0c86f75d474abb006437bde4b1a3a674a Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 15:38:26 -0800 Subject: [PATCH 13/21] revert test commits --- .circleci/config.yml | 2 +- README.md | 2 -- utils/get_modified_files.py | 26 +++++++------------------- 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3d8339d01060..75c6d308bba5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ commands: - run: name: skip check command: | - if git diff --name-only << pipeline.git.base_revision >>...<< pipeline.git.revision >> | egrep -v '\.(md|yml|rst)$' + if git diff --name-only << pipeline.git.base_revision >>...<< pipeline.git.revision >> | egrep -v '\.(md|rst)$' then echo "Non-docs were modified in this PR, proceeding normally" else diff --git a/README.md b/README.md index 35d316ff94be..e922178cb758 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -


@@ -161,7 +160,6 @@ If you'd like to play with the examples, you must [install the library from sour 1. **[ALBERT](https://huggingface.co/transformers/model_doc/albert.html)** (from Google Research and the Toyota Technological Institute at Chicago) released with the paper [ALBERT: A Lite BERT for Self-supervised Learning of Language Representations](https://arxiv.org/abs/1909.11942), by Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut. 1. **[BART](https://huggingface.co/transformers/model_doc/bart.html)** (from Facebook) released with the paper [BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension](https://arxiv.org/pdf/1910.13461.pdf) by Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov and Luke Zettlemoyer. -1. **[BARThez](https://huggingface.co/transformers/model_doc/barthez.html)** (from École polytechnique) released with the paper [BARThez: a Skilled Pretrained French Sequence-to-Sequence Model](https://arxiv.org/abs/2010.12321) by Moussa Kamal Eddine, Antoine J.-P. Tixier, Michalis Vazirgiannis. 1. **[BERT](https://huggingface.co/transformers/model_doc/bert.html)** (from Google) released with the paper [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://arxiv.org/abs/1810.04805) by Jacob Devlin, Ming-Wei Chang, Kenton Lee and Kristina Toutanova. 1. **[BERT For Sequence Generation](https://huggingface.co/transformers/model_doc/bertgeneration.html)** (from Google) released with the paper [Leveraging Pre-trained Checkpoints for Sequence Generation Tasks](https://arxiv.org/abs/1907.12461) by Sascha Rothe, Shashi Narayan, Aliaksei Severyn. 1. **[Blenderbot](https://huggingface.co/transformers/model_doc/blenderbot.html)** (from Facebook) released with the paper [Recipes for building an open-domain chatbot](https://arxiv.org/abs/2004.13637) by Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston. diff --git a/utils/get_modified_files.py b/utils/get_modified_files.py index d83d24660171..78d2ec128bf0 100644 --- a/utils/get_modified_files.py +++ b/utils/get_modified_files.py @@ -13,20 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -# this script prints a list of modified files in the current branch since the branch was made -# -# 1. w/o any arguments it returns all modified files -# -# 2. if a list of top-level sub-dirs is passed as its arguments, it'll (1) grep only `.py$` files, (2) only -# under those sub-dirs. Example: -# +# this script reports modified .py files under the desired list of top-level sub-dirs passed as a list of arguments, e.g.: # python ./utils/get_modified_files.py utils src tests examples # -# notes: -# -# - it uses git to find the forking point at which files were modified - i.e. files not under git won't be considered -# -# - since the output of this script is fed into Makefile commands it doesn't print a newline after the results +# it uses git to find the forking point and which files were modified - i.e. files not under git won't be considered +# since the output of this script is fed into Makefile commands it doesn't print a newline after the results import re import subprocess @@ -36,11 +27,8 @@ fork_point_sha = subprocess.check_output("git merge-base --fork-point master".split()).decode("utf-8") modified_files = subprocess.check_output(f"git diff --name-only {fork_point_sha}".split()).decode("utf-8").split() -# XXX: could make it into a proper argparse program down the road, and if so add an actual flag to grep for py files -if len(sys.argv) > 1: - joined_dirs = "|".join(sys.argv[1:]) - regex = re.compile(fr"^({joined_dirs}).*?\.py$") +joined_dirs = "|".join(sys.argv[1:]) +regex = re.compile(fr"^({joined_dirs}).*?\.py$") - modified_files = [x for x in modified_files if regex.match(x)] - -print(" ".join(modified_files), end="") +relevant_modified_files = [x for x in modified_files if regex.match(x)] +print(" ".join(relevant_modified_files), end="") From 1f18604e44753b5f0f91f974cfc05f3ff35be55c Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 15:40:12 -0800 Subject: [PATCH 14/21] restore --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e922178cb758..b4703c7c6167 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,7 @@ If you'd like to play with the examples, you must [install the library from sour 1. **[ALBERT](https://huggingface.co/transformers/model_doc/albert.html)** (from Google Research and the Toyota Technological Institute at Chicago) released with the paper [ALBERT: A Lite BERT for Self-supervised Learning of Language Representations](https://arxiv.org/abs/1909.11942), by Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut. 1. **[BART](https://huggingface.co/transformers/model_doc/bart.html)** (from Facebook) released with the paper [BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension](https://arxiv.org/pdf/1910.13461.pdf) by Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov and Luke Zettlemoyer. +1. **[BARThez](https://huggingface.co/transformers/model_doc/barthez.html)** (from École polytechnique) released with the paper [BARThez: a Skilled Pretrained French Sequence-to-Sequence Model](https://arxiv.org/abs/2010.12321) by Moussa Kamal Eddine, Antoine J.-P. Tixier, Michalis Vazirgiannis. 1. **[BERT](https://huggingface.co/transformers/model_doc/bert.html)** (from Google) released with the paper [BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding](https://arxiv.org/abs/1810.04805) by Jacob Devlin, Ming-Wei Chang, Kenton Lee and Kristina Toutanova. 1. **[BERT For Sequence Generation](https://huggingface.co/transformers/model_doc/bertgeneration.html)** (from Google) released with the paper [Leveraging Pre-trained Checkpoints for Sequence Generation Tasks](https://arxiv.org/abs/1907.12461) by Sascha Rothe, Shashi Narayan, Aliaksei Severyn. 1. **[Blenderbot](https://huggingface.co/transformers/model_doc/blenderbot.html)** (from Facebook) released with the paper [Recipes for building an open-domain chatbot](https://arxiv.org/abs/2004.13637) by Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M. Smith, Y-Lan Boureau, Jason Weston. From 8f4f69cc6d93ce7b562f5adbc1d43540dcb315d5 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 15:41:17 -0800 Subject: [PATCH 15/21] Better name --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 75c6d308bba5..cbedf4777ea2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ commands: steps: - run: - name: skip check + name: docs-only changes skip check command: | if git diff --name-only << pipeline.git.base_revision >>...<< pipeline.git.revision >> | egrep -v '\.(md|rst)$' then From b9b44b781d2f9737728d3af0b09d842a7fceded8 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 15:42:33 -0800 Subject: [PATCH 16/21] Better name --- .circleci/config.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cbedf4777ea2..0c909ffbdeeb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ orbs: go: circleci/go@1.3.0 commands: - check-skip-ci-on-doc-files-only: + skip-job-on-doc-only-changes: description: "Halt this job for PRs with only doc changes" steps: @@ -88,7 +88,7 @@ jobs: parallelism: 1 steps: - checkout - - check-skip-ci-on-doc-files-only + - skip-job-on-doc-only-changes - restore_cache: keys: - v0.4-torch_and_tf-{{ checksum "setup.py" }} @@ -115,7 +115,7 @@ jobs: parallelism: 1 steps: - checkout - - check-skip-ci-on-doc-files-only + - skip-job-on-doc-only-changes - restore_cache: keys: - v0.4-torch-{{ checksum "setup.py" }} @@ -142,7 +142,7 @@ jobs: parallelism: 1 steps: - checkout - - check-skip-ci-on-doc-files-only + - skip-job-on-doc-only-changes - restore_cache: keys: - v0.4-tf-{{ checksum "setup.py" }} @@ -169,7 +169,7 @@ jobs: parallelism: 1 steps: - checkout - - check-skip-ci-on-doc-files-only + - skip-job-on-doc-only-changes - restore_cache: keys: - v0.4-flax-{{ checksum "setup.py" }} @@ -196,7 +196,7 @@ jobs: parallelism: 1 steps: - checkout - - check-skip-ci-on-doc-files-only + - skip-job-on-doc-only-changes - restore_cache: keys: - v0.4-torch-{{ checksum "setup.py" }} @@ -223,7 +223,7 @@ jobs: parallelism: 1 steps: - checkout - - check-skip-ci-on-doc-files-only + - skip-job-on-doc-only-changes - restore_cache: keys: - v0.4-tf-{{ checksum "setup.py" }} @@ -248,7 +248,7 @@ jobs: RUN_CUSTOM_TOKENIZERS: yes steps: - checkout - - check-skip-ci-on-doc-files-only + - skip-job-on-doc-only-changes - restore_cache: keys: - v0.4-custom_tokenizers-{{ checksum "setup.py" }} @@ -276,7 +276,7 @@ jobs: parallelism: 1 steps: - checkout - - check-skip-ci-on-doc-files-only + - skip-job-on-doc-only-changes - restore_cache: keys: - v0.4-torch_examples-{{ checksum "setup.py" }} From 7d274736d962ce0c2375b51b881f0c229407d55b Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 15:45:08 -0800 Subject: [PATCH 17/21] Better name --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0c909ffbdeeb..100e754266fd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,7 @@ orbs: commands: skip-job-on-doc-only-changes: - description: "Halt this job for PRs with only doc changes" + description: "Do not continue this job and exit with success for PRs with only doc changes" steps: - run: From 013f7d2f0cda41053abe239e3462cc0b157d160f Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 15:52:05 -0800 Subject: [PATCH 18/21] some more testing --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 100e754266fd..38691e8e9671 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ commands: - run: name: docs-only changes skip check command: | - if git diff --name-only << pipeline.git.base_revision >>...<< pipeline.git.revision >> | egrep -v '\.(md|rst)$' + if git diff --name-only << pipeline.git.base_revision >>...<< pipeline.git.revision >> | egrep -qv '\.(md|yml|rst)$' then echo "Non-docs were modified in this PR, proceeding normally" else From 397d76c47261dbc4d7744e621c96b4579d948070 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 15:52:41 -0800 Subject: [PATCH 19/21] some more testing --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b4703c7c6167..35d316ff94be 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ +


From d32c303b9cf38a576fd16f215ef58d5b09ea48dc Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 15:53:15 -0800 Subject: [PATCH 20/21] some more testing --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index a1fcdf401b63..b417349db281 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,4 @@ + """ Simple check list from AllenNLP repo: https://github.com/allenai/allennlp/blob/master/setup.py From 1c43ec1254cfeddd4a44e1a6072045675985c582 Mon Sep 17 00:00:00 2001 From: Stas Bekman Date: Fri, 27 Nov 2020 15:54:08 -0800 Subject: [PATCH 21/21] finish testing --- .circleci/config.yml | 2 +- README.md | 1 - setup.py | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 38691e8e9671..f3b13d26eb52 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ commands: - run: name: docs-only changes skip check command: | - if git diff --name-only << pipeline.git.base_revision >>...<< pipeline.git.revision >> | egrep -qv '\.(md|yml|rst)$' + if git diff --name-only << pipeline.git.base_revision >>...<< pipeline.git.revision >> | egrep -qv '\.(md|rst)$' then echo "Non-docs were modified in this PR, proceeding normally" else diff --git a/README.md b/README.md index 35d316ff94be..b4703c7c6167 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -


diff --git a/setup.py b/setup.py index b417349db281..a1fcdf401b63 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,3 @@ - """ Simple check list from AllenNLP repo: https://github.com/allenai/allennlp/blob/master/setup.py