Skip to content

Commit

Permalink
Add item_id to ERCOT and ETT datasets (#3150)
Browse files Browse the repository at this point in the history
*Description of changes:*
- Add item_id to ERCOT and ETT datasets

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.


**Please tag this pr with at least one of these labels to make our
release process faster:** BREAKING, new feature, bug fix, other change,
dev setup
  • Loading branch information
shchur authored Mar 22, 2024
1 parent 9f33c1b commit e796bc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/gluonts/dataset/repository/_ercot.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def generate_ercot_dataset(dataset_path: Path, dataset_writer: DatasetWriter):
test = [
{
"start": start,
"item_id": region,
"target": df[region].to_numpy(dtype=np.float64),
}
for region in regions
Expand All @@ -42,6 +43,7 @@ def generate_ercot_dataset(dataset_path: Path, dataset_writer: DatasetWriter):
train = [
{
"start": start,
"item_id": region,
"target": df[region].to_numpy(dtype=np.float64)[
:-prediction_length
],
Expand Down
2 changes: 2 additions & 0 deletions src/gluonts/dataset/repository/_ett_small.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def generate_ett_small_dataset(
test.append(
{
"start": start,
"item_id": col,
"target": df[col].values,
}
)
Expand All @@ -60,6 +61,7 @@ def generate_ett_small_dataset(
train.append(
{
"start": start,
"item_id": col,
"target": df[col].values[:-prediction_length],
}
)
Expand Down

0 comments on commit e796bc4

Please sign in to comment.