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

Fix traffic_2008 dataset #128

Merged
merged 2 commits into from
Nov 1, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `traffic_2008` to internal datasets ([#94](https://github.com/etna-team/etna/pull/94))
- Add `traffic_2015` to internal datasets ([#100](https://github.com/etna-team/etna/pull/100))
- Add `tourism` to internal datasets ([#120](https://github.com/etna-team/etna/pull/120))
- Add `weather` to internal datasets ([#125](https://github.com/etna-team/etna/pull/125))
- Add `weather` to internal datasets ([#125](https://github.com/etna-team/etna/pull/125))

### Changed
-
Expand All @@ -23,9 +23,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-

### Fixed
-
-
- Fix links from tinkoff-ai/etna to etna-team/etna ([#47](https://github.com/etna-team/etna/pull/47))
- Fix `traffic_2008` ([128](https://github.com/etna-team/etna/pull/128))
-

### Removed
Expand Down
2 changes: 1 addition & 1 deletion etna/datasets/internal_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def read_data(path: Path, part: str) -> np.ndarray:
with open(path, "r") as f:
if part in ("randperm", "stations_list"):
data = f.read().lstrip("[").rstrip("]\n").split(" ")
out = np.array(map(int, data)) if part == "randperm" else np.array(data)
out = np.array(list(map(int, data))) if part == "randperm" else np.array(data)
d-a-bunin marked this conversation as resolved.
Show resolved Hide resolved
return out
else:
lines = []
Expand Down
2 changes: 1 addition & 1 deletion tests/test_datasets/test_internal_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def test_not_present_part():
],
)
def test_dataset_statistics(dataset_name, expected_shape, expected_min_date, expected_max_date, dataset_parts):
ts_full = load_dataset(dataset_name, parts="full")
ts_full = load_dataset(dataset_name, parts="full", rebuild_dataset=True)
d-a-bunin marked this conversation as resolved.
Show resolved Hide resolved
ts_parts = load_dataset(dataset_name, parts=dataset_parts)
parts_rows = sum([ts.df.shape[0] for ts in ts_parts])
assert ts_full.df.shape == expected_shape
Expand Down