mindformers.core.SummaryMonitor

View Source On Gitee
class mindformers.core.SummaryMonitor(summary_dir=None, collect_freq=10, collect_specified_data=None, keep_default_action=True, custom_lineage_data=None, collect_tensor_freq=None, max_file_size=None, export_options=None)[source]

Summary Monitor can help you to collect some common information, such as loss, learning late, computational graph and so on.

Note

referring to note .

Parameters
  • summary_dir (str) – The collected data will be persisted to this directory. If the directory does not exist, it will be created automatically. Default: None.

  • collect_freq (int) – Set the frequency of data collection, it should be greater than zero, and the unit is step. Default: 10.

  • collect_specified_data (Union[None, dict]) – Perform custom operations on the collected data. Default: None.

  • keep_default_action (bool) – This field affects the collection behavior of the 'collect_specified_data' field. Default: True.

  • custom_lineage_data (Union[dict, None]) – Allows you to customize the data and present it on the MingInsight lineage page . Default: None.

  • collect_tensor_freq (Optional[int]) – The same semantics as the collect_freq, but controls TensorSummary only. Default: None.

  • max_file_size (Optional[int]) – The maximum size in bytes of each file that can be written to the disk. For example, to write not larger than 4GB, specify max_file_size=4*1024**3. Default: None, which means no limit.

  • export_options (Union[None, dict]) – Perform custom operations on the export data. Default: None, it means that the data is not exported.

Examples

>>> from mindformers.core import SummaryMonitor
>>> monitor = SummaryMonitor(summary_dir='./summary_dir')