Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
map labels
Browse files Browse the repository at this point in the history
nilsleh committed Jan 27, 2025
2 parents df2cdba + 66f6536 commit df21841
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions requirements/datasets.txt
Original file line number Diff line number Diff line change
@@ -6,3 +6,4 @@ pandas[parquet]==2.2.3
pycocotools==2.0.8
scikit-image==0.25.0
scipy==1.15.1
zstandard==0.23.0
1 change: 0 additions & 1 deletion requirements/tests.txt
Original file line number Diff line number Diff line change
@@ -2,4 +2,3 @@
nbmake==1.5.5
pytest==8.3.4
pytest-cov==6.0.0
zstandard==0.23.0
2 changes: 2 additions & 0 deletions tests/datasets/test_bigearthnet.py
Original file line number Diff line number Diff line change
@@ -14,6 +14,8 @@

from torchgeo.datasets import BigEarthNet, BigEarthNetV2, DatasetNotFoundError

pytest.importorskip('zstandard', minversion='0.23')


class TestBigEarthNet:
@pytest.fixture(
8 changes: 4 additions & 4 deletions torchgeo/datasets/bigearthnet.py
Original file line number Diff line number Diff line change
@@ -6,6 +6,8 @@
import glob
import json
import os
import tarfile
import tempfile
from collections.abc import Callable
from typing import ClassVar

@@ -19,17 +21,15 @@
from matplotlib.figure import Figure
from rasterio.enums import Resampling
from torch import Tensor
import tempfile
import tarfile

from .errors import DatasetNotFoundError
from .geo import NonGeoDataset
from .utils import (
Path,
download_url,
extract_archive,
sort_sentinel2_bands,
lazy_import,
sort_sentinel2_bands,
)

Check failure on line 33 in torchgeo/datasets/bigearthnet.py

GitHub Actions / ruff

Ruff (I001)

torchgeo/datasets/bigearthnet.py:6:1: I001 Import block is un-sorted or un-formatted


@@ -683,7 +683,7 @@ class BigEarthNetV2(NonGeoDataset):

def __init__(
self,
root: str = 'data',
root: Path = 'data',
split: str = 'train',
bands: str = 'all',
transforms: Callable[[dict[str, Tensor]], dict[str, Tensor]] | None = None,

0 comments on commit df21841

Please sign in to comment.