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

[Versioning] Deprecations for 0.4 #2109

Merged
merged 12 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
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
Next Next commit
amend
  • Loading branch information
vmoens committed Apr 24, 2024
commit 48f86df48b536ffe315307ceecd9d89c26e851c7
2 changes: 2 additions & 0 deletions test/_utils_internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
# Specified for test_utils.py
__version__ = "0.3"

from torchrl.modules import MLP


def CARTPOLE_VERSIONED():
# load gym
Expand Down
4 changes: 1 addition & 3 deletions test/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import dataclasses
import pathlib
import sys

from time import sleep

import pytest
import torch

from _utils_internal import generate_seeds, get_default_devices
from torchrl._utils import timeit

Expand All @@ -38,8 +38,6 @@
FlattenObservation,
TransformedEnv,
)
from torchrl.envs.utils import ExplorationType, set_exploration_type
from torchrl.modules.tensordict_module.common import _has_functorch
from torchrl.trainers.helpers import transformed_env_constructor
from torchrl.trainers.helpers.envs import (
EnvConfig,
Expand Down
8 changes: 0 additions & 8 deletions torchrl/data/replay_buffers/storages.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,11 @@
from tensordict.memmap import MemoryMappedTensor
from tensordict.utils import _STRDTYPE2DTYPE
from torch import multiprocessing as mp

from torch.utils._pytree import LeafSpec, tree_flatten, tree_map, tree_unflatten

from torchrl._utils import _CKPT_BACKEND, implement_for, logger as torchrl_logger
from torchrl.data.replay_buffers.utils import _is_int, INT_CLASSES

try:
from torchsnapshot.serialization import tensor_from_memoryview

_has_ts = True
except ImportError:
_has_ts = False

SINGLE_TENSOR_BUFFER_NAME = os.environ.get(
"SINGLE_TENSOR_BUFFER_NAME", "_-single-tensor-_"
)
Expand Down
1 change: 0 additions & 1 deletion torchrl/objectives/value/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import torch

from tensordict import MemoryMappedTensor

__all__ = [
"generalized_advantage_estimate",
Expand Down
Loading