Skip to content

Commit 19cc5ad

Browse files
committed
fix: make torch import local
1 parent 4e62971 commit 19cc5ad

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/caul/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
import tempfile
33
from pathlib import Path
44

5-
from torch._C._te import Tensor
6-
75
from caul.filesystem import save_tensor
86
from caul.objects import PreprocessorOutput
97

@@ -29,6 +27,8 @@ def prepare_file_input_batch(
2927
:return: tuple of batch input ids, wav paths, map from id to input ordering,
3028
temporary dir (if applicable) where tensor paths are kept
3129
"""
30+
from torch import Tensor
31+
3232
tmp_dir = None
3333
if output_dir is None and tmp_dir_fallback:
3434
tmp_dir = tempfile.TemporaryDirectory()

0 commit comments

Comments
 (0)