diff --git a/tools/nni_trial_tool/log_utils.py b/tools/nni_trial_tool/log_utils.py index 59261d2950..20c8e74c09 100644 --- a/tools/nni_trial_tool/log_utils.py +++ b/tools/nni_trial_tool/log_utils.py @@ -85,6 +85,13 @@ def get_pipelog_reader(self): ''' return PipeLogReader(self.logger, self.log_collection, logging.INFO) + def flush(self): + ''' + Add flush in handler + ''' + for handler in self.logger.handlers: + handler.flush() + def write(self, buf): ''' Write buffer data into logger/stdout