Add fetch-quick, sbs-quick, train-quick targets for CI verification

This commit is contained in:
Fam Zheng 2025-11-23 18:10:58 +00:00
parent 1bf353c248
commit 84fc6a7ca0
2 changed files with 17 additions and 7 deletions

View File

@ -87,9 +87,10 @@ zy:
before_script: before_script:
- pip install uv --index-url https://pypi.tuna.tsinghua.edu.cn/simple - pip install uv --index-url https://pypi.tuna.tsinghua.edu.cn/simple
- export PATH="$HOME/.local/bin:$PATH" - export PATH="$HOME/.local/bin:$PATH"
- uv venv $HOME/venv - uv venv venv
- source $HOME/venv/bin/activate - source venv/bin/activate
- uv pip install -r requirements.txt --default-index https://pypi.tuna.tsinghua.edu.cn/simple - uv pip install -r requirements.txt --default-index https://pypi.tuna.tsinghua.edu.cn/simple
script: script:
- make fetch - make fetch-quick
- date - make sbs-quick
- make train-quick

View File

@ -1,4 +1,4 @@
.PHONY: FORCE emblemscanner-release fetch .PHONY: FORCE emblemscanner-release fetch fetch-quick sbs-quick train-quick
DATA_DIR ?= /data/emblem DATA_DIR ?= /data/emblem
@ -87,8 +87,17 @@ test: FORCE
cd api; ./manage.py migrate && ./manage.py test tests cd api; ./manage.py migrate && ./manage.py test tests
fetch: FORCE fetch: FORCE
cd emblem5 && ../venv/bin/python ai/fetch-scans.py --data-dir $(DATA_DIR) cd emblem5 && ./ai/fetch-scans.py --data-dir $(DATA_DIR)
cd emblem5 && ../venv/bin/python ai/make-sbs.py --data-dir $(DATA_DIR) cd emblem5 && ./ai/make-sbs.py --data-dir $(DATA_DIR)
fetch-quick: FORCE
cd emblem5 && ./ai/fetch-scans.py --data-dir $(DATA_DIR) --sample-rate 0.01
sbs-quick: FORCE
cd emblem5 && ./ai/make-sbs.py --data-dir $(DATA_DIR)
train-quick: FORCE
cd emblem5 && ./ai/train2.py --data-dir $(DATA_DIR) --quick --epochs 2
OPENCV_TAG := 4.9.0 OPENCV_TAG := 4.9.0
opencv/src/LICENSE: opencv/src/LICENSE: