MCPcopy
hub / github.com/microsoft/qlib / task_stat

Method task_stat

qlib/workflow/task/manage.py:396–412  ·  view source on GitHub ↗

Count the tasks in every status. Args: query (dict, optional): the query dict. Defaults to {}. Returns: dict

(self, query={})

Source from the content-addressed store, hash-verified

394 self.task_pool.delete_many(query)
395
396 def task_stat(self, query={}) -> dict:
397 """
398 Count the tasks in every status.
399
400 Args:
401 query (dict, optional): the query dict. Defaults to {}.
402
403 Returns:
404 dict
405 """
406 query = query.copy()
407 query = self._decode_query(query)
408 tasks = self.query(query=query, decode=False)
409 status_stat = {}
410 for t in tasks:
411 status_stat[t["status"]] = status_stat.get(t["status"], 0) + 1
412 return status_stat
413
414 def reset_waiting(self, query={}):
415 """

Callers 1

waitMethod · 0.95

Calls 4

_decode_queryMethod · 0.95
queryMethod · 0.95
copyMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected