Speed / Makefile
LesterCerioli's picture
Building Speed LLM
eea7ef1
Raw
History Blame Contribute Delete
1.78 kB
.PHONY: install test lint fmt train deploy pipeline
PYTHON := python3.12
PIP := $(PYTHON) -m pip
HF_REPO ?= LesterCerioli/Speed
MODEL_OUT ?= output
# ── Setup ──────────────────────────────────────────────────────────────────
install:
$(PIP) install --upgrade pip
$(PIP) install -r requirements.txt
$(PIP) install -e ".[dev]"
# ── Quality ────────────────────────────────────────────────────────────────
test:
pytest tests/ -v --tb=short
lint:
ruff check src/ tests/
mypy src/ --ignore-missing-imports
fmt:
ruff check --fix src/ tests/
# ── Treinamento ────────────────────────────────────────────────────────────
train:
$(PYTHON) -c "\
from src.models.fiscal_llm import PipelineFiscal; \
p = PipelineFiscal(diretorio_saida='$(MODEL_OUT)'); \
hist = p.treinar(epochs=30, caminho_saida='$(MODEL_OUT)/modelo_fiscal.pt'); \
print(hist)"
# ── Deploy ─────────────────────────────────────────────────────────────────
deploy:
HF_REPO_ID=$(HF_REPO) MODEL_DIR=$(MODEL_OUT) bash scripts/deploy_huggingface.sh
# ── Pipeline completo ──────────────────────────────────────────────────────
pipeline: install lint test train deploy