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 44# LICENSE file in the root directory of this source tree.
55from __future__ import annotations
66
7+ import abc
8+
79import contextlib
10+ import functools
811
912import importlib .util
13+ import inspect
1014import os
1115import re
1216from enum import Enum
13- from typing import Dict , List , Union
17+ from typing import Any , Dict , List , Union
1418
1519import torch
1620
2024 TensorDictBase ,
2125 unravel_key ,
2226)
27+ from tensordict .nn import TensorDictModule , TensorDictModuleBase
2328from 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.
3136 set_interaction_type as set_exploration_type ,
3237)
3338from tensordict .utils import NestedKey
39+ from torch import nn
40+ from torch .utils ._pytree import tree_map
3441from torchrl ._utils import _replace_last , _rng_decorator , logger as torchrl_logger
3542
3643from torchrl .data .tensor_specs import (
You can’t perform that action at this time.
0 commit comments