@@ -20,6 +20,7 @@ export tb_append, tb_overwrite, tb_increment
20
20
"""
21
21
TBLogger(logdir[, tb_increment];
22
22
time=time(),
23
+ prefix="",
23
24
purge_step=nothing,
24
25
step_increment=1,
25
26
min_level=Logging.Info)
@@ -29,20 +30,24 @@ argument specifies the behaviour if the `logdir` already exhists: the default
29
30
choice `tb_increment` appends an increasing number 1,2... to `logdir`. Other
30
31
choices are `tb_overwrite`, which overwrites the previous folder, and `tb_append`.
31
32
33
+ Optional keyword argument `prefix` can be passed to prepend a path to the file
34
+ name (note, not the log directory). See `create_eventfile()`
35
+
32
36
If a `purge_step::Int` is passed, every step before `purge_step` will be ignored
33
37
by tensorboard (usefull in the case of restarting a crashed computation).
34
38
35
39
`min_level` specifies the minimum level of messages logged to
36
40
tensorboard.
37
41
"""
38
42
function TBLogger (logdir= " tensorboard_logs/run" , overwrite= tb_increment;
39
- time= time (),
43
+ time= time (),
44
+ prefix= " " ,
40
45
purge_step:: Union{Int,Nothing} = nothing ,
41
46
step_increment = 1 ,
42
47
min_level:: LogLevel = Info)
43
48
44
49
logdir = init_logdir (logdir, overwrite)
45
- fpath, evfile = create_eventfile (logdir, purge_step, time)
50
+ fpath, evfile = create_eventfile (logdir, purge_step, time; prepend = prefix )
46
51
47
52
all_files = Dict (fpath => evfile)
48
53
start_step = something (purge_step, 0 )
0 commit comments