File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 4
4
# LICENSE file in the root directory of this source tree.
5
5
from __future__ import annotations
6
6
7
+ import abc
8
+
7
9
import contextlib
10
+ import functools
8
11
9
12
import importlib .util
13
+ import inspect
10
14
import os
11
15
import re
12
16
from enum import Enum
13
- from typing import Dict , List , Union
17
+ from typing import Any , Dict , List , Union
14
18
15
19
import torch
16
20
20
24
TensorDictBase ,
21
25
unravel_key ,
22
26
)
27
+ from tensordict .nn import TensorDictModule , TensorDictModuleBase
23
28
from tensordict .nn .probabilistic import ( # noqa
24
29
# Note: the `set_interaction_mode` and their associated arg `default_interaction_mode` are being deprecated!
25
30
# Please use the `set_/interaction_type` ones above with the InteractionType enum instead.
31
36
set_interaction_type as set_exploration_type ,
32
37
)
33
38
from tensordict .utils import NestedKey
39
+ from torch import nn
40
+ from torch .utils ._pytree import tree_map
34
41
from torchrl ._utils import _replace_last , _rng_decorator , logger as torchrl_logger
35
42
36
43
from torchrl .data .tensor_specs import (
You can’t perform that action at this time.
0 commit comments