Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
vmoens committed Oct 16, 2024
1 parent 207c279 commit e489ad9
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion benchmarks/common/h2d_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from tensordict import TensorDict

TORCH_VERSION = version.parse(".".join(torch.__version__.split(".")[:3]))
TORCH_VERSION = version.parse(version.parse(torch.__version__).base_version)


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/compile/compile_td_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from tensordict import LazyStackedTensorDict, tensorclass, TensorDict
from torch.utils._pytree import tree_map

TORCH_VERSION = version.parse(".".join(torch.__version__.split(".")[:3]))
TORCH_VERSION = version.parse(version.parse(torch.__version__).base_version)


@tensorclass
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/compile/tensordict_nn_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from tensordict.nn import TensorDictModule as Mod, TensorDictSequential as Seq

TORCH_VERSION = version.parse(".".join(torch.__version__.split(".")[:3]))
TORCH_VERSION = version.parse(version.parse(torch.__version__).base_version)

sys.setrecursionlimit(10000)

Expand Down
2 changes: 1 addition & 1 deletion test/test_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

from torch.utils._pytree import SUPPORTED_NODES, tree_map

TORCH_VERSION = version.parse(torch.__version__).base_version
TORCH_VERSION = version.parse(version.parse(torch.__version__).base_version)

_has_onnx = importlib.util.find_spec("onnxruntime", None) is not None

Expand Down
4 changes: 1 addition & 3 deletions test/test_distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,7 @@ def test_fsdp_module(self, tmpdir):


# not using TorchVersion to make the comparison work with dev
TORCH_VERSION = version.parse(
".".join(map(str, version.parse(torch.__version__).release))
)
TORCH_VERSION = version.parse(version.parse(torch.__version__).base_version)


@pytest.mark.skipif(
Expand Down
2 changes: 1 addition & 1 deletion test/test_tensordict.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
_has_h5py = True
except ImportError:
_has_h5py = False
TORCH_VERSION = version.parse(torch.__version__).base_version
TORCH_VERSION = version.parse(version.parse(torch.__version__).base_version)

_has_onnx = importlib.util.find_spec("onnxruntime", None) is not None

Expand Down

0 comments on commit e489ad9

Please sign in to comment.