Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HuggingFace: use stable download URLs #1916

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion torchgeo/datasets/chabud.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class ChaBuD(NonGeoDataset):
]
rgb_bands = ["B04", "B03", "B02"]
folds = {"train": [1, 2, 3, 4], "val": [0]}
url = "https://huggingface.co/datasets/chabud-team/chabud-ecml-pkdd2023/resolve/main/train_eval.hdf5" # noqa: E501
url = "https://hf.co/datasets/chabud-team/chabud-ecml-pkdd2023/resolve/de222d434e26379aa3d4f3dd1b2caf502427a8b2/train_eval.hdf5" # noqa: E501
filename = "train_eval.hdf5"
md5 = "15d78fb825f9a81dad600db828d22c08"

Expand Down
10 changes: 5 additions & 5 deletions torchgeo/datasets/eurosat.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class EuroSAT(NonGeoClassificationDataset):
* https://ieeexplore.ieee.org/document/8519248
"""

url = "https://huggingface.co/datasets/torchgeo/eurosat/resolve/main/EuroSATallBands.zip" # noqa: E501
url = "https://hf.co/datasets/torchgeo/eurosat/resolve/06fd1b090bceecc0ce724cd21578ba7a6664fe8d/EuroSATallBands.zip" # noqa: E501
filename = "EuroSATallBands.zip"
md5 = "5ac12b3b2557aa56e1826e981e8e200e"

Expand Down Expand Up @@ -308,14 +308,14 @@ class EuroSAT100(EuroSAT):
.. versionadded:: 0.5
"""

url = "https://huggingface.co/datasets/torchgeo/eurosat/resolve/main/EuroSAT100.zip"
url = "https://hf.co/datasets/torchgeo/eurosat/resolve/06fd1b090bceecc0ce724cd21578ba7a6664fe8d/EuroSAT100.zip" # noqa: E501
filename = "EuroSAT100.zip"
md5 = "c21c649ba747e86eda813407ef17d596"

split_urls = {
"train": "https://huggingface.co/datasets/torchgeo/eurosat/raw/main/eurosat-train.txt", # noqa: E501
"val": "https://huggingface.co/datasets/torchgeo/eurosat/raw/main/eurosat-val.txt", # noqa: E501
"test": "https://huggingface.co/datasets/torchgeo/eurosat/raw/main/eurosat-test.txt", # noqa: E501
"train": "https://hf.co/datasets/torchgeo/eurosat/raw/06fd1b090bceecc0ce724cd21578ba7a6664fe8d/eurosat-train.txt", # noqa: E501
"val": "https://hf.co/datasets/torchgeo/eurosat/raw/06fd1b090bceecc0ce724cd21578ba7a6664fe8d/eurosat-val.txt", # noqa: E501
"test": "https://hf.co/datasets/torchgeo/eurosat/raw/06fd1b090bceecc0ce724cd21578ba7a6664fe8d/eurosat-test.txt", # noqa: E501
}
split_md5s = {
"train": "033d0c23e3a75e3fa79618b0e35fe1c7",
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/l7irish.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class L7Irish(RasterDataset):
.. versionadded:: 0.5
""" # noqa: E501

url = "https://huggingface.co/datasets/torchgeo/l7irish/resolve/main/{}.tar.gz" # noqa: E501
url = "https://hf.co/datasets/torchgeo/l7irish/resolve/6807e0b22eca7f9a8a3903ea673b31a115837464/{}.tar.gz" # noqa: E501

md5s = {
"austral": "0a34770b992a62abeb88819feb192436",
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/l8biome.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class L8Biome(RasterDataset):
.. versionadded:: 0.5
""" # noqa: E501

url = "https://huggingface.co/datasets/torchgeo/l8biome/resolve/main/{}.tar.gz" # noqa: E501
url = "https://hf.co/datasets/torchgeo/l8biome/resolve/f76df19accce34d2acc1878d88b9491bc81f94c8/{}.tar.gz" # noqa: E501

md5s = {
"barren": "0eb691822d03dabd4f5ea8aadd0b41c3",
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/mapinwild.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class MapInWild(NonGeoDataset):
.. versionadded:: 0.5
"""

url = "https://huggingface.co/datasets/burakekim/mapinwild/resolve/main/"
url = "https://hf.co/datasets/burakekim/mapinwild/resolve/d963778e31e7e0ed2329c0f4cbe493be532f0e71/" # noqa: E501

modality_urls = {
"esa_wc": {"esa_wc/ESA_WC.zip"},
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/skippd.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class SKIPPD(NonGeoDataset):
.. versionadded:: 0.5
"""

url = "https://huggingface.co/datasets/torchgeo/skippd/resolve/main/{}"
url = "https://hf.co/datasets/torchgeo/skippd/resolve/a16c7e200b4618cd93be3143cdb973e3f21498fa/{}" # noqa: E501
md5 = {
"forecast": "f4f3509ddcc83a55c433be9db2e51077",
"nowcast": "0000761d403e45bb5f86c21d3c69aa80",
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/ssl4eo.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class _Metadata(TypedDict):
"oli_sr": {"num_bands": 7, "rgb_bands": [3, 2, 1]},
}

url = "https://hf.co/datasets/torchgeo/ssl4eo_l/resolve/main/{0}/ssl4eo_l_{0}.tar.gz{1}" # noqa: E501
url = "https://hf.co/datasets/torchgeo/ssl4eo_l/resolve/e2467887e6a6bcd7547d9d5999f8d9bc3323dc31/{0}/ssl4eo_l_{0}.tar.gz{1}" # noqa: E501
checksums = {
"tm_toa": {
"aa": "553795b8d73aa253445b1e67c5b81f11",
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/ssl4eo_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class SSL4EOLBenchmark(NonGeoDataset):
.. versionadded:: 0.5
"""

url = "https://huggingface.co/datasets/torchgeo/ssl4eo-l-benchmark/resolve/main/{}.tar.gz" # noqa: E501
url = "https://hf.co/datasets/torchgeo/ssl4eo-l-benchmark/resolve/da96ae2b04cb509710b72fce9131c2a3d5c211c2/{}.tar.gz" # noqa: E501

valid_sensors = ["tm_toa", "etm_toa", "etm_sr", "oli_tirs_toa", "oli_sr"]
valid_products = ["cdl", "nlcd"]
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/ucmerced.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class UCMerced(NonGeoClassificationDataset):
* https://dl.acm.org/doi/10.1145/1869790.1869829
"""

url = "https://huggingface.co/datasets/torchgeo/ucmerced/resolve/main/UCMerced_LandUse.zip" # noqa: E501
url = "https://hf.co/datasets/torchgeo/ucmerced/resolve/d0af6e2eeea2322af86078068bd83337148a2149/UCMerced_LandUse.zip" # noqa: E501
filename = "UCMerced_LandUse.zip"
md5 = "5b7ec56793786b6dc8a908e8854ac0e4"

Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/usavars.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class USAVars(NonGeoDataset):
.. versionadded:: 0.3
"""

data_url = "https://huggingface.co/datasets/torchgeo/usavars/resolve/main/{}"
data_url = "https://hf.co/datasets/torchgeo/usavars/resolve/01377abfaf50c0cc8548aaafb79533666bbf288f/{}" # noqa: E501
dirname = "uar"

md5 = "677e89fd20e5dd0fe4d29b61827c2456"
Expand Down
Loading
Loading