Skip to content

Commit

Permalink
print->logger.debug
Browse files Browse the repository at this point in the history
  • Loading branch information
sidnarayanan committed Nov 25, 2024
1 parent 4c706b6 commit 5e571d9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ldp/alg/optimizer/replay_buffers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import asyncio
import logging
import random
from collections import UserList
from collections.abc import Awaitable, Callable, Iterator
Expand All @@ -10,6 +11,8 @@
from ldp.graph import eval_mode
from ldp.graph.async_torch import AsyncTorchModule

logger = logging.getLogger(__name__)


class CircularReplayBuffer(UserList[dict]):
def resize(self, size: int):
Expand Down Expand Up @@ -160,6 +163,6 @@ def batched_iter(

# DEBUG
selected_priorities = prio[sampled_idcs]
print(f"Average priority: {selected_priorities.mean()}")
logger.debug(f"Average priority: {selected_priorities.mean()}")

return self._batched_iter(buffer, batch_size, shuffle, infinite)

0 comments on commit 5e571d9

Please sign in to comment.