Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] SAC compatibility with compile #2655

Merged
merged 6 commits into from
Dec 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update
[ghstack-poisoned]
  • Loading branch information
vmoens committed Dec 16, 2024
commit db873fc3ca4b1449c618ebfb411d3d95083dc22d
11 changes: 7 additions & 4 deletions sota-implementations/sac/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@
from tensordict.nn.distributions import NormalParamExtractor
from torch import nn, optim
from torchrl.collectors import SyncDataCollector
from torchrl.data import TensorDictPrioritizedReplayBuffer, TensorDictReplayBuffer
from torchrl.data.replay_buffers.storages import LazyMemmapStorage
from torchrl.data import (
LazyTensorStorage,
TensorDictPrioritizedReplayBuffer,
TensorDictReplayBuffer,
)
from torchrl.envs import (
CatTensors,
Compose,
Expand Down Expand Up @@ -141,7 +144,7 @@ def make_replay_buffer(
beta=0.5,
pin_memory=False,
prefetch=prefetch,
storage=LazyMemmapStorage(
storage=LazyTensorStorage(
buffer_size,
scratch_dir=scratch_dir,
device=device,
Expand All @@ -152,7 +155,7 @@ def make_replay_buffer(
replay_buffer = TensorDictReplayBuffer(
pin_memory=False,
prefetch=prefetch,
storage=LazyMemmapStorage(
storage=LazyTensorStorage(
buffer_size,
scratch_dir=scratch_dir,
device=device,
Expand Down
Loading