Skip to content

Commit

Permalink
Log the warning only for the first on-the-fly sampler.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 677502943
  • Loading branch information
sinopalnikov authored and copybara-github committed Sep 22, 2024
1 parent 9a5c2c0 commit 08ad3d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion clrs/_src/samplers.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ def __init__(
self._track_max_steps = track_max_steps

if num_samples < 0:
logging.warning('Sampling dataset on-the-fly, unlimited samples.')
logging.log_first_n(
logging.WARNING, 'Sampling dataset on-the-fly, unlimited samples.', 1
)
if track_max_steps:
# Get an initial estimate of max hint length
self.max_steps = -1
Expand Down

0 comments on commit 08ad3d1

Please sign in to comment.