Fix ModelsList.keys() is missing

This commit is contained in:
allegroai 2022-11-21 16:28:28 +02:00
parent 1d77b55dde
commit 9713f63cb7
2 changed files with 4 additions and 1 deletions

View File

@ -264,7 +264,7 @@ class Reporter(InterfaceBase, AbstractContextManager, SetupUploadMixin, AsyncMan
self._async_enable = async_enable
self._flush_frequency = 5.0
self._max_iteration = 0
flush_threshold = config.get("development.worker.report_event_flush_threshold", 50)
flush_threshold = config.get("development.worker.report_event_flush_threshold", 100)
self._report_service = BackgroundReportService(
task=task, async_enable=async_enable, metrics=metrics,
flush_frequency=self._flush_frequency, flush_threshold=flush_threshold)

View File

@ -33,6 +33,9 @@ class ModelsList(UserList):
except KeyError:
return default
def keys(self):
return self._models.keys()
class TaskModels(UserDict):
_input_models_re = re.compile(pattern=r"((Using model id: )(\w+)?)", flags=re.IGNORECASE)