-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
154 lines (142 loc) · 4.94 KB
/
Copy pathTaskfile.yml
File metadata and controls
154 lines (142 loc) · 4.94 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
version: '3'
# Taskfile.yml - reproducible entrypoints for Codegeist model workflows
#
# Why this exists:
# - Keeps the devcontainer image free of the optional 52-package inference
# environment while making setup and execution repeatable outside one session.
# - Delegates all behavior to the locked training, inference, and GGUF projects;
# package pins and model logic remain in their source files.
#
# Side effects:
# - `setup` creates the ignored `jobs/training/inference/.venv` on demand.
# - `infer` downloads the pinned public model and adapter on first execution.
# - `evidence` rewrites generated review artifacts under `docs/evidence/`.
# - `gguf-setup` refreshes the shared locked inference environment and creates
# the ignored GGUF artifact root on demand.
# - `gguf-build` writes model intermediates and a public promotion tree below
# the ignored `.artifacts/gguf/` root.
#
# Runtime contract:
# - `infer` runs only in the GPU-enabled project devcontainer configured by
# `.codegeist/compose.local.yml`; `infer.py` validates loaded model placement
# and dtype instead of repeating CUDA/BF16 environment availability checks.
vars:
TRAINING_PROJECT: '{{.ROOT_DIR}}/jobs/training'
INFERENCE_PROJECT: '{{.ROOT_DIR}}/jobs/training/inference'
INFERENCE_ENVIRONMENT: '{{.ROOT_DIR}}/jobs/training/inference/.venv'
TRAINING_PYTHON: '3.12.12'
TEST_ENVIRONMENT: '/tmp/codegeist-training-test-venv'
GGUF_PROJECT: '{{.ROOT_DIR}}/jobs/gguf'
GGUF_CONVERSION_PROJECT: '{{.ROOT_DIR}}/jobs/gguf/conversion'
GGUF_ENVIRONMENT: '{{.INFERENCE_ENVIRONMENT}}'
GGUF_OUTPUT_ROOT: '{{.ROOT_DIR}}/.artifacts/gguf'
tasks:
default:
desc: List available workflows
cmds:
- task --list
silent: true
setup:
desc: Install the locked GPU inference environment on demand
env:
UV_LINK_MODE: copy
cmds:
- >-
uv sync
--project "{{.INFERENCE_PROJECT}}"
--frozen
--no-dev
--python "{{.TRAINING_PYTHON}}"
- >-
"{{.INFERENCE_ENVIRONMENT}}/bin/python" -c
'import torch; assert torch.__version__.startswith("2.6.0"); assert torch.version.cuda == "12.4"; print(f"torch={torch.__version__} cuda={torch.version.cuda}")'
test:
desc: Run all weightless contracts and verify every lockfile
env:
UV_PROJECT_ENVIRONMENT: '{{.TEST_ENVIRONMENT}}'
cmds:
- uv lock --project "{{.TRAINING_PROJECT}}" --check
- uv lock --project "{{.INFERENCE_PROJECT}}" --check
- uv lock --project "{{.GGUF_PROJECT}}" --check
- uv lock --project "{{.GGUF_CONVERSION_PROJECT}}" --check
- >-
uv run
--project "{{.TRAINING_PROJECT}}"
--frozen
--only-group dev
pytest "{{.TRAINING_PROJECT}}/tests"
- >-
uv run
--project "{{.GGUF_PROJECT}}"
--frozen
--only-group dev
pytest "{{.GGUF_PROJECT}}/tests"
- git diff --check
evidence:
desc: Regenerate the curated evidence dashboard and Mermaid provenance
cmds:
- python3 "{{.TRAINING_PROJECT}}/render_training_evidence.py"
infer:
desc: Set up and run the strict public-adapter GPU verifier
deps:
- setup
cmds:
- >-
"{{.INFERENCE_ENVIRONMENT}}/bin/python"
"{{.TRAINING_PROJECT}}/infer.py"
{{.CLI_ARGS}}
gguf-setup:
desc: Reuse the reviewed CUDA PEFT environment for GGUF merge and publication
deps:
- setup
cmds:
- mkdir -p "{{.GGUF_OUTPUT_ROOT}}"
- >-
"{{.GGUF_ENVIRONMENT}}/bin/python" -c
'import torch; assert torch.__version__.startswith("2.6.0"); assert torch.version.cuda == "12.4"; print(f"torch={torch.__version__} cuda={torch.version.cuda}")'
gguf-build:
desc: Build one token-free merged Q4_K_M GGUF in the GPU devcontainer
deps:
- gguf-setup
env:
CODEGEIST_GGUF_OUTPUT_ROOT: '{{.GGUF_OUTPUT_ROOT}}'
HF_HUB_DISABLE_IMPLICIT_TOKEN: '1'
cmds:
- >-
env -u HF_TOKEN
"{{.GGUF_ENVIRONMENT}}/bin/python"
"{{.GGUF_PROJECT}}/build.py"
{{.CLI_ARGS}}
gguf-compare:
desc: Require byte-identical Q4_K_M files from two clean builds
requires:
vars:
- BUILD_A
- BUILD_B
cmds:
- >-
cmp
"{{.BUILD_A}}/public/gguf/codegeist-llm-Q4_K_M.gguf"
"{{.BUILD_B}}/public/gguf/codegeist-llm-Q4_K_M.gguf"
- >-
sha256sum
"{{.BUILD_A}}/public/gguf/codegeist-llm-Q4_K_M.gguf"
"{{.BUILD_B}}/public/gguf/codegeist-llm-Q4_K_M.gguf"
gguf-publish:
desc: Publish one reviewed GGUF tree with the runtime Hub credential
deps:
- gguf-setup
env:
CODEGEIST_GGUF_OUTPUT_ROOT: '{{.GGUF_OUTPUT_ROOT}}'
HF_HUB_DISABLE_IMPLICIT_TOKEN: '1'
cmds:
- >-
"{{.GGUF_ENVIRONMENT}}/bin/python"
"{{.GGUF_PROJECT}}/publish.py"
{{.CLI_ARGS}}
all:
desc: Regenerate evidence, run contracts, and execute GPU inference
cmds:
- task: evidence
- task: test
- task: infer