Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Shaposhnikov committed Sep 9, 2024
2 parents 6696370 + 184e19c commit cdc591c
Show file tree
Hide file tree
Showing 47 changed files with 7,788 additions and 90 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Push
on: [push]

jobs:
tests:
strategy:
fail-fast: false
matrix:
python-version: ['3.10']
poetry-version: ['1.2.2']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: poetry install --extras "deepspeed gpu"
- name: Run tests
run: poetry run make tests
linters:
strategy:
fail-fast: false
matrix:
python-version: ['3.10']
poetry-version: ['1.2.2']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: poetry install --extras "deepspeed gpu"
- name: Run linters
run: poetry run make lint
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ coverage.xml
*.cover
.hypothesis/
.pytest_cache/
!tests/fixtures/models/llama2_tiny_multimodal_clip_mlp/projections/modality_adapters.pt

# Translations
*.mo
Expand Down Expand Up @@ -99,7 +100,6 @@ ENV/
env.bak/
venv.bak/
default_tb/
poetry.lock

# Spyder project settings
.spyderproject
Expand Down
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repos:
- repo: local
hooks:
- id: poetry-make-pretty
name: make pretty
entry: poetry run make pretty
language: system
types: [python]
stages: [commit]
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ flake:
flake8 --max-line-length 119 --jobs $(JOBS) --statistics $${CI:+--format=gl-codeclimate --output=codeclimate-flake8.json} $(CODE)

pylint:
pylint --jobs $(JOBS) --rcfile=setup.cfg $${CI:+--output-format=pylint_gitlab.GitlabCodeClimateReporter --output=codeclimate-pylint.json} $(CODE)
pylint --jobs $(JOBS) --rcfile=setup.cfg $(CODE)

mypy:
mypy --config-file mypy.ini $(CODE) --show-traceback
Expand All @@ -39,9 +39,6 @@ ifneq ($(CODE),)
unify --in-place --recursive $(CODE) tutorials
endif

bash-dev:
docker run -v $(shell pwd):/app --rm -it ${DEV_IMAGE} bash

lock:
rm poetry.lock
poetry lock
Expand Down
5 changes: 5 additions & 0 deletions configs/exp/train/classification/classification.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@
}
},
"tokenizer_settings": {},
"special_tokens_settings": {
"bos_token": "<s>",
"eos_token": "</s>",
"pad_token": "<pad>"
},
"trainer_settings": {
"evaluation_strategy": "steps",
"per_device_train_batch_size": 1,
Expand Down
4 changes: 4 additions & 0 deletions configs/exp/train/dpo/dpo.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@
}
},
"tokenizer_settings": {},
"special_tokens_settings": {
"bos_token": "<|begin_of_text|>",
"eos_token": "<|end_of_text|>"
},
"trainer_settings": {
"evaluation_strategy": "steps",
"per_device_train_batch_size": 1,
Expand Down
4 changes: 4 additions & 0 deletions configs/exp/train/multimodal/c_abs.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@
"tokenizer_settings": {
"tokenizer_path": "/from_s3/model"
},
"special_tokens_settings": {
"bos_token": "<s>",
"eos_token": "</s>"
},
"trainer_settings": {
"evaluation_strategy": "epoch",
"save_strategy": "epoch",
Expand Down
Empty file.
4 changes: 4 additions & 0 deletions configs/exp/train/multimodal/mlp.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@
"tokenizer_settings": {
"tokenizer_path": "/from_s3/model"
},
"special_tokens_settings": {
"bos_token": "<s>",
"eos_token": "</s>"
},
"trainer_settings": {
"evaluation_strategy": "epoch",
"save_strategy": "epoch",
Expand Down
4 changes: 4 additions & 0 deletions configs/exp/train/rag/end2end_rag.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@
"metric_settings": []
},
"tokenizer_settings": {},
"special_tokens_settings": {
"bos_token": "<s>",
"eos_token": "</s>"
},
"trainer_settings": {
"evaluation_strategy": "steps",
"save_strategy": "steps",
Expand Down
4 changes: 4 additions & 0 deletions configs/exp/train/rm/rm.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@
}
},
"tokenizer_settings": {},
"special_tokens_settings": {
"bos_token": "<|begin_of_text|>",
"eos_token": "<|end_of_text|>"
},
"trainer_settings": {
"evaluation_strategy": "steps",
"per_device_train_batch_size": 1,
Expand Down
Loading

0 comments on commit cdc591c

Please sign in to comment.