-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define Base.close(::Session)
#342
Conversation
Codecov Report
@@ Coverage Diff @@
## master #342 +/- ##
==========================================
+ Coverage 66.86% 66.93% +0.06%
==========================================
Files 50 50
Lines 2958 2967 +9
==========================================
+ Hits 1978 1986 +8
- Misses 980 981 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there other things we should be able to close
also.
Like Graph
s?
src/run.jl
Outdated
end | ||
|
||
function Base.show(io::IO, err::ClosedSessionError) | ||
print(io, "Tried to call 'run' with a closed TensorFlow session.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is assuming the call-stack.
Right now this can only be thrown by run
, true.
But the user will find that out by looking at the call-stack.
I think it should be "The TensorFlow session is closed.")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point
Closing sessions is important for freeing the GPU resources. The resources attached to the other TensorFlow objects is pretty trivial. I guess it couldn't hurt to add |
No description provided.