Skip to content

Commit c656960

Browse files
authored
Merge pull request #645 from JohnSnowLabs/release/1.1.0
Release/1.1.0
2 parents 01473dc + c41c7e4 commit c656960

94 files changed

Lines changed: 176030 additions & 148555 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3-
41
name: build
52

63
on:
@@ -19,7 +16,7 @@ jobs:
1916
strategy:
2017
fail-fast: false
2118
matrix:
22-
python-version: ["3.7","3.8", "3.9","3.10"]
19+
python-version: [ "3.8", "3.9","3.10" ]
2320

2421
steps:
2522
- uses: actions/checkout@v3
@@ -28,27 +25,34 @@ jobs:
2825
with:
2926
python-version: ${{ matrix.python-version }}
3027

31-
- name: Create virtual environment
32-
run: python -m venv venv
28+
- uses: snok/install-poetry@v1
29+
with:
30+
version: 1.3.1
31+
virtualenvs-create: true
32+
virtualenvs-in-project: true
33+
installer-parallel: true
34+
35+
- name: Load cached venv
36+
id: cached-poetry-dependencies
37+
uses: actions/cache@v3
38+
with:
39+
path: .venv
40+
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
3341

34-
- name: Activate virtual environment
42+
- name: Install dependencies
43+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
3544
run: |
36-
ls
37-
source ./venv/bin/activate
45+
poetry install --with dev --all-extras
3846
39-
- name: Install dependencies
47+
- name: Check linting
4048
run: |
41-
python -m pip install --upgrade pip
42-
python -m pip install flake8 pytest
43-
if [ -f .github/workflows/requirements.txt ]; then pip install -r .github/workflows/requirements.txt; fi
49+
poetry run task lint
4450
45-
- name: Lint with flake8
51+
- name: Check formatting
4652
run: |
47-
# stop the build if there are Python syntax errors or undefined names
48-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=venv
49-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
50-
flake8 . --count --exit-zero --exclude=venv --max-complexity=10 --max-line-length=127 --statistics
53+
poetry run task is-formatted
54+
5155
- name: Test with pytest
5256
run: |
53-
python -m spacy download en_core_web_sm
54-
pytest
57+
poetry run task force-cpu-torch
58+
poetry run task test

‎.github/workflows/requirements.txt‎

Lines changed: 0 additions & 17 deletions
This file was deleted.

