peft

Форк
0
/
Makefile 
55 строк · 2.4 Кб
1
.PHONY: quality style test docs
2

3
check_dirs := src tests examples docs scripts docker
4

5
# Check that source code meets quality standards
6

7
# this target runs checks on all files
8
quality:
9
	ruff $(check_dirs)
10
	ruff format --check $(check_dirs)
11
	doc-builder style src/peft tests docs/source --max_len 119 --check_only
12

13
# Format source code automatically and check is there are any problems left that need manual fixing
14
style:
15
	ruff $(check_dirs) --fix
16
	ruff format $(check_dirs)
17
	doc-builder style src/peft tests docs/source --max_len 119
18

19
test:
20
	python -m pytest -n 3 tests/ $(if $(IS_GITHUB_CI),--report-log "ci_tests.log",)
21

22
tests_examples_multi_gpu:
23
	python -m pytest -m multi_gpu_tests tests/test_gpu_examples.py $(if $(IS_GITHUB_CI),--report-log "multi_gpu_examples.log",)
24

25
tests_examples_single_gpu:
26
	python -m pytest -m single_gpu_tests tests/test_gpu_examples.py $(if $(IS_GITHUB_CI),--report-log "single_gpu_examples.log",)
27

28
tests_core_multi_gpu:
29
	python -m pytest -m multi_gpu_tests tests/test_common_gpu.py $(if $(IS_GITHUB_CI),--report-log "core_multi_gpu.log",)
30

31
tests_core_single_gpu:
32
	python -m pytest -m single_gpu_tests tests/test_common_gpu.py $(if $(IS_GITHUB_CI),--report-log "core_single_gpu.log",)
33

34
tests_common_gpu:
35
	python -m pytest tests/test_decoder_models.py $(if $(IS_GITHUB_CI),--report-log "common_decoder.log",)
36
	python -m pytest tests/test_encoder_decoder_models.py $(if $(IS_GITHUB_CI),--report-log "common_encoder_decoder.log",)
37

38
tests_examples_multi_gpu_bnb:
39
	python -m pytest -m "multi_gpu_tests and bitsandbytes" tests/test_gpu_examples.py $(if $(IS_GITHUB_CI),--report-log "multi_gpu_examples.log",)
40

41
tests_examples_single_gpu_bnb:
42
	python -m pytest -m "single_gpu_tests and bitsandbytes" tests/test_gpu_examples.py $(if $(IS_GITHUB_CI),--report-log "single_gpu_examples.log",)
43

44
tests_core_multi_gpu_bnb:
45
	python -m pytest -m "multi_gpu_tests and bitsandbytes" tests/test_common_gpu.py $(if $(IS_GITHUB_CI),--report-log "core_multi_gpu.log",)
46

47
tests_core_single_gpu_bnb:
48
	python -m pytest -m "single_gpu_tests and bitsandbytes" tests/test_common_gpu.py $(if $(IS_GITHUB_CI),--report-log "core_single_gpu.log",)
49

50
# For testing transformers tests for bnb runners
51
transformers_tests:
52
	RUN_SLOW=1 python -m pytest transformers-clone/tests/quantization/bnb $(if $(IS_GITHUB_CI),--report-log "transformers_tests.log",)
53

54
tests_regression:
55
	python -m pytest -s --regression tests/regression/ $(if $(IS_GITHUB_CI),--report-log "regression_tests.log",)
56

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.