From ea6de64596076c2fb35c322c6b8a821e05b2de1c Mon Sep 17 00:00:00 2001 From: Adriane Boyd Date: Mon, 13 Mar 2023 15:14:46 +0100 Subject: [PATCH] CI: Move CLI tests to ubuntu for speed (#12409) --- .github/azure-steps.yml | 18 +++++++++--------- .github/workflows/tests.yml | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/azure-steps.yml b/.github/azure-steps.yml index 1b8d81521..20d4582cb 100644 --- a/.github/azure-steps.yml +++ b/.github/azure-steps.yml @@ -57,51 +57,51 @@ steps: python -m spacy download ca_core_news_md python -c "import spacy; nlp=spacy.load('ca_core_news_sm'); doc=nlp('test')" displayName: 'Test download CLI' - condition: eq(variables['python_version'], '3.8') + condition: eq(variables['python_version'], '3.9') - script: | python -W error -m spacy info ca_core_news_sm | grep -q download_url displayName: 'Test download_url in info CLI' - condition: eq(variables['python_version'], '3.8') + condition: eq(variables['python_version'], '3.9') - script: | python -W error -c "import ca_core_news_sm; nlp = ca_core_news_sm.load(); doc=nlp('test')" displayName: 'Test no warnings on load (#11713)' - condition: eq(variables['python_version'], '3.8') + condition: eq(variables['python_version'], '3.9') - script: | python -m spacy convert extra/example_data/ner_example_data/ner-token-per-line-conll2003.json . displayName: 'Test convert CLI' - condition: eq(variables['python_version'], '3.8') + condition: eq(variables['python_version'], '3.9') - script: | python -m spacy init config -p ner -l ca ner.cfg python -m spacy debug config ner.cfg --paths.train ner-token-per-line-conll2003.spacy --paths.dev ner-token-per-line-conll2003.spacy displayName: 'Test debug config CLI' - condition: eq(variables['python_version'], '3.8') + condition: eq(variables['python_version'], '3.9') - script: | # will have errors due to sparse data, check for summary in output python -m spacy debug data ner.cfg --paths.train ner-token-per-line-conll2003.spacy --paths.dev ner-token-per-line-conll2003.spacy | grep -q Summary displayName: 'Test debug data CLI' - condition: eq(variables['python_version'], '3.8') + condition: eq(variables['python_version'], '3.9') - script: | python -m spacy train ner.cfg --paths.train ner-token-per-line-conll2003.spacy --paths.dev ner-token-per-line-conll2003.spacy --training.max_steps 10 --gpu-id -1 displayName: 'Test train CLI' - condition: eq(variables['python_version'], '3.8') + condition: eq(variables['python_version'], '3.9') - script: | python -c "import spacy; config = spacy.util.load_config('ner.cfg'); config['components']['ner'] = {'source': 'ca_core_news_sm'}; config.to_disk('ner_source_sm.cfg')" PYTHONWARNINGS="error,ignore::DeprecationWarning" python -m spacy assemble ner_source_sm.cfg output_dir displayName: 'Test assemble CLI' - condition: eq(variables['python_version'], '3.8') + condition: eq(variables['python_version'], '3.9') - script: | python -c "import spacy; config = spacy.util.load_config('ner.cfg'); config['components']['ner'] = {'source': 'ca_core_news_md'}; config.to_disk('ner_source_md.cfg')" python -m spacy assemble ner_source_md.cfg output_dir 2>&1 | grep -q W113 displayName: 'Test assemble CLI vectors warning' - condition: eq(variables['python_version'], '3.8') + condition: eq(variables['python_version'], '3.9') - script: | python -m pip install -U -r requirements.txt diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 880c09128..e51bb6c17 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -132,51 +132,51 @@ jobs: python -m spacy download ca_core_news_sm python -m spacy download ca_core_news_md python -c "import spacy; nlp=spacy.load('ca_core_news_sm'); doc=nlp('test')" - if: matrix.python_version == '3.8' + if: matrix.python_version == '3.9' - name: "Test download_url in info CLI" run: | python -W error -m spacy info ca_core_news_sm | grep -q download_url - if: matrix.python_version == '3.8' + if: matrix.python_version == '3.9' - name: "Test no warnings on load (#11713)" run: | python -W error -c "import ca_core_news_sm; nlp = ca_core_news_sm.load(); doc=nlp('test')" - if: matrix.python_version == '3.8' + if: matrix.python_version == '3.9' - name: "Test convert CLI" run: | python -m spacy convert extra/example_data/ner_example_data/ner-token-per-line-conll2003.json . - if: matrix.python_version == '3.8' + if: matrix.python_version == '3.9' - name: "Test debug config CLI" run: | python -m spacy init config -p ner -l ca ner.cfg python -m spacy debug config ner.cfg --paths.train ner-token-per-line-conll2003.spacy --paths.dev ner-token-per-line-conll2003.spacy - if: matrix.python_version == '3.8' + if: matrix.python_version == '3.9' - name: "Test debug data CLI" run: | # will have errors due to sparse data, check for summary in output python -m spacy debug data ner.cfg --paths.train ner-token-per-line-conll2003.spacy --paths.dev ner-token-per-line-conll2003.spacy | grep -q Summary - if: matrix.python_version == '3.8' + if: matrix.python_version == '3.9' - name: "Test train CLI" run: | python -m spacy train ner.cfg --paths.train ner-token-per-line-conll2003.spacy --paths.dev ner-token-per-line-conll2003.spacy --training.max_steps 10 --gpu-id -1 - if: matrix.python_version == '3.8' + if: matrix.python_version == '3.9' - name: "Test assemble CLI" run: | python -c "import spacy; config = spacy.util.load_config('ner.cfg'); config['components']['ner'] = {'source': 'ca_core_news_sm'}; config.to_disk('ner_source_sm.cfg')" PYTHONWARNINGS="error,ignore::DeprecationWarning" python -m spacy assemble ner_source_sm.cfg output_dir - if: matrix.python_version == '3.8' + if: matrix.python_version == '3.9' - name: "Test assemble CLI vectors warning" run: | python -c "import spacy; config = spacy.util.load_config('ner.cfg'); config['components']['ner'] = {'source': 'ca_core_news_md'}; config.to_disk('ner_source_md.cfg')" python -m spacy assemble ner_source_md.cfg output_dir 2>&1 | grep -q W113 - if: matrix.python_version == '3.8' + if: matrix.python_version == '3.9' - name: "Install test requirements" run: |