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

[Performance] Better names handling in LazyStackTD #482

Merged
merged 3 commits into from
Jul 9, 2023
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
amend
  • Loading branch information
vmoens committed Jul 9, 2023
commit 5889298b350f296638a3ee6b93bb29fcb611f659
3 changes: 2 additions & 1 deletion tensordict/tensordict.py
Original file line number Diff line number Diff line change
Expand Up @@ -1714,6 +1714,7 @@ def _validate_value(
pass
elif issubclass(cls, dict):
value = self._convert_to_tensordict(value)
is_tc = True
else:
try:
value = self._convert_to_tensor(value)
Expand Down Expand Up @@ -3798,7 +3799,6 @@ def __init__(
f"sub-type or a dictionary, found type(source)={type(source)}."
)
self._batch_size = self._parse_batch_size(source, batch_size)

self.names = names

if source is not None:
Expand Down Expand Up @@ -4509,6 +4509,7 @@ def select(
device=self.device,
batch_size=self.batch_size,
source=source,
# names=self.names if self._has_names() else None,
names=self._td_dim_names,
_run_checks=False,
_is_memmap=self._is_memmap,
Expand Down