orbit.utils.SummaryManagerInterface
Stay organized with collections
Save and categorize content based on your preferences.
A utility interface for managing summary writing.
Methods
flush
View source
@abc.abstractmethod
flush()
Flushes the the recorded summaries.
summary_writer
View source
@abc.abstractmethod
summary_writer(
relative_path=''
)
Returns the underlying summary writer for scoped writers.
write_summaries
View source
@abc.abstractmethod
write_summaries(
summary_dict
)
Writes summaries for the given dictionary of values.
The summary_dict can be any nested dict. The SummaryManager should
recursively creates summaries, yielding a hierarchy of summaries which will
then be reflected in the corresponding UIs.
For example, users may evaluate on multiple datasets and return
summary_dict
as a nested dictionary:
{
"dataset1": {
"loss": loss1,
"accuracy": accuracy1
},
"dataset2": {
"loss": loss2,
"accuracy": accuracy2
},
}
This will create two set of summaries, "dataset1" and "dataset2". Each
summary dict will contain summaries including both "loss" and "accuracy".
Args |
summary_dict
|
A dictionary of values. If any value in summary_dict is
itself a dictionary, then the function will create a new summary_dict
with name given by the corresponding key. This is performed recursively.
Leaf values are then summarized using the parent relative path.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2025-04-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-18 UTC."],[],[],null,["# orbit.utils.SummaryManagerInterface\n\n\u003cbr /\u003e\n\n|-----------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/models/blob/v2.19.1/orbit/utils/summary_manager_interface.py#L20-L64) |\n\nA utility interface for managing summary writing.\n\nMethods\n-------\n\n### `flush`\n\n[View source](https://github.com/tensorflow/models/blob/v2.19.1/orbit/utils/summary_manager_interface.py#L23-L26) \n\n @abc.abstractmethod\n flush()\n\nFlushes the the recorded summaries.\n\n### `summary_writer`\n\n[View source](https://github.com/tensorflow/models/blob/v2.19.1/orbit/utils/summary_manager_interface.py#L28-L31) \n\n @abc.abstractmethod\n summary_writer(\n relative_path=''\n )\n\nReturns the underlying summary writer for scoped writers.\n\n### `write_summaries`\n\n[View source](https://github.com/tensorflow/models/blob/v2.19.1/orbit/utils/summary_manager_interface.py#L33-L64) \n\n @abc.abstractmethod\n write_summaries(\n summary_dict\n )\n\nWrites summaries for the given dictionary of values.\n\nThe summary_dict can be any nested dict. The SummaryManager should\nrecursively creates summaries, yielding a hierarchy of summaries which will\nthen be reflected in the corresponding UIs.\n\nFor example, users may evaluate on multiple datasets and return\n`summary_dict` as a nested dictionary: \n\n {\n \"dataset1\": {\n \"loss\": loss1,\n \"accuracy\": accuracy1\n },\n \"dataset2\": {\n \"loss\": loss2,\n \"accuracy\": accuracy2\n },\n }\n\nThis will create two set of summaries, \"dataset1\" and \"dataset2\". Each\nsummary dict will contain summaries including both \"loss\" and \"accuracy\".\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `summary_dict` | A dictionary of values. If any value in `summary_dict` is itself a dictionary, then the function will create a new summary_dict with name given by the corresponding key. This is performed recursively. Leaf values are then summarized using the parent relative path. |\n\n\u003cbr /\u003e"]]