-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (53 loc) · 2.05 KB
/
Copy pathMakefile
File metadata and controls
68 lines (53 loc) · 2.05 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
.PHONY: setup install clean format test test-unit test-live eval-smoke inference evaluate train venv
# Python executable (use venv if available)
PYTHON := $(shell if [ -d "venv" ]; then echo "venv/bin/python"; else echo "python3.10"; fi)
PIP := $(shell if [ -d "venv" ]; then echo "venv/bin/pip"; else echo "pip"; fi)
# Create virtual environment
venv:
python3.10 -m venv venv
$(PIP) install --upgrade pip
# Full setup: create venv and install dependencies
setup: venv install
@echo "Setup complete! Don't forget to:"
@echo " 1. Edit .env with your API keys"
@echo " 2. Run 'make inference' to test"
install:
$(PIP) install -r requirements.txt
$(PIP) install -e .
clean:
find . -type d -name "__pycache__" -exec rm -rf {} +
find . -type f -name "*.pyc" -delete
rm -rf logs/*
rm -rf checkpoints/*
format:
$(PYTHON) -m black src scripts
$(PYTHON) -m isort src scripts
test:
$(MAKE) test-unit
test-unit:
$(PYTHON) -m pytest -q
test-live:
RUN_LIVE_API_TESTS=1 $(PYTHON) -m pytest -m live -q
eval-smoke:
$(PYTHON) scripts/evaluate.py --config configs/default.yaml --limit 2 --no-resume
# Run single inference query
inference:
$(PYTHON) scripts/inference.py --config configs/default.yaml --query "Compare the revenue growth of NVIDIA vs AMD in the quarter after H100 release."
# Run single inference with custom query
inference-custom:
@read -p "Enter your query: " query; \
$(PYTHON) scripts/inference.py --config configs/default.yaml --query "$$query"
# Run full evaluation on golden set
evaluate:
$(PYTHON) scripts/evaluate.py --config configs/default.yaml
# In Agentic workflows, 'training' is often synonymous with 'running the evaluation harness'
train: evaluate
# Show help
help:
@echo "Available commands:"
@echo " make setup - Create venv and install all dependencies"
@echo " make install - Install dependencies only"
@echo " make inference - Run single query inference"
@echo " make evaluate - Run full evaluation on golden set"
@echo " make clean - Clean cache and logs"
@echo " make format - Format code with black and isort"