‎.gitignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,4 @@ docs/website/.sass-cache/**
202202
tst_shortcut_sd/
203203
src/*/resources/*.classes
204204

205-
_site\
205+
_site/

‎.pre-commit-config.yaml‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v3.2.0
4+
hooks:
5+
- id: check-yaml
6+
- id: check-added-large-files
7+
- repo: https://github.com/PyCQA/flake8
8+
rev: '6.0.0'
9+
hooks:
10+
- id: flake8
11+
args: [
12+
"--max-line-length=90",
13+
"--ignore=E203,E501,W503",
14+
"--per-file-ignores=__init__.py:F401"
15+
]
16+
- repo: https://github.com/psf/black
17+
rev: 23.3.0
18+
hooks:
19+
- id: black
20+
args: [
21+
"--line-length=90",
22+
"--extend-exclude=langtest/transform/utils.py",
23+
"--check"
24+
]
25+
- repo: https://github.com/pycqa/pydocstyle
26+
rev: 6.3.0
27+
hooks:
28+
- id: pydocstyle
29+
args: [
30+
"--add-ignore=D100,D104,D105,D400,D415",
31+
"--add-select=D417",
32+
"--convention=google"
33+
]
34+
exclude: "langtest/transform/utils.py"

‎demo/blogposts/Healthcare_NER_Model_Evaluation_with_LangTest.ipynb‎

Lines changed: 9533 additions & 0 deletions
Large diffs are not rendered by default.

‎demo/blogposts/KDnuggets_spacy_workflow.ipynb‎

Lines changed: 7 additions & 0 deletions
Large diffs are not rendered by default.

‎demo/tutorials/llm_notebooks/AI21_QA_Summarization_Testing_Notebook.ipynb‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,10 @@
213213
"* `NarrativeQA-test-tiny`\n",
214214
"#### HellaSwag\n",
215215
"* `HellaSwag-test`\n",
216-
"* `HellaSwag-test-tiny`"
216+
"* `HellaSwag-test-tiny`\n",
217+
"#### BBQ\n",
218+
"* `BBQ-test`\n",
219+
"* `BBQ-test-tiny`"
217220
]
218221
},
219222
{
@@ -238,7 +241,10 @@
238241
"* `add_speech_to_text_typo`\n",
239242
"* `add_slangs`\n",
240243
"* `dyslexia_word_swap`\n",
241-
"* `multiple_perturbations`"
244+
"* `multiple_perturbations`\n",
245+
"* `adjective_synonym_swap`\n",
246+
"* `adjective_antonym_swap`\n",
247+
"* `strip_all_punctuation`"
242248
]
243249
},
244250
{
@@ -1853,6 +1859,10 @@
18531859
"* `add_speech_to_text_typo`\n",
18541860
"* `add_slangs`\n",
18551861
"* `dyslexia_word_swap`\n",
1862+
"* `multiple_perturbations`\n",
1863+
"* `adjective_synonym_swap`\n",
1864+
"* `adjective_antonym_swap`\n",
1865+
"* `strip_all_punctuation`\n",
18561866
"\n",
18571867
"Available Bias tests for summarization task are:\n",
18581868
"\n",

‎demo/tutorials/llm_notebooks/Azure_OpenAI_QA_Summarization_Testing_Notebook.ipynb‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,10 @@
219219
"* `NarrativeQA-test-tiny`\n",
220220
"#### HellaSwag\n",
221221
"* `HellaSwag-test`\n",
222-
"* `HellaSwag-test-tiny`"
222+
"* `HellaSwag-test-tiny`\n",
223+
"#### BBQ\n",
224+
"* `BBQ-test`\n",
225+
"* `BBQ-test-tiny`"
223226
]
224227
},
225228
{
@@ -244,7 +247,10 @@
244247
"* `add_speech_to_text_typo`\n",
245248
"* `add_slangs`\n",
246249
"* `dyslexia_word_swap`\n",
247-
"* `multiple_perturbations`"
250+
"* `multiple_perturbations`\n",
251+
"* `adjective_synonym_swap`\n",
252+
"* `adjective_antonym_swap`\n",
253+
"* `strip_all_punctuation`"
248254
]
249255
},
250256
{
@@ -1845,6 +1851,10 @@
18451851
"* `add_speech_to_text_typo`\n",
18461852
"* `add_slang_typo`\n",
18471853
"* `dyslexia_word_swap`\n",
1854+
"* `multiple_perturbations`\n",
1855+
"* `adjective_synonym_swap`\n",
1856+
"* `adjective_antonym_swap`\n",
1857+
"* `strip_all_punctuation`\n",
18481858
"\n",
18491859
"Available Bias tests for summarization task are:\n",
18501860
"\n",

‎demo/tutorials/llm_notebooks/Cohere_QA_Summarization_Testing_Notebook.ipynb‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,10 @@
222222
"* `NarrativeQA-test-tiny`\n",
223223
"#### HellaSwag\n",
224224
"* `HellaSwag-test`\n",
225-
"* `HellaSwag-test-tiny`"
225+
"* `HellaSwag-test-tiny`\n",
226+
"#### BBQ\n",
227+
"* `BBQ-test`\n",
228+
"* `BBQ-test-tiny`"
226229
]
227230
},
228231
{
@@ -247,7 +250,10 @@
247250
"* `add_speech_to_text_typo`\n",
248251
"* `add_slangs`\n",
249252
"* `dyslexia_word_swap`\n",
250-
"* `multiple_perturbations`"
253+
"* `multiple_perturbations`\n",
254+
"* `adjective_synonym_swap`\n",
255+
"* `adjective_antonym_swap`\n",
256+
"* `strip_all_punctuation`"
251257
]
252258
},
253259
{
@@ -755,6 +761,9 @@
755761
"* `add_speech_to_text_typo`\n",
756762
"* `add_slangs`\n",
757763
"* `dyslexia_word_swap`\n",
764+
"* `multiple_perturbations`\n",
765+
"* `adjective_synonym_swap`\n",
766+
"* `adjective_antonym_swap`\n",
758767
"\n",
759768
"Available Bias tests for summarization task are:\n",
760769
"\n",

‎demo/tutorials/llm_notebooks/HuggingFaceHub_QA_Summarization_Testing_Notebook.ipynb‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,10 @@
213213
"* `NarrativeQA-test-tiny`\n",
214214
"#### HellaSwag\n",
215215
"* `HellaSwag-test`\n",
216-
"* `HellaSwag-test-tiny`\n"
216+
"* `HellaSwag-test-tiny`\n",
217+
"#### BBQ\n",
218+
"* `BBQ-test`\n",
219+
"* `BBQ-test-tiny`\n"
217220
]
218221
},
219222
{
@@ -238,7 +241,10 @@
238241
"* `add_speech_to_text_typo`\n",
239242
"* `add_slangs`\n",
240243
"* `dyslexia_word_swap`\n",
241-
"* `multiple_perturbations`"
244+
"* `multiple_perturbations`\n",
245+
"* `adjective_synonym_swap`\n",
246+
"* `adjective_antonym_swap`\n",
247+
"* `strip_all_punctuation`"
242248
]
243249
},
244250
{
@@ -742,6 +748,10 @@
742748
"* `add_speech_to_text_typo`\n",
743749
"* `add_slangs`\n",
744750
"* `dyslexia_word_swap`\n",
751+
"* `multiple_perturbations`\n",
752+
"* `adjective_synonym_swap`\n",
753+
"* `adjective_antonym_swap`\n",
754+
"* `strip_all_punctuation`\n",
745755
"\n",
746756
"Available Bias tests for summarization task are:\n",
747757
"\n",

0 commit comments

Comments
 (0)