mirror of
https://github.com/wassname/ray.git
synced 2026-06-30 03:30:12 +08:00
[tune] Close logfile contexts (#10026)
Co-authored-by: Kai Fricke <kai@anyscale.com>
This commit is contained in:
@@ -625,10 +625,12 @@ class Trainable:
|
||||
self._stdout_stream.flush()
|
||||
self._stdout_context.__exit__(None, None, None)
|
||||
self._stdout_fp.close()
|
||||
self._stdout_context = None
|
||||
if self._stderr_context:
|
||||
self._stderr_stream.flush()
|
||||
self._stderr_context.__exit__(None, None, None)
|
||||
self._stderr_fp.close()
|
||||
self._stderr_context = None
|
||||
|
||||
def stop(self):
|
||||
"""Releases all resources used by this trainable.
|
||||
|
||||
Reference in New Issue
Block a user