-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun.py
35 lines (30 loc) · 1.03 KB
/
run.py
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
import fire
from train import run_experiment
import json
class Run(object):
"""Simple CLI interface"""
def experiment(self,
experiment_id,
interval_secs,
model_params,
data_params):
"""
Example usage:
python3.4 run.py experiment \
--experiment-id=60_mins_reduce_hash \
--interval-secs=3600 \
--model-params='{"learning_rate":0.05, "l1_regularization_strength":0.00, "l2_regularization_strength":0.5}' \
--data-params='{"shuffle":True, "num_epochs":1, "num_threads":2, batch_size:256}'
:param experiment_id:
:param interval_secs:
:param model_params:
:param data_params:
:return:
"""
run_experiment(
experiment_id=experiment_id,
interval_secs=interval_secs,
model_hyperparams=model_params,
data_hyperparams=data_params)
if __name__ == '__main__':
fire.Fire(Run)