Datasets:
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,4 +1,12 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
dataset_info:
|
| 3 |
features:
|
| 4 |
- name: Base_2_2/Zone
|
|
@@ -57,3 +65,111 @@ configs:
|
|
| 57 |
- split: test
|
| 58 |
path: data/test-*
|
| 59 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: cc-by-sa-4.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- graph-ml
|
| 5 |
+
pretty_name: 2D quasistatic non-linear structural mechanics with finite elasticity
|
| 6 |
+
and topology variations
|
| 7 |
+
tags:
|
| 8 |
+
- physics learning
|
| 9 |
+
- geometry learning
|
| 10 |
dataset_info:
|
| 11 |
features:
|
| 12 |
- name: Base_2_2/Zone
|
|
|
|
| 65 |
- split: test
|
| 66 |
path: data/test-*
|
| 67 |
---
|
| 68 |
+
<p align='center'>
|
| 69 |
+
<img src='https://i.ibb.co/JR7bWLNn/Logo-2-D-Multiscale-Hyperelasticity-2-consolas-100.png' alt='https://i.ibb.co/JR7bWLNn/Logo-2-D-Multiscale-Hyperelasticity-2-consolas-100.png' width='1000'/>
|
| 70 |
+
<img src='https://i.ibb.co/zHFQFnPR/2-D-Multiscale-Hyperelasticity.png' alt='https://i.ibb.co/zHFQFnPR/2-D-Multiscale-Hyperelasticity.png' width='1000'/>
|
| 71 |
+
</p>
|
| 72 |
+
|
| 73 |
+
```yaml
|
| 74 |
+
legal:
|
| 75 |
+
owner: Safran
|
| 76 |
+
license: cc-by-sa-4.0
|
| 77 |
+
data_production:
|
| 78 |
+
type: simulation
|
| 79 |
+
physics: 2D quasistatic non-linear structural mechanics, finite elasticity (large
|
| 80 |
+
strains), P1 elements, compressible hyperelastic material
|
| 81 |
+
simulator: fenics
|
| 82 |
+
num_samples:
|
| 83 |
+
train: 764
|
| 84 |
+
test: 376
|
| 85 |
+
storage_backend: hf_datasets
|
| 86 |
+
plaid:
|
| 87 |
+
version: 0.1.11.dev21+g94f13b9c8
|
| 88 |
+
|
| 89 |
+
```
|
| 90 |
+
This dataset was generated with [`plaid`](https://plaid-lib.readthedocs.io/), we refer to this documentation for additional details on how to extract data from `plaid_sample` objects.
|
| 91 |
+
|
| 92 |
+
The simplest way to use this dataset is to first download it:
|
| 93 |
+
```python
|
| 94 |
+
from plaid.storage import download_from_hub
|
| 95 |
+
|
| 96 |
+
repo_id = "channel/dataset"
|
| 97 |
+
local_folder = "downloaded_dataset"
|
| 98 |
+
|
| 99 |
+
download_from_hub(repo_id, local_folder)
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
Then, to iterate over the dataset and instantiate samples:
|
| 103 |
+
```python
|
| 104 |
+
from plaid.storage import init_from_disk
|
| 105 |
+
|
| 106 |
+
local_folder = "downloaded_dataset"
|
| 107 |
+
split_name = "train"
|
| 108 |
+
|
| 109 |
+
datasetdict, converterdict = init_from_disk(local_folder)
|
| 110 |
+
|
| 111 |
+
dataset = datasetdict[split]
|
| 112 |
+
converter = converterdict[split]
|
| 113 |
+
|
| 114 |
+
for i in range(len(dataset)):
|
| 115 |
+
raw_sample = dataset[i]
|
| 116 |
+
plaid_sample = converter.to_plaid(dataset, i)
|
| 117 |
+
```
|
| 118 |
+
|
| 119 |
+
It is possible to stream the data directly:
|
| 120 |
+
```python
|
| 121 |
+
from plaid.storage import init_streaming_from_hub
|
| 122 |
+
|
| 123 |
+
repo_id = "channel/dataset"
|
| 124 |
+
|
| 125 |
+
datasetdict, converterdict = init_streaming_from_hub(repo_id)
|
| 126 |
+
|
| 127 |
+
dataset = datasetdict[split]
|
| 128 |
+
converter = converterdict[split]
|
| 129 |
+
|
| 130 |
+
for sample_raw in dataset:
|
| 131 |
+
plaid_sample = converter.sample_to_plaid(sample_raw)
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
Plaid samples' features can be retrieved like the following:
|
| 135 |
+
```python
|
| 136 |
+
from plaid.storage import load_problem_definitions_from_disk
|
| 137 |
+
local_folder = "downloaded_dataset"
|
| 138 |
+
pb_defs = load_problem_definitions_from_disk(local_folder)
|
| 139 |
+
|
| 140 |
+
# or
|
| 141 |
+
from plaid.storage import load_problem_definitions_from_hub
|
| 142 |
+
repo_id = "channel/dataset"
|
| 143 |
+
pb_defs = load_problem_definitions_from_hub(repo_id)
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
pb_def = pb_defs[0]
|
| 147 |
+
|
| 148 |
+
plaid_sample = ... # use a method from above to instantiate a plaid sample
|
| 149 |
+
|
| 150 |
+
for t in plaid_sample.get_all_time_values():
|
| 151 |
+
for path in pb_def.get_in_features_identifiers():
|
| 152 |
+
plaid_sample.get_feature_by_path(path=path, time=t)
|
| 153 |
+
for path in pb_def.get_out_features_identifiers():
|
| 154 |
+
plaid_sample.get_feature_by_path(path=path, time=t)
|
| 155 |
+
```
|
| 156 |
+
|
| 157 |
+
For those familiar with HF's `datasets` library, raw data can be retrieved without using the `plaid` library:
|
| 158 |
+
```python
|
| 159 |
+
from datasets import load_dataset
|
| 160 |
+
|
| 161 |
+
repo_id = "channel/dataset"
|
| 162 |
+
|
| 163 |
+
datasetdict = load_dataset(repo_id)
|
| 164 |
+
|
| 165 |
+
for split_name, dataset in datasetdict.items():
|
| 166 |
+
for raw_sample in dataset:
|
| 167 |
+
for feat_name in dataset.column_names:
|
| 168 |
+
feature = raw_sample[feat_name]
|
| 169 |
+
```
|
| 170 |
+
Notice that raw data refers to the variable features only, with a specific encoding for time variable features.
|
| 171 |
+
|
| 172 |
+
### Dataset Sources
|
| 173 |
+
|
| 174 |
+
- **Papers:**
|
| 175 |
+
- [arxiv](https://arxiv.org/abs/2505.02974)
|