зеркало из https://github.com/microsoft/torchgeo.git
Remove packaging dependency (#1019)
* Remove packaging dependency * Remove additional references * Remove unused import
This commit is contained in:
Родитель
60eb61b5fa
Коммит
e9c305861c
|
@ -29,7 +29,6 @@ dependencies:
|
|||
- nbsphinx>=0.8.5
|
||||
- omegaconf>=2.1
|
||||
- opencv-python>=3.4.2.17
|
||||
- packaging>=17
|
||||
- pandas>=0.23.2
|
||||
- pillow>=6.2
|
||||
- pydocstyle[toml]>=6.1
|
||||
|
|
|
@ -8,7 +8,6 @@ kornia==0.6.5
|
|||
matplotlib==3.3.0
|
||||
numpy==1.17.2
|
||||
omegaconf==2.1.0
|
||||
packaging==17.0
|
||||
pillow==6.2.0
|
||||
pyproj==2.2.0
|
||||
pytorch-lightning==1.5.1
|
||||
|
|
|
@ -9,7 +9,6 @@ matplotlib==3.5.2
|
|||
numpy==1.23.0;python_version>='3.8'
|
||||
numpy==1.21.6;python_version=='3.7'
|
||||
omegaconf==2.2.2
|
||||
packaging==21.3
|
||||
pillow==9.2.0
|
||||
pyproj==3.3.1;python_version>='3.8'
|
||||
pyproj==3.2.0;python_version=='3.7'
|
||||
|
|
|
@ -8,7 +8,6 @@ kornia==0.6.9
|
|||
matplotlib==3.6.3
|
||||
numpy==1.24.1;python_version>='3.8'
|
||||
omegaconf==2.3.0
|
||||
packaging==23.0
|
||||
pillow==9.4.0
|
||||
pyproj==3.4.1;python_version>='3.8'
|
||||
pytorch-lightning[extra]==1.9.0
|
||||
|
|
|
@ -37,8 +37,6 @@ install_requires =
|
|||
numpy>=1.17.2,<2
|
||||
# omegaconf 2.1+ required for to_object method
|
||||
omegaconf>=2.1,<3
|
||||
# packaging 17+ required by pytorch-lightning
|
||||
packaging>=17,<24
|
||||
# pillow 6.2+ required by matplotlib
|
||||
pillow>=6.2,<10
|
||||
# pyproj 2.2+ required for CRS object
|
||||
|
|
|
@ -4,25 +4,19 @@
|
|||
import os
|
||||
from collections import OrderedDict
|
||||
from pathlib import Path
|
||||
from typing import Dict, Optional
|
||||
from typing import Dict
|
||||
|
||||
import pytest
|
||||
import torch
|
||||
import torchvision
|
||||
from _pytest.fixtures import SubRequest
|
||||
from packaging.version import parse
|
||||
from torch import Tensor
|
||||
from torch.nn.modules import Module
|
||||
|
||||
|
||||
@pytest.fixture(scope="package")
|
||||
def model() -> Module:
|
||||
kwargs: Dict[str, Optional[bool]] = {}
|
||||
if parse(torchvision.__version__) >= parse("0.13"):
|
||||
kwargs = {"weights": None}
|
||||
else:
|
||||
kwargs = {"pretrained": False}
|
||||
model: Module = torchvision.models.resnet18(**kwargs)
|
||||
model: Module = torchvision.models.resnet18(weights=None)
|
||||
return model
|
||||
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ import rasterio
|
|||
import shapely
|
||||
import shapely.wkt as wkt
|
||||
import torch
|
||||
from packaging.version import parse
|
||||
from rasterio.crs import CRS
|
||||
from rtree.index import Index, Property
|
||||
|
||||
|
@ -387,7 +386,7 @@ class OpenBuildings(VectorDataset):
|
|||
x = json.loads(x.replace("'", '"'))
|
||||
import fiona
|
||||
|
||||
if parse(fiona.__version__) >= parse("1.9a1"):
|
||||
if hasattr(fiona, "model"):
|
||||
import fiona.model
|
||||
|
||||
geom = fiona.model.Geometry(**x)
|
||||
|
|
Загрузка…
Ссылка в новой задаче