mirror of
https://github.com/bigscience-workshop/petals
synced 2024-11-18 03:25:33 +00:00
forward exc details
This commit is contained in:
parent
e7f716502c
commit
4c92d8636f
@ -121,11 +121,12 @@ class RemoteSequentialInferenceSession:
|
||||
def close(self, *exc_details):
|
||||
"""Finish a given inference session, close the underlying connection"""
|
||||
assert not self.closed
|
||||
self.stack.__exit__(*exc_details)
|
||||
self.active_sessions.clear()
|
||||
self.closed = True
|
||||
|
||||
def __exit__(self, *exc_details):
|
||||
self.close()
|
||||
self.close(*exc_details)
|
||||
|
||||
def __del__(self):
|
||||
self.close()
|
||||
|
Loading…
Reference in New Issue
Block a user