forked from huggingface/trl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (23 loc) · 1.04 KB
/
Copy pathMakefile
File metadata and controls
30 lines (23 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.PHONY: test precommit slow_tests test_experimental claude clean-ai
# Transient infrastructure errors that are worth retrying, matched against "<ExceptionType>: <message>":
# - OSError, Timeout, HTTPError 502/504: Hub flakiness
# - out of memory, STATUS_ALLOC_FAILED: GPU memory pressure, matched on the message since the raising type varies
rerun_errors := (OSError|Timeout|HTTPError.*502|HTTPError.*504|out of memory|STATUS_ALLOC_FAILED)
test:
pytest -n auto -m "not slow and not low_priority" -s -v --reruns 5 --reruns-delay 1 --only-rerun '$(rerun_errors)' tests
precommit:
python scripts/add_copyrights.py
pre-commit run --all-files
slow_tests:
pytest -m "slow" tests/ $(PYTEST_ARGS)
test_experimental:
pytest -n auto -s -v tests/experimental
claude:
mkdir -p .claude
rm -rf .claude/skills
ln -snf ../.agents/skills .claude/skills
# The `.agents/skills` line removes a leftover symlink from the old `make codex` setup; the tracked
# directory is left alone.
clean-ai:
[ -L .agents/skills ] && rm .agents/skills || true
rm -rf .claude/skills