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

Bump torchrl and tensordict to 0.7.2 #3298

Merged
merged 5 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions .ci/docker/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ tensorboard
jinja2==3.1.3
pytorch-lightning
torchx
torchrl==0.6.0
tensordict==0.6.0
torchrl==0.7.2
tensordict==0.7.2
ax-platform>=0.4.0
nbformat>=5.9.2
datasets
Expand Down
1 change: 1 addition & 0 deletions .jenkins/validate_tutorials_built.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"intermediate_source/flask_rest_api_tutorial",
"intermediate_source/text_to_speech_with_torchaudio",
"intermediate_source/tensorboard_profiler_tutorial", # reenable after 2.0 release.
"advanced_source/semi_structured_sparse" # reenable after 3303 is fixed.
]

def tutorial_source_dirs() -> List[Path]:
Expand Down
2 changes: 1 addition & 1 deletion advanced_source/coding_ddpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ def ceil_div(x, y):

###############################################################################
# let's use the TD(lambda) estimator!
loss_module.make_value_estimator(ValueEstimators.TDLambda, gamma=gamma, lmbda=lmbda)
loss_module.make_value_estimator(ValueEstimators.TDLambda, gamma=gamma, lmbda=lmbda, device=device)

###############################################################################
# .. note::
Expand Down
2 changes: 2 additions & 0 deletions advanced_source/semi_structured_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@
SparseSemiStructuredTensor._FORCE_CUTLASS = True
torch.manual_seed(100)

# Set default device to "cuda:0"
torch.set_default_device(torch.device("cuda:0" if torch.cuda.is_available() else "cpu"))

######################################################################
# We’ll also need to define some helper functions that are specific to the
Expand Down
2 changes: 1 addition & 1 deletion intermediate_source/reinforcement_ppo.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@
#

advantage_module = GAE(
gamma=gamma, lmbda=lmbda, value_network=value_module, average_gae=True
gamma=gamma, lmbda=lmbda, value_network=value_module, average_gae=True, device=device,
)

loss_module = ClipPPOLoss(
Expand Down
Loading