-
Notifications
You must be signed in to change notification settings - Fork 279
Expand file tree
/
Copy pathMakefile
More file actions
86 lines (73 loc) · 2.34 KB
/
Makefile
File metadata and controls
86 lines (73 loc) · 2.34 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# default rule
default: install
# ============================================================================
# Documentation Generation
# ============================================================================
# Usage:
# make docs # Generate docs (translate if needed, then build)
# make docs-update # Update all benchmark data (metadata only)
# make docs-update-stats # Update all benchmark data with statistics
# make docs-update BENCHMARK=gsm8k # Update specific benchmark
# make docs-translate # Translate benchmarks that need it
# make docs-translate FORCE=1 # Force re-translate all
# make docs-generate # Generate docs from persisted data
# ============================================================================
# Parameters
BENCHMARK ?=
FORCE ?=
WORKERS ?= 4
.PHONY: docs
docs: docs-translate docs-generate
$(MAKE) docs-en
$(MAKE) docs-zh
.PHONY: docs-update
docs-update:
ifdef BENCHMARK
python -m evalscope.cli.cli benchmark-info $(BENCHMARK) --update
else
python -m evalscope.cli.cli benchmark-info --all --update
endif
.PHONY: docs-update-stats
docs-update-stats:
ifdef BENCHMARK
python -m evalscope.cli.cli benchmark-info $(BENCHMARK) --update --compute-stats
else
python -m evalscope.cli.cli benchmark-info --all --update --compute-stats
endif
.PHONY: docs-translate
docs-translate:
ifdef BENCHMARK
ifdef FORCE
python -m evalscope.cli.cli benchmark-info $(BENCHMARK) --translate --force --workers $(WORKERS)
else
python -m evalscope.cli.cli benchmark-info $(BENCHMARK) --translate --workers $(WORKERS)
endif
else
ifdef FORCE
python -m evalscope.cli.cli benchmark-info --translate --force --workers $(WORKERS)
else
python -m evalscope.cli.cli benchmark-info --translate --workers $(WORKERS)
endif
endif
.PHONY: docs-generate
docs-generate:
python -m evalscope.cli.cli benchmark-info --generate-docs
.PHONY: docs-en
docs-en:
cd docs/en && make clean && make html
.PHONY: docs-zh
docs-zh:
cd docs/zh && make clean && make html
# ============================================================================
# Development
# ============================================================================
.PHONY: lint
lint:
pre-commit run --all-files
.PHONY: dev
dev:
pip install -e '.[dev,perf,docs]'
pip install pre-commit
.PHONY: install
install:
pip install -e .