.PHONY: install app experiment attention figures clean help test PYTHON ?= python CONFIG ?= configs/default.yaml help: ## Show this help @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}' install: ## Install all dependencies pip install -r requirements.txt download-samples: ## Download 10 sample ImageNet images (requer HF login) $(PYTHON) data/download_samples.py app: ## Run the Gradio web app $(PYTHON) app.py experiment: ## Run full attack sweep (CONFIG=configs/experiments/exp_quick_test.yaml) $(PYTHON) experiments/run_attack_sweep.py --config $(CONFIG) experiment-dry: ## Dry run: show combinations without running attacks $(PYTHON) experiments/run_attack_sweep.py --config $(CONFIG) --dry-run attention: ## Run attention analysis for all config combinations $(PYTHON) experiments/run_attention_analysis.py --config $(CONFIG) --all quick-test: ## Run quick experiment (single model, FGSM, 1 epsilon) $(PYTHON) experiments/run_attack_sweep.py --config configs/experiments/exp_quick_test.yaml test: ## Run all unit tests $(PYTHON) -m unittest discover -s tests -t . -p "*_test.py" -v clean-results: ## Remove all experiment outputs rm -rf results/raw/ results/figures/ results/tables/ clean: clean-results ## Clean all generated files find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true find . -name "*.pyc" -delete 2>/dev/null || true