-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (33 loc) · 1.66 KB
/
Makefile
File metadata and controls
42 lines (33 loc) · 1.66 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
.PHONY: default
default: help
.PHONY: help
help:
@echo Tasks:
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.PHONY: train_efficiency
train_efficiency: ## Train the model with efficiency
python -m spacy train config_efficiency.cfg --output ./models/efficiency --paths.train ./dataset/spacy/train.spacy --paths.dev ./dataset/spacy/dev.spacy --gpu-id 0
.PHONY: train_accuracy
train_accuracy: ## Train the model with accuracy
python -m spacy train config_accuracy.cfg --output ./models/accuracy --paths.train ./dataset/spacy/train.spacy --paths.dev ./dataset/spacy/dev.spacy --gpu-id 0
.PHONY: evaluate_efficiency
evaluate_efficiency: ## Evaluate the model
python -m spacy evaluate ./models/efficiency/model-best ./dataset/spacy/dev.spacy --output ./results/efficiency_evaluation.json
.PHONY: evaluate_accuracy
evaluate_accuracy: ## Evaluate the model
python -m spacy evaluate ./models/accuracy/model-best ./dataset/spacy/dev.spacy --output ./results/accuracy_evaluation.json
.PHONY: benchmark_efficiency
benchmark_efficiency: ## Benchmark the model
python -m spacy benchmark accuracy ./models/efficiency/model-best ./dataset/spacy/dev.spacy --output ./results/efficiency_benchmark.json
.PHONY: benchmark_accuracy
benchmark_accuracy: ## Benchmark the model
python -m spacy benchmark accuracy ./models/accuracy/model-best ./dataset/spacy/dev.spacy --output ./results/accuracy_benchmark.json
.PHONY: visualize
visualize: ## Visualize NER
streamlit run app.py
.PHONY: clean
clean: ## Clean the model and results
rm -rf ./models
rm -rf ./results
rm -rf ./dataset/spacy/train.spacy
rm -rf ./dataset/spacy/dev.spacy