-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
81 lines (60 loc) · 2.29 KB
/
Copy pathMakefile
File metadata and controls
81 lines (60 loc) · 2.29 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
UV ?= uv
PYTHON ?= $(UV) run python
-include .env
# Marker generated by the datasets target after a successful download.
DATASET_STAMP := $(DATASET_ROOT)/.downloaded
# OmegaConf overrides passed to task entry points, for example:
# make study ARGS='dataset_id=mitdb output_dir=output/debug'
ARGS ?=
.PHONY: setup sync hooks datasets format lint optuna_dashboard tasks \
visualize-studies visualize-datasets cudb-anomaly-scores study \
rhythm-event-sequences rhythm-event-sequences-visualize rhythm-event-sequences-score \
rr-interval-statistics anomaly-detection-example all-anomaly-detection-scores
setup: sync hooks datasets
sync:
$(UV) sync
hooks:
$(UV) run pre-commit install
datasets: $(DATASET_STAMP)
$(DATASET_STAMP): data/raw-datasets/dataset.sh .env
bash data/raw-datasets/dataset.sh
touch "$@"
format:
$(UV) run ruff format .
lint: format
$(UV) run ruff check --fix .
optuna_dashboard:
@storage_url="$$( $(PYTHON) -c 'from peincfedmdrs.utils.optuna import build_storage_name; print(build_storage_name())')"; \
$(UV) run optuna-dashboard "$$storage_url" --host 0.0.0.0
tasks:
@printf '%s\n' \
'visualize-studies' \
'visualize-datasets' \
'rr-interval-statistics' \
'cudb-anomaly-scores' \
'study' \
'rhythm-event-sequences' \
'rhythm-event-sequences-visualize' \
'rhythm-event-sequences-score' \
'anomaly-detection-example' \
'all-anomaly-detection-scores'
visualize-studies:
$(PYTHON) -m ecg_visualization.tasks.visualize_studies $(ARGS)
visualize-datasets:
$(PYTHON) -m ecg_visualization.tasks.visualize_datasets $(ARGS)
rr-interval-statistics:
$(PYTHON) -m ecg_visualization.tasks.rr_interval_statistics $(ARGS)
cudb-anomaly-scores:
$(PYTHON) -m ecg_visualization.tasks.cudb_anomaly_scores $(ARGS)
study:
$(PYTHON) -m ecg_visualization.tasks.study $(ARGS)
rhythm-event-sequences:
$(PYTHON) -m ecg_visualization.tasks.rhythm_event_sequences $(ARGS)
rhythm-event-sequences-visualize:
$(PYTHON) -m ecg_visualization.tasks.rhythm_event_sequences.visualize $(ARGS)
rhythm-event-sequences-score:
$(PYTHON) -m ecg_visualization.tasks.rhythm_event_sequences.score $(ARGS)
anomaly-detection-example:
$(PYTHON) -m ecg_visualization.tasks.anomaly_detection_example $(ARGS)
all-anomaly-detection-scores:
$(PYTHON) -m ecg_visualization.tasks.all_anomaly_detection_scores $(ARGS)