Skip to content

Commit c0bf069

Browse files
committed
amend
1 parent 3ba16f6 commit c0bf069

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

torchrl/envs/utils.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44
# LICENSE file in the root directory of this source tree.
55
from __future__ import annotations
66

7+
import abc
8+
79
import contextlib
10+
import functools
811

912
import importlib.util
13+
import inspect
1014
import os
1115
import re
1216
from enum import Enum
13-
from typing import Dict, List, Union
17+
from typing import Any, Dict, List, Union
1418

1519
import torch
1620

@@ -20,6 +24,7 @@
2024
TensorDictBase,
2125
unravel_key,
2226
)
27+
from tensordict.nn import TensorDictModule, TensorDictModuleBase
2328
from tensordict.nn.probabilistic import ( # noqa
2429
# Note: the `set_interaction_mode` and their associated arg `default_interaction_mode` are being deprecated!
2530
# Please use the `set_/interaction_type` ones above with the InteractionType enum instead.
@@ -31,6 +36,8 @@
3136
set_interaction_type as set_exploration_type,
3237
)
3338
from tensordict.utils import NestedKey
39+
from torch import nn
40+
from torch.utils._pytree import tree_map
3441
from torchrl._utils import _replace_last, _rng_decorator, logger as torchrl_logger
3542

3643
from torchrl.data.tensor_specs import (

0 commit comments

Comments
 (0)