-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdvc_commands
71 lines (50 loc) · 1.79 KB
/
dvc_commands
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
DOC : https://dvc.org/doc/get-started/visualize
PIPELINE STAGES ;
1. GET DATA - download data from gdrive
2. ANALYSIS - create figures in order to create reports
3. FEATURES - preprocessing stage + train/test/valid split
4. TRAINING -
# DATA
dvc run -f .dvc_files/download_features.dvc \
-d src/data/download_dataset.py \
-o data/raw \
python src/data/download_dataset.py
# ANALYSIS
dvc run -f .dvc_files/analyze_data.dvc \
-d data/raw \
-d src/visualization/visualize.py \
python src/visualization/visualize.py
# FEATURES
dvc run -f .dvc_files/build_features.dvc \
-d src/features/build_features.py -d data/raw \
-o data/preprocessed/X_train.npy \
-o data/preprocessed/X_test.npy \
-o data/preprocessed/X_valid.npy \
-o data/preprocessed/y_train.npy \
-o data/preprocessed/y_test.npy \
-o data/preprocessed/y_valid.npy \
python src/features/build_features.py
# TRAINING
dvc run -f .dvc_files/train_models.dvc \
-d src/models/train_model.py -d data/preprocessed \
-o models/VAE.hdf5 \
-o reports/figures/learning_curve.png \
-M models/train_metrics.txt\
python src/models/train_model.py -e 100
# EVALUATION
dvc run -f .dvc_files/test_model.dvc \
-d src/models/test_model.py \
-d data/preprocessed \
-d models/VAE.hdf5 \
-o reports/figures/visual_eval.png \
-M models/test_metrics.txt \
python src/models/test_model.py
# VISUALIZATION
# Visualize stages
dvc pipeline show --ascii .dvc_files/test.dvc
# Visualize commands
dvc pipeline show --ascii .dvc_files/test.dvc --commands
# Visualize outputs
dvc pipeline show --ascii .dvc_files/test.dvc --outs
# REPRODUCE EXPERIMENT
dvc repro .dvc_files/test.dvc