Skip to content

Commit 67e838b

Browse files
committed
Update apply_func.py
1 parent 52ebcec commit 67e838b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytorch_lightning/utilities/apply_func.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from copy import copy
1818
from functools import partial
1919
from typing import Any, Callable, Optional, Union
20-
from packaging import version
20+
from distutils.version import LooseVersion
2121

2222
import numpy as np
2323
import torch
@@ -27,7 +27,7 @@
2727

2828
if _TORCHTEXT_AVAILABLE:
2929
from torchtext import __version__ as torchtext_version
30-
if version.parse(torchtext_version) < version.parse('0.9.0a0+036df73'):
30+
if LooseVersion(torchtext_version) < LooseVersion('0.9.0a0+036df73'):
3131
from torchtext.data import Batch
3232
else:
3333
from torchtext.legacy.data import Batch

0 commit comments

Comments
 (0)