-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (22 loc) · 1.38 KB
/
Copy pathMakefile
File metadata and controls
31 lines (22 loc) · 1.38 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
.PHONY: setup train_cat train_fraud score_csv test serve
setup:
python -m venv .venv && . .venv/bin/activate && pip install -U pip && pip install -r requirements.txt && cp -n .env.example .env || true
train_cat:
. .venv/bin/activate && python ml/training/train_categorisation.py --input data/sample_transactions.csv --target_col category --text_cols merchant description --registry model_registry.json
train_fraud:
. .venv/bin/activate && python ml/training/train_fraud_baseline.py --input data/sample_transactions.csv --amount_col amount --registry model_registry.json
score_csv:
. .venv/bin/activate && PYTHONPATH=. python -m ml.inference.score_csv --input data/sample_transactions.csv --output reports/sample_scored.csv --dataset ledgerguard --registry model_registry.json
score_paysim:
. .venv/bin/activate && PYTHONPATH=. python -m ml.inference.score_csv --input data/paysim.csv --output reports/paysim_scored.csv --dataset paysim --registry model_registry.json
test:
. .venv/bin/activate && coverage run -m pytest -q && coverage report
test-env:
. .venv/bin/activate && set -a && . .env && set +a && coverage run -m pytest -q && coverage report
test-docker:
docker compose up -d db web
docker compose exec web coverage run -m pytest -q
docker compose exec web coverage report
serve:
. .venv/bin/activate && python manage.py migrate && python manage.py runserver
Path: README.md (replace