Skip to content

Commit

Permalink
fix ElectricityConsumptionZurich dataset hash (#2250)
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisbader authored Feb 24, 2024
1 parent 24ae0e1 commit 2bc6319
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions darts/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

from .dataset_loaders import DatasetLoaderCSV, DatasetLoaderMetadata

pd_above_v22 = pd.__version__ >= "2.2"

"""
Overall usage of this package:
from darts.datasets import AirPassengersDataset
Expand Down Expand Up @@ -890,12 +888,8 @@ def pre_process_dataset(dataset_path):
df.index.name = "Timestamp"
df.to_csv(self._get_path_dataset())

# pandas v2.2.0 introduced some changes
hash_expected = (
"485d81e9902cc0ccb1f86d7e01fb37cd"
if pd_above_v22
else "a019125b7f9c1afeacb0ae60ce7455ef"
)
# pandas v2.2.0 introduced a bug that was fixed in v2.2.1; the expected hash for 2.2.0
# is "485d81e9902cc0ccb1f86d7e01fb37cd"
# hash value for dataset with weather data
super().__init__(
metadata=DatasetLoaderMetadata(
Expand All @@ -905,7 +899,7 @@ def pre_process_dataset(dataset_path):
"ewz_stromabgabe_netzebenen_stadt_zuerich/"
"download/ewz_stromabgabe_netzebenen_stadt_zuerich.csv"
),
hash=hash_expected,
hash="a019125b7f9c1afeacb0ae60ce7455ef",
header_time="Timestamp",
freq="15min",
pre_process_csv_fn=pre_process_dataset,
Expand Down

0 comments on commit 2bc6319

Please sign in to comment.