run.py 396 Bytes
Newer Older
Sebastian Hörl's avatar
Sebastian Hörl committed
1
import tqdm
Sebastian Hörl's avatar
Sebastian Hörl committed
2
import pipeline
Sebastian Hörl's avatar
Sebastian Hörl committed
3
4
import yaml
import sys
Sebastian Hörl's avatar
Sebastian Hörl committed
5

6

Sebastian Hörl's avatar
Sebastian Hörl committed
7
8
9
10
11
12
13
config_path = "config.yml"

if len(sys.argv) > 1:
    config_path = sys.argv[1]

with open(config_path) as f:
    config = yaml.load(f)
14

Sebastian Hörl's avatar
Sebastian Hörl committed
15
if "disable_progress_bar" in config and config["disable_progress_bar"]:
Sebastian Hörl's avatar
Sebastian Hörl committed
16
    tqdm.tqdm = pipeline.safe_tqdm
Sebastian Hörl's avatar
Sebastian Hörl committed
17

18
19
20
21
pipeline.run(
    config["stages"],
    target_path = config["target_path"],
    config = config)