зеркало из https://github.com/microsoft/torchgeo.git
Fix missing imports
This commit is contained in:
Родитель
d94e242f90
Коммит
6008649a96
|
@ -52,6 +52,10 @@ class TestGeoDataset:
|
|||
def test_str(self, dataset: GeoDataset) -> None:
|
||||
assert "type: GeoDataset" in str(dataset)
|
||||
|
||||
def test_abstract(self) -> None:
|
||||
with pytest.raises(TypeError, match="Can't instantiate abstract class"):
|
||||
GeoDataset() # type: ignore[abstract]
|
||||
|
||||
def test_add_vision(self, dataset: GeoDataset) -> None:
|
||||
ds2 = CustomVisionDataset()
|
||||
with pytest.raises(
|
||||
|
|
|
@ -4,9 +4,11 @@ from datetime import datetime
|
|||
from typing import Any, Callable, Dict, Optional
|
||||
|
||||
import rasterio
|
||||
import torch
|
||||
from torchvision.datasets.utils import check_integrity, download_and_extract_archive
|
||||
|
||||
from .geo import GeoDataset
|
||||
from .utils import BoundingBox
|
||||
|
||||
|
||||
class CDL(GeoDataset):
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
import abc
|
||||
from typing import Any, Dict, Iterable
|
||||
|
||||
import rasterio
|
||||
import torch
|
||||
from rtree.index import Index, Property
|
||||
from torch.utils.data import Dataset
|
||||
|
||||
|
|
|
@ -5,8 +5,10 @@ from datetime import datetime
|
|||
from typing import Any, Callable, Dict, Optional, Sequence
|
||||
|
||||
import rasterio
|
||||
import torch
|
||||
|
||||
from .geo import GeoDataset
|
||||
from .utils import BoundingBox
|
||||
|
||||
|
||||
class Landsat(GeoDataset, abc.ABC):
|
||||
|
|
|
@ -5,8 +5,10 @@ from datetime import datetime
|
|||
from typing import Any, Callable, Dict, Optional, Sequence
|
||||
|
||||
import rasterio
|
||||
import torch
|
||||
|
||||
from .geo import GeoDataset
|
||||
from .utils import BoundingBox
|
||||
|
||||
|
||||
class Sentinel(GeoDataset, abc.ABC):
|
||||
|
|
Загрузка…
Ссылка в новой задаче