-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
watch.jl
36 lines (30 loc) · 819 Bytes
/
watch.jl
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
using ArgParse
using GomalizingFlow.Watcher
function parse_commandline()
s = ArgParseSettings()
@add_arg_table! s begin
"config"
help = """
specify path/to/a/toml/file
you can find an example 'cfgs/example2d.toml'
"""
required = true
"--result"
help = "path/to/result/dir"
default = "result"
"--item"
help = "item to show during training e.g. ess, acceptance_rate"
default = "ess"
end
return parse_args(s)
end
function main()
args = parse_commandline()
path = args["config"]
result = abspath(args["result"])
item = Symbol(args["item"])
result_dir = abspath(joinpath(result, splitext(basename(path))[begin]))
@info "serving $(result_dir)"
serve(result_dir, item)
end
main()