We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52ebcec commit 67e838bCopy full SHA for 67e838b
pytorch_lightning/utilities/apply_func.py
@@ -17,7 +17,7 @@
17
from copy import copy
18
from functools import partial
19
from typing import Any, Callable, Optional, Union
20
-from packaging import version
+from distutils.version import LooseVersion
21
22
import numpy as np
23
import torch
@@ -27,7 +27,7 @@
27
28
if _TORCHTEXT_AVAILABLE:
29
from torchtext import __version__ as torchtext_version
30
- if version.parse(torchtext_version) < version.parse('0.9.0a0+036df73'):
+ if LooseVersion(torchtext_version) < LooseVersion('0.9.0a0+036df73'):
31
from torchtext.data import Batch
32
else:
33
from torchtext.legacy.data import Batch
0 commit comments