Add timeout on program exit

I have some issues currently where some scripts never finish as clearml is stuck waiting for events, I'm not sure why it happens but there should be a timeout anyway.
This commit is contained in:
Mathis Chenuet 2023-07-25 19:14:47 +02:00 committed by GitHub
parent c451589298
commit 4cb57232af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -314,7 +314,7 @@ class Reporter(InterfaceBase, AbstractContextManager, SetupUploadMixin, AsyncMan
def _handle_program_exit(self):
try:
self.flush()
self.wait_for_events()
self.wait_for_events(timeout=10)
self.stop()
except Exception as e:
logging.getLogger("clearml.reporter").warning(