teaching a transformer to understand how far apart (common) cities are.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.2 KiB

all: install data train eval
city_distances_full.csv: check generate_data.py
@echo "Generating distance data..."
2 years ago
@bash -c 'time python generate_data.py --country US --workers 8 --chunk-size 8000'
data: city_distances_full.csv
train: check train.py
@echo "Training embeddings..."
@bash -c 'time python train.py'
eval: check eval.py
@echo "Evaluating trained model..."
@bash -c 'time python eval.py'
lint:
@echo "Auto-linting files and performing final style checks..."
@isort --profile=black .
@black .
2 years ago
@flake8 --max-line-length=88 --ignore E203 .
check: lint
@echo "Checking for unstaged or untracked changes..."
@git diff-index --quiet HEAD -- || { echo "Unstaged or untracked changes detected!"; exit 1; }
clean:
@echo "Removing outputs/ and checkpoints/ directories"
@rm -rf output/
@rm -rf checkpoints/
compress: plots/progress_136013_sm.png
plots/progress_136013_sm.png: plots/progress_136013.png
@convert -resize 33% plots/progress_136013.png plots/progress_136013_sm.png
install: .requirements_installed
.requirements_installed: requirements.txt
pip install -r requirements.txt
@echo "installed requirements" > .requirements_installed
.PHONY: data train eval lint check clean all