Skip to content
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
1 change: 0 additions & 1 deletion tensordict/_lazy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4003,7 +4003,6 @@ def _update_inv_op_kwargs(self, tensor: Tensor) -> dict[str, Any]:

def _stack_onto_(
self,
# key: str,
list_item: list[CompatibleType],
dim: int,
) -> T:
Expand Down
12 changes: 6 additions & 6 deletions tensordict/_td.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,13 @@ class TensorDict(TensorDictBase):

def __init__(
self,
source: T | dict[str, CompatibleType] = None,
source: T | dict[NestedKey, CompatibleType] = None,
batch_size: Sequence[int] | torch.Size | int | None = None,
device: DeviceType | None = None,
names: Sequence[str] | None = None,
non_blocking: bool = None,
non_blocking: bool | None = None,
lock: bool = False,
**kwargs,
**kwargs: dict[str, Any] | None,
) -> None:
if (source is not None) and kwargs:
raise ValueError(
Expand Down Expand Up @@ -304,14 +304,14 @@ def __init__(
@classmethod
def _new_unsafe(
cls,
source: T | dict[str, CompatibleType] = None,
source: T | dict[NestedKey, CompatibleType] = None,
batch_size: Sequence[int] | torch.Size | int | None = None,
device: DeviceType | None = None,
names: Sequence[str] | None = None,
non_blocking: bool = None,
non_blocking: bool | None = None,
lock: bool = False,
nested: bool = True,
**kwargs,
**kwargs: dict[str, Any] | None,
) -> TensorDict:
if is_dynamo_compiling():
return TensorDict(
Expand Down