|
18 | 18 | from abc import ABCMeta, abstractmethod |
19 | 19 | from dataclasses import dataclass |
20 | 20 | from pathlib import Path |
| 21 | +from typing import (IO, TYPE_CHECKING, Any, Callable, Dict, Iterable, List, |
| 22 | + Literal, Optional, Sequence, Tuple, TypeVar, Union) |
| 23 | + |
21 | 24 | import numpy as np |
22 | 25 | from sentencepiece import SentencePieceProcessor # type: ignore |
23 | | -from typing import (IO, Any, Callable, Iterable, Literal, Optional, Sequence, |
24 | | - TypeVar, Union, List, Dict, Tuple, TYPE_CHECKING) |
| 26 | + |
25 | 27 | if TYPE_CHECKING: |
26 | 28 | from typing_extensions import TypeAlias |
27 | 29 |
|
@@ -684,7 +686,7 @@ def load(offset: int, elm_count: int) -> NDArray: |
684 | 686 | description = f'storage data_type={data_type} path-in-zip={filename} path={self.zip_file.filename}' |
685 | 687 | return LazyStorage(load=load, kind=pid[1], description=description) |
686 | 688 |
|
687 | | - def lazy_rebuild_tensor_v2(storage: Any, storage_offset: Any, size: Any, stride: Any, # pyright: ignore[reportSelfClsParameterName] |
| 689 | + def lazy_rebuild_tensor_v2(storage: Any, storage_offset: Any, size: Any, stride: Any, # pyright: ignore[reportSelfClsParameterName] |
688 | 690 | requires_grad: Any, backward_hooks: Any, metadata: Any = None) -> LazyTensor: |
689 | 691 | assert isinstance(storage, LazyStorage) |
690 | 692 |
|
|
0 commit comments