Skip to content

Commit 6263758

Browse files
committed
close handle if it is open
1 parent 4b4bed6 commit 6263758

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/logging.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ function logartifact(mlf::MLFlow, run_id::AbstractString, filepath::Union{Abstra
124124
return logartifact(mlf, run_id, basename(filepath), data)
125125
catch e
126126
throw(e)
127+
finally
128+
if @isdefined f
129+
close(f)
130+
end
127131
end
128132
end
129133
logartifact(mlf::MLFlow, run::MLFlowRun, filepath::Union{AbstractPath,AbstractString}) =

0 commit comments

Comments
 (0)