InvokeAI/invokeai/app/services/invocation_stats
psychedelicious b24e8dd829 feat(stats): refactor InvocationStatsService to output stats as dataclasses
This allows the stats to be written to disk as JSON and analyzed.

- Add dataclasses to hold stats.
- Move stats pretty-print logic to `__str__` of the new `InvocationStatsSummary` class.
- Add `get_stats` and `dump_stats` methods to `InvocationStatsServiceBase`.
- `InvocationStatsService` now throws if stats are requested for a session it doesn't know about. This avoids needing to do a lot of messy null checks.
- Update `DefaultInvocationProcessor` to use the new stats methods and suppresses the new errors.
2024-02-01 08:50:56 +11:00
..
__init__.py feat: refactor services folder/module structure 2023-10-12 12:15:06 -04:00
invocation_stats_base.py feat(stats): refactor InvocationStatsService to output stats as dataclasses 2024-02-01 08:50:56 +11:00
invocation_stats_common.py feat(stats): refactor InvocationStatsService to output stats as dataclasses 2024-02-01 08:50:56 +11:00
invocation_stats_default.py feat(stats): refactor InvocationStatsService to output stats as dataclasses 2024-02-01 08:50:56 +11:00