| .PHONY: install test lint fmt train deploy pipeline |
|
|
| PYTHON := python3.12 |
| PIP := $(PYTHON) -m pip |
| HF_REPO ?= LesterCerioli/Speed |
| MODEL_OUT ?= output |
|
|
| |
| install: |
| $(PIP) install --upgrade pip |
| $(PIP) install -r requirements.txt |
| $(PIP) install -e ".[dev]" |
|
|
| |
| test: |
| pytest tests/ -v --tb=short |
|
|
| lint: |
| ruff check src/ tests/ |
| mypy src/ --ignore-missing-imports |
|
|
| fmt: |
| ruff check --fix src/ tests/ |
|
|
| |
| 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: |
| HF_REPO_ID=$(HF_REPO) MODEL_DIR=$(MODEL_OUT) bash scripts/deploy_huggingface.sh |
|
|
| |
| pipeline: install lint test train deploy |
|
|