Skip to content

Commit

Permalink
[BugFix] fix inline TDParams kwargs for nontensordata
Browse files Browse the repository at this point in the history
ghstack-source-id: afd50385b6b1e8bd8ccfaabfa387ca5611ca07e2
Pull Request resolved: #1094
  • Loading branch information
vmoens committed Nov 20, 2024
1 parent 0b7ce93 commit a5656cb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tensordict/nn/probabilistic.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,6 @@ def _dynamo_friendly_to_dict(data):
if not is_compiling():
return data
if isinstance(data, TensorDictBase):
items = list(data.items())
if not items:
return {}
return dict(items)
# to_dict is recursive and we don't want that
return {data[key] for key in data.keys()}
return data

0 comments on commit a5656cb

Please sign in to comment.