Update README.md
Browse files
README.md
CHANGED
|
@@ -27,10 +27,24 @@ configs:
|
|
| 27 |
# How to use
|
| 28 |
|
| 29 |
```py
|
| 30 |
-
hf_dataset = load_dataset("
|
| 31 |
hf_dataset = hf_dataset.with_format("numpy")["train"]
|
| 32 |
|
| 33 |
hf_dataset_30V = hf_dataset.filter(lambda x: x["config"] == "30V_Jan24")
|
| 34 |
hf_dataset_60V = hf_dataset.filter(lambda x: x["config"] == "60V_Dec24")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
```
|
| 36 |
|
|
|
|
| 27 |
# How to use
|
| 28 |
|
| 29 |
```py
|
| 30 |
+
hf_dataset = load_dataset("MLDS-NUS/polymer_re-upload")
|
| 31 |
hf_dataset = hf_dataset.with_format("numpy")["train"]
|
| 32 |
|
| 33 |
hf_dataset_30V = hf_dataset.filter(lambda x: x["config"] == "30V_Jan24")
|
| 34 |
hf_dataset_60V = hf_dataset.filter(lambda x: x["config"] == "60V_Dec24")
|
| 35 |
+
|
| 36 |
+
for sample in hf_dataset_30V:
|
| 37 |
+
for k, v in sample.items():
|
| 38 |
+
if isinstance(v, np.ndarray):
|
| 39 |
+
print(f"{k}: {type(v)}, shape={v.shape}, dtype={v.dtype}")
|
| 40 |
+
else:
|
| 41 |
+
print(f"{k}: {v}")
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
```txt
|
| 45 |
+
config: 30V_Jan24
|
| 46 |
+
traj_id: 30V_Tra_0
|
| 47 |
+
shape: <class 'numpy.ndarray'>, shape=(3,), dtype=int64
|
| 48 |
+
data: <class 'numpy.ndarray'>, shape=(160, 100, 350), dtype=int64
|
| 49 |
```
|
| 50 |
|