MCPcopy Create free account
hub / github.com/modelscope/ms-agent / get_stats_path

Function get_stats_path

ms_agent/utils/stats.py:26–34  ·  view source on GitHub ↗
(config: Any,
                   default_filename: str = 'workflow_stats.json')

Source from the content-addressed store, hash-verified

24
25
26def get_stats_path(config: Any,
27 default_filename: str = 'workflow_stats.json') -> str:
28 stats_file = getattr(config, 'stats_file', None)
29 output_dir = getattr(config, 'output_dir', './output')
30 if stats_file:
31 if os.path.isabs(stats_file):
32 return stats_file
33 return os.path.join(output_dir, stats_file)
34 return os.path.join(output_dir, default_filename)
35
36
37def summarize_usage(messages: Optional[Iterable[Message]]) -> Dict[str, int]:

Callers 2

run_loopMethod · 0.90
_run_agentMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected