Skip to content

Commit

Permalink
Internal
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 705956791
  • Loading branch information
Grain Team authored and copybara-github committed Dec 13, 2024
1 parent 9f6b6a5 commit 14f02ae
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions grain/_src/python/dataset/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ def _reporting_loop(self):
self.report()

def _logging_execution_summary_loop(self):
"""Logs the execution summary periodically."""
while self._should_report():
time.sleep(_LOG_EXECTION_SUMMARY_PERIOD_SEC)
# A node can be marked as non-output after the corresponding
Expand All @@ -504,9 +505,13 @@ def _logging_execution_summary_loop(self):
self._last_report_time = time.time()
summary = self._get_execution_summary()
logging.info(
"Grain Dataset Execution Summary:\n\n%s",
_pretty_format_summary(summary),
"Grain Dataset Execution Summary:\n\nNOTE: Before analyzing the"
" `MapDataset` nodes, ensure that the `total_processing_time` of"
" the `PrefetchDatasetIterator` node indicates it is a bottleneck."
" The `MapDataset` nodes are executed in multiple threads and thus,"
" `total_processing_time` indicates the time."
)
logging.info(_pretty_format_summary(summary))

def _build_execution_summary(
self,
Expand Down

0 comments on commit 14f02ae

Please sign in to comment.