xuxing123 commited on
Commit
bbdcdd2
·
verified ·
1 Parent(s): dcec635

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +5 -15
README.md CHANGED
@@ -56,26 +56,16 @@ Additional files:
56
 
57
  ## Usage
58
 
59
- ### Via `datasets` library
60
-
61
- ```python
62
- from datasets import load_dataset
63
-
64
- # Load training split (2021–2023)
65
- ds = load_dataset("xuxing123/AirQualityBench", "train", streaming=True)
66
- for row in ds.take(5):
67
- print(row["values"].shape) # (3720, 6)
68
- print(row["masks"].shape) # (3720, 6)
69
- ```
70
-
71
- ### Direct HDF5 access (recommended for training)
72
 
73
  ```python
74
  import h5py
75
 
76
  with h5py.File("aq_compact_2021.h5", "r") as f:
77
- values = f["values"][:] # (8760, 3720, 6)
78
- masks = f["masks"][:] # (8760, 3720, 6)
 
 
79
  ```
80
 
81
  ## Benchmark Code
 
56
 
57
  ## Usage
58
 
59
+ This dataset uses the HDF5 format with multiple internal arrays of different shapes, which is incompatible with the `datasets` library's HDF5 loader. Use `h5py` to read the files directly:
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
  ```python
62
  import h5py
63
 
64
  with h5py.File("aq_compact_2021.h5", "r") as f:
65
+ values = f["values"][:] # (T, 3720, 6) float32
66
+ masks = f["masks"][:] # (T, 3720, 6) bool
67
+ params = f["params"][:] # (6,) pollutant names
68
+ station_ids = f["station_ids"][:] # (3720,) station IDs
69
  ```
70
 
71
  ## Benchmark Code