yobx.container.build_stats#

class yobx.container.build_stats.BuildStats[source]#

Holds statistics collected during model export by ExtendedModelContainer.

Any key whose name begins with one of the allowed prefixes listed in _PREFIXES is accepted. Values default to 0.0 when first read via __getitem__().

Example:

stats = BuildStats()
stats["time_export_write_model"] += 0.5
stats["time_export_tobytes"] += 0.1
to_dict() dict[str, float | int | bool | str][source]#

Returns the data in a dictionary, does not ùake a copy.

validate()[source]#

Validates that statistics startswith a known prefix.