Skip to content

Commit e2cc8d2

Browse files
committed
remove unnecessary coments
1 parent e767ddf commit e2cc8d2

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/metrax/logging/tensorboard_backend_test.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ def test_init_non_main_process_is_noop(self, mock_summary_writer):
6666
def test_log_scalar_flush_rate_limited(self, mock_summary_writer, mock_time):
6767
"""Tests that flush honors both step frequency and time interval."""
6868
mock_writer_instance = mock_summary_writer.return_value
69-
70-
# Initialize clock at t=1000.0s
7169
mock_time.return_value = 1000.0
7270

7371
with mock.patch("jax.process_index", return_value=0):
@@ -76,20 +74,14 @@ def test_log_scalar_flush_rate_limited(self, mock_summary_writer, mock_time):
7674
log_dir="/fake/logs", flush_every_n_steps=1, flush_interval_s=30.0
7775
)
7876

79-
# 1. Log at t=1000.0s (0s elapsed since init)
80-
# Condition: Step met (1%1==0), Time NOT met (0 < 30) -> NO FLUSH
8177
backend.log_scalar("event1", 1.0, step=1)
8278
mock_writer_instance.add_scalar.assert_called_with("event1", 1.0, 1)
8379
mock_writer_instance.flush.assert_not_called()
8480

85-
# 2. Advance time to t=1020.0s (20s elapsed)
86-
# Condition: Step met, Time NOT met (20 < 30) -> NO FLUSH
8781
mock_time.return_value = 1020.0
8882
backend.log_scalar("event2", 2.0, step=2)
8983
mock_writer_instance.flush.assert_not_called()
9084

91-
# 3. Advance time to t=1035.0s (35s elapsed)
92-
# Condition: Step met, Time met (35 >= 30) -> FLUSH
9385
mock_time.return_value = 1035.0
9486
backend.log_scalar("event3", 3.0, step=3)
9587
mock_writer_instance.flush.assert_called_once()

0 commit comments

Comments
 (0)