Skip to content

Commit 3f45cbd

Browse files
nomadbloxinabox
andcommitted
Update src/TBLogger.jl
assertions may be removed depending how optiions are set Co-authored-by: Frames White <[email protected]>
1 parent 37ed708 commit 3f45cbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TBLogger.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,6 @@ function with_TBLogger_hold_step(f, step::Int; step_at_end::Bool=true)
345345
end
346346
function with_TBLogger_hold_step(f; step_at_end::Bool=true)
347347
logger = CoreLogging.current_logger()
348-
@assert logger isa TBLogger "with_TBLogger_hold_step: current logger is not a TBLogger, cannot establish current step automatically"
348+
isa(logger, TBLogger) || error("with_TBLogger_hold_step: current logger is not a TBLogger, cannot establish current step automatically")
349349
with_TBLogger_hold_step(f, logger.global_step; step_at_end=step_at_end)
350350
end

0 commit comments

Comments
 (0)