-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (45 loc) · 1.89 KB
/
Copy pathMakefile
File metadata and controls
64 lines (45 loc) · 1.89 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
.PHONY: help install dev-install lint format test data features train-retrieval train-ranker \
index serve docker-build docker-up docker-down k8s-apply drift ab-test clean
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-18s\033[0m %s\n", $$1, $$2}'
install: ## Install runtime dependencies
pip install -r requirements.txt && pip install -e .
dev-install: ## Install dev dependencies + pre-commit
pip install -r requirements-dev.txt && pip install -e . && pre-commit install
lint: ## Run ruff + mypy
ruff check src tests
mypy src
format: ## Auto-format with black + ruff
black src tests
ruff check --fix src tests
test: ## Run the test suite
pytest
data: ## Download & preprocess MovieLens-25M
python -m recsys.data.download
python -m recsys.data.preprocess
features: ## Run distributed Spark feature engineering
python -m recsys.data.spark_features
train-retrieval: ## Train the two-tower retrieval model
python -m recsys.training.train_retrieval
train-ranker: ## Train the XGBoost re-ranking model
python -m recsys.training.train_ranker
index: ## Build the ANN retrieval index
python -m recsys.retrieval.build_index
serve: ## Start the FastAPI inference service
uvicorn recsys.serving.app:app --host 0.0.0.0 --port 8080
drift: ## Run Evidently drift report
python -m recsys.monitoring.drift
ab-test: ## Run offline A/B test analysis
python -m recsys.evaluation.ab_test
docker-build: ## Build the serving image
docker build -t recsys-serving:latest .
docker-up: ## Start full stack (API, MLflow, Prometheus, Grafana)
docker compose up -d
docker-down: ## Tear down the stack
docker compose down
k8s-apply: ## Apply Kubernetes manifests
kubectl apply -f k8s/
clean: ## Remove caches and build artifacts
rm -rf build dist *.egg-info .pytest_cache .mypy_cache .ruff_cache
find . -type d -name __pycache__ -exec rm -rf {} +