Skip to content

Commit 09c7a19

Browse files
voorhsSeBorgeygithub-actions[bot]DarinochkaSamoed
authored
Update interruption handling (#198)
* full tuning (#165) * Added code for full tuning * work on review * renaming * fix ruff * mypy test * ignote mypy * Feat/bert scorer config refactoring (#168) * refactor configs * add proper configs to BERTScorer * fix typing * fix tokenizer's parameters * fix transformers and accelerate issue * Update optimizer_config.schema.json * bug fix * update callback test * fix tests --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * delete validate_task * report_to * batches * Fix/docs building for bert scorer (#171) * fix * fix codestyle --------- Co-authored-by: Алексеев Илья <44509110+voorhs@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * bert-scorer ending (#172) * batches * tests check * fix * return to torch * fix for tests * Fix/bert scorer (#174) * fix str and float issue and shrinken search space * update `inference node config` overriding logic * fix typing * fix codestyle * fix multilabel issue * attempt to fix `inference node config` bugs * another attempt --------- Co-authored-by: Алексеев Илья <44509110+voorhs@users.noreply.github.com> * Feat/code carbon each node (#175) * feat: update codecarbon * feat: update codecarbon * feat: added codecarbon * Update optimizer_config.schema.json * fix: fixed import mypy * fix: codecarbon package * fix: only float\integer log * fix: codecarbon package * fix: mypy * fix: test * fix: delete emissions * fix: test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * standartize pyproject & speedup tests (#176) * speedup tests * fix pyproject * Update optimizer_config.schema.json * move optional dependencies * fixes * add xdist * fix ci * download data from hub in doc * add caching * add doc cache --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: voorhs <ilya_alekseev_2016@list.ru> * add proper `omit` definition for tests coverage report (#179) * add proper `omit` definition * Update optimizer_config.schema.json * exclude tmp from coverage report --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * add node validators (#177) * add node validators * add comments * Update optimizer_config.schema.json * rename bert model * lint * fixes * fix test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: voorhs <ilya_alekseev_2016@list.ru> * dumper saving (#180) * added main code for saving models * Update optimizer_config.schema.json * checker fixes * Revert "checker fixes" This reverts commit 6e32eb9. * Revert "added main code for saving models" This reverts commit 5637fb8. * drat main code for new dumper * ruf fix * comments * added code for test dumper * Check dumper (#182) * Feat/code carbon each node (#175) * feat: update codecarbon * feat: update codecarbon * feat: added codecarbon * Update optimizer_config.schema.json * fix: fixed import mypy * fix: codecarbon package * fix: only float\integer log * fix: codecarbon package * fix: mypy * fix: test * fix: delete emissions * fix: test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * standartize pyproject & speedup tests (#176) * speedup tests * fix pyproject * Update optimizer_config.schema.json * move optional dependencies * fixes * add xdist * fix ci * download data from hub in doc * add caching * add doc cache --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: voorhs <ilya_alekseev_2016@list.ru> * add proper `omit` definition for tests coverage report (#179) * add proper `omit` definition * Update optimizer_config.schema.json * exclude tmp from coverage report --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * add node validators (#177) * add node validators * add comments * Update optimizer_config.schema.json * rename bert model * lint * fixes * fix test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: voorhs <ilya_alekseev_2016@list.ru> * update makefile * update bert test * mypy workaround * attempt to fix windows permission error * workaround --------- Co-authored-by: Darinochka <39233990+Darinochka@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Roman Solomatin <samoed.roman@gmail.com> --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Алексеев Илья <44509110+voorhs@users.noreply.github.com> Co-authored-by: Darinochka <39233990+Darinochka@users.noreply.github.com> Co-authored-by: Roman Solomatin <samoed.roman@gmail.com> * Update embedder prompt (#183) * Add trust remote code (#185) * lint * fix trust remote code * Update optimizer_config.schema.json * update fix trust remote code * fix test cllback --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * Remove autointent org from docs (#186) * lint * update paths * feat: added crossencoder (#181) * feat: added crossencoder * refactor * feat: added arg similarity * Update optimizer_config.schema.json * feat: added tests * feat: added errors * fix: scoring test * fix: description vectors error * fix: description vectors error * fix: lint * fix: test * add node validators (#177) * add node validators * add comments * Update optimizer_config.schema.json * rename bert model * lint * fixes * fix test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: voorhs <ilya_alekseev_2016@list.ru> * fix: unit tests * feat: added test for description * feat: delete encoder_type from the class args * feat: update assets * feat: update assets * fix: fixed test * Update optimizer_config.schema.json --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Roman Solomatin <samoed.roman@gmail.com> Co-authored-by: voorhs <ilya_alekseev_2016@list.ru> * Add few shot (#187) * init few shot * Update optimizer_config.schema.json * apply few shot to all * Update optimizer_config.schema.json * fix test * lint --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * update numpy typing (#188) * Lora scorer (#170) * added lora scorer * fix ruff * Update __init__.py * updated after mr #165 * Update pyproject.toml * fixed requested changes * fixed ruff failing * fixed remarks * Update optimizer_config.schema.json * added test * ruff fix * convert labels to float * Update autointent/modules/scoring/_lora/lora.py Co-authored-by: Roman Solomatin <samoed.roman@gmail.com> * Update autointent/modules/scoring/_lora/lora.py Co-authored-by: Roman Solomatin <samoed.roman@gmail.com> * change model_config name, added trust_remote_code * Update lora.py * inherited lora from bert * fix ruff * fix search space * Update lora.py * Update lora.py * added dump check * Update test_lora.py * Update test_lora.py * added docstring * fix ruff * Update test_lora.py * Update test_lora.py --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Roman Solomatin <samoed.roman@gmail.com> * PTuningScorer (#178) * Initial commit of PTuningScorer module * Added peft (>=0.10.0, <0.15.0) in dependencies * Implement fit/predict PTuningScorer * Added PTuningScorer in __init__ file * Update optimizer_config.schema.json * Minor fixs * PGH00 * Refactor clear_cache in fit method * Refactor typing ignore + remove unnecessary * Fix fit method status check * Added test for PTuningScorer * Fix mypy typing * Update and fix peft version dependencies * Fix mypy typing * Added test in multiclass.yaml, multilabel.yaml * Update docs strings * Fix mypy typing * Added trust_remote_code * make proper rst reference * Added test for dump lod * feat: added crossencoder (#181) * feat: added crossencoder * refactor * feat: added arg similarity * Update optimizer_config.schema.json * feat: added tests * feat: added errors * fix: scoring test * fix: description vectors error * fix: description vectors error * fix: lint * fix: test * add node validators (#177) * add node validators * add comments * Update optimizer_config.schema.json * rename bert model * lint * fixes * fix test --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: voorhs <ilya_alekseev_2016@list.ru> * fix: unit tests * feat: added test for description * feat: delete encoder_type from the class args * feat: update assets * feat: update assets * fix: fixed test * Update optimizer_config.schema.json --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Roman Solomatin <samoed.roman@gmail.com> Co-authored-by: voorhs <ilya_alekseev_2016@list.ru> * Added fixed seed to test reproduction * Pull LoraScorer and Bert Refactor * Refactor PTuningScorer * Refactor test for ptuning * Fix typing * Fix multilabel multiclass tests * Fix typing --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: voorhs <ilya_alekseev_2016@list.ru> Co-authored-by: Darinochka <39233990+Darinochka@users.noreply.github.com> Co-authored-by: Roman Solomatin <samoed.roman@gmail.com> * Rerank scorer: опция для выбора источника для расчета вектора вероятностей (#115) * Enable rerank scorer to use crossencoder scores for the probability vector * add cross encoder scores range options * upd test --------- Co-authored-by: voorhs <ilya_alekseev_2016@list.ru> * feat: add DISABLE_EMISSIONS_TRACKING (#191) * feat: add DISABLE_EMISSIONS_TRACKING * try to fix docs error * Update optimizer_config.schema.json * another attempt * Update optimizer_config.schema.json * i give up for now * Update optimizer_config.schema.json --------- Co-authored-by: voorhs <ilya_alekseev_2016@list.ru> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix issue (#194) * Refactor/embedding caching (#195) * implement new hashing strategy * fix codestyle * Update optimizer_config.schema.json * minor bug fix * fix typing error * refactor similarity calculation * Update optimizer_config.schema.json * upd callback test * solve 429 error --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * forgot something --------- Co-authored-by: Сергей Малышев <68858104+SeBorgey@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Darinochka <39233990+Darinochka@users.noreply.github.com> Co-authored-by: Roman Solomatin <samoed.roman@gmail.com> Co-authored-by: VALERIA RUBANOVA <76725077+riapush@users.noreply.github.com> Co-authored-by: nikiduki <72929274+nikiduki@users.noreply.github.com> Co-authored-by: Dmitryv-2024 <dmitry.v.zhelobanov@yandex.ru>
1 parent d4249aa commit 09c7a19

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+2411
-552
lines changed

.github/workflows/build-docs.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,36 @@ jobs:
3636
with:
3737
python-version: "3.10"
3838

39-
- name: setup poetry
40-
run: |
41-
curl -sSL https://install.python-poetry.org | python -
39+
- name: Cache Hugging Face
40+
id: cache-hf
41+
uses: actions/cache@v4
42+
with:
43+
path: ~/.cache/huggingface
44+
key: docs-cache-hf
4245

4346
- name: Install pandoc
4447
run: |
4548
sudo apt install pandoc
4649
4750
- name: Install dependencies
4851
run: |
49-
poetry install --with docs
52+
pip install .[docs]
5053
5154
- name: Run tests
5255
if: github.event_name != 'workflow_dispatch'
5356
run: |
5457
echo "Testing documentation build..."
55-
make test-docs
58+
python -m sphinx build -b doctest docs/source docs/build/html
5659
5760
- name: Build documentation
5861
if: ${{ github.ref == 'refs/heads/dev' }} && github.event_name != 'workflow_dispatch'
5962
run: |
60-
make docs
63+
python -m sphinx build -b html docs/source docs/build/html
6164
6265
- name: build multiversion documentation
6366
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
6467
run: |
65-
make multi-version-docs
68+
sphinx-multiversion docs/source docs/build/html
6669
6770
- name: Deploy to GitHub Pages
6871
uses: peaceiris/actions-gh-pages@v3
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Reusable Test Workflow
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
test_command:
7+
required: true
8+
type: string
9+
description: 'Command to run tests'
10+
11+
jobs:
12+
test:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [ ubuntu-latest ]
18+
python-version: [ "3.10", "3.11", "3.12" ]
19+
include:
20+
- os: windows-latest
21+
python-version: "3.10"
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Cache Hugging Face
28+
id: cache-hf
29+
uses: actions/cache@v4
30+
with:
31+
path: ~/.cache/huggingface
32+
key: ${{ runner.os }}-hf
33+
34+
- name: Setup Python ${{ matrix.python-version }}
35+
uses: actions/setup-python@v5
36+
with:
37+
python-version: ${{ matrix.python-version }}
38+
cache: "pip"
39+
40+
- name: Install dependencies
41+
run: |
42+
pip install .[test]
43+
44+
- name: Run tests
45+
run: |
46+
${{ inputs.test_command }}

.github/workflows/test-inference.yaml

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,6 @@ on:
88

99
jobs:
1010
test:
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
os: [ ubuntu-latest ]
16-
python-version: [ "3.10", "3.11", "3.12" ]
17-
include:
18-
- os: windows-latest
19-
python-version: "3.10"
20-
21-
steps:
22-
- name: Checkout code
23-
uses: actions/checkout@v4
24-
25-
- name: Setup Python ${{ matrix.python-version }}
26-
uses: actions/setup-python@v5
27-
with:
28-
python-version: ${{ matrix.python-version }}
29-
cache: "pip"
30-
31-
- name: Install dependencies
32-
run: |
33-
pip install .
34-
pip install pytest pytest-asyncio
35-
36-
- name: Run tests
37-
run: |
38-
pytest tests/pipeline/test_inference.py
11+
uses: ./.github/workflows/reusable-test.yaml
12+
with:
13+
test_command: pytest -n auto tests/pipeline/test_inference.py

.github/workflows/test-nodes.yaml

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,6 @@ on:
88

99
jobs:
1010
test:
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
os: [ ubuntu-latest ]
16-
python-version: [ "3.10", "3.11", "3.12" ]
17-
include:
18-
- os: windows-latest
19-
python-version: "3.10"
20-
21-
steps:
22-
- name: Checkout code
23-
uses: actions/checkout@v4
24-
25-
- name: Setup Python ${{ matrix.python-version }}
26-
uses: actions/setup-python@v5
27-
with:
28-
python-version: ${{ matrix.python-version }}
29-
cache: "pip"
30-
31-
- name: Install dependencies
32-
run: |
33-
pip install .
34-
pip install pytest pytest-asyncio
35-
36-
- name: Run tests
37-
run: |
38-
pytest tests/nodes
11+
uses: ./.github/workflows/reusable-test.yaml
12+
with:
13+
test_command: pytest -n auto tests/nodes

.github/workflows/test-optimization.yaml

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,6 @@ on:
88

99
jobs:
1010
test:
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
os: [ ubuntu-latest ]
16-
python-version: [ "3.10", "3.11", "3.12" ]
17-
include:
18-
- os: windows-latest
19-
python-version: "3.10"
20-
21-
steps:
22-
- name: Checkout code
23-
uses: actions/checkout@v4
24-
25-
- name: Setup Python ${{ matrix.python-version }}
26-
uses: actions/setup-python@v5
27-
with:
28-
python-version: ${{ matrix.python-version }}
29-
cache: "pip"
30-
31-
- name: Install dependencies
32-
run: |
33-
pip install .
34-
pip install pytest pytest-asyncio
35-
36-
- name: Run tests
37-
run: |
38-
pytest tests/pipeline/test_optimization.py
11+
uses: ./.github/workflows/reusable-test.yaml
12+
with:
13+
test_command: pytest -n auto tests/pipeline/test_optimization.py

.github/workflows/test-presets.yaml

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,6 @@ on:
88

99
jobs:
1010
test:
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
os: [ ubuntu-latest ]
16-
python-version: [ "3.10", "3.11", "3.12" ]
17-
include:
18-
- os: windows-latest
19-
python-version: "3.10"
20-
21-
steps:
22-
- name: Checkout code
23-
uses: actions/checkout@v4
24-
25-
- name: Setup Python ${{ matrix.python-version }}
26-
uses: actions/setup-python@v5
27-
with:
28-
python-version: ${{ matrix.python-version }}
29-
cache: "pip"
30-
31-
- name: Install dependencies
32-
run: |
33-
pip install .
34-
pip install pytest pytest-asyncio
35-
36-
- name: Run tests
37-
run: |
38-
pytest tests/pipeline/test_presets.py
11+
uses: ./.github/workflows/reusable-test.yaml
12+
with:
13+
test_command: pytest -n auto tests/pipeline/test_presets.py

.github/workflows/typing.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,9 @@ jobs:
1111
python-version: "3.10"
1212
cache: "pip"
1313

14-
- name: Install Poetry
15-
run: |
16-
curl -sSL https://install.python-poetry.org | python3 -
17-
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
18-
1914
- name: Install dependencies
2015
run: |
21-
poetry install --with typing
16+
pip install .[typing]
2217
2318
- name: Run mypy
24-
run: make typing
19+
run: mypy autointent

.github/workflows/unit-tests.yaml

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,6 @@ on:
88

99
jobs:
1010
test:
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
os: [ ubuntu-latest ]
16-
python-version: [ "3.10", "3.11", "3.12" ]
17-
include:
18-
- os: windows-latest
19-
python-version: "3.10"
20-
21-
steps:
22-
- name: Checkout code
23-
uses: actions/checkout@v4
24-
25-
- name: Setup Python ${{ matrix.python-version }}
26-
uses: actions/setup-python@v5
27-
with:
28-
python-version: ${{ matrix.python-version }}
29-
cache: "pip"
30-
31-
- name: Install dependencies
32-
run: |
33-
pip install .
34-
pip install pytest pytest-asyncio
35-
36-
- name: Run tests
37-
run: |
38-
pytest --ignore=tests/nodes --ignore=tests/pipeline
11+
uses: ./.github/workflows/reusable-test.yaml
12+
with:
13+
test_command: pytest -n auto --ignore=tests/nodes --ignore=tests/pipeline

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,4 +180,5 @@ tests/logs
180180
runs/
181181
vector_db*
182182
*.db
183-
*.sqlite
183+
*.sqlite
184+
/wandb

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ poetry = poetry run
33

44
.PHONY: install
55
install:
6-
poetry install --with dev,test,typing,docs
6+
poetry install --extras "dev test typing docs"
77

88
.PHONY: test
99
test:
@@ -24,7 +24,7 @@ lint:
2424

2525
.PHONY: sync
2626
sync:
27-
poetry sync --with dev,test,typing,docs
27+
poetry sync --extras "dev test typing docs"
2828

2929
.PHONY: docs
3030
docs:

0 commit comments

Comments
 (0)