@@ -20,6 +20,7 @@ export tb_append, tb_overwrite, tb_increment
2020"""
2121 TBLogger(logdir[, tb_increment];
2222 time=time(),
23+ prefix="",
2324 purge_step=nothing,
2425 step_increment=1,
2526 min_level=Logging.Info)
@@ -29,20 +30,24 @@ argument specifies the behaviour if the `logdir` already exhists: the default
2930choice `tb_increment` appends an increasing number 1,2... to `logdir`. Other
3031choices are `tb_overwrite`, which overwrites the previous folder, and `tb_append`.
3132
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+
3236If a `purge_step::Int` is passed, every step before `purge_step` will be ignored
3337by tensorboard (usefull in the case of restarting a crashed computation).
3438
3539`min_level` specifies the minimum level of messages logged to
3640tensorboard.
3741"""
3842function TBLogger (logdir= " tensorboard_logs/run" , overwrite= tb_increment;
39- time= time (),
43+ time= time (),
44+ prefix= " " ,
4045 purge_step:: Union{Int,Nothing} = nothing ,
4146 step_increment = 1 ,
4247 min_level:: LogLevel = Info)
4348
4449 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 )
4651
4752 all_files = Dict (fpath => evfile)
4853 start_step = something (purge_step, 0 )
0 commit comments