Skip to content

Commit

Permalink
Buffer: Handle case where logger is None
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhernandezgarcia committed Jun 11, 2024
1 parent 7b11c38 commit f8c235c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gflownet/utils/buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ def __init__(
logger=None,
**kwargs,
):
self.datadir = logger.datadir
if logger is not None:
self.datadir = logger.datadir
else:
self.datadir = Path("./logs")
self.datadir.mkdir(parents=True, exist_ok=True)
self.env = env
self.proxy = proxy
self.replay_capacity = replay_capacity
Expand Down

0 comments on commit f8c235c

Please sign in to comment.