fabiencasenave commited on
Commit
447da97
·
verified ·
1 Parent(s): eef0b06

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +115 -0
README.md CHANGED
@@ -1,4 +1,12 @@
1
  ---
 
 
 
 
 
 
 
 
2
  dataset_info:
3
  features:
4
  - name: Base_2_2/Zone
@@ -57,3 +65,110 @@ 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.13.dev36+g21db6656e.d20260302
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
+ plaid_sample = converter.to_plaid(dataset, i)
116
+ ```
117
+
118
+ It is possible to stream the data directly:
119
+ ```python
120
+ from plaid.storage import init_streaming_from_hub
121
+
122
+ repo_id = "channel/dataset"
123
+
124
+ datasetdict, converterdict = init_streaming_from_hub(repo_id)
125
+
126
+ dataset = datasetdict[split]
127
+ converter = converterdict[split]
128
+
129
+ for sample_raw in dataset:
130
+ plaid_sample = converter.sample_to_plaid(sample_raw)
131
+ ```
132
+
133
+ Plaid samples' features can be retrieved like the following:
134
+ ```python
135
+ from plaid.storage import load_problem_definitions_from_disk
136
+ local_folder = "downloaded_dataset"
137
+ pb_defs = load_problem_definitions_from_disk(local_folder)
138
+
139
+ # or
140
+ from plaid.storage import load_problem_definitions_from_hub
141
+ repo_id = "channel/dataset"
142
+ pb_defs = load_problem_definitions_from_hub(repo_id)
143
+
144
+
145
+ pb_def = pb_defs[0]
146
+
147
+ plaid_sample = ... # use a method from above to instantiate a plaid sample
148
+
149
+ for t in plaid_sample.get_all_time_values():
150
+ for path in pb_def.get_in_features_identifiers():
151
+ plaid_sample.get_feature_by_path(path=path, time=t)
152
+ for path in pb_def.get_out_features_identifiers():
153
+ plaid_sample.get_feature_by_path(path=path, time=t)
154
+ ```
155
+
156
+ For those familiar with HF's `datasets` library, raw data can be retrieved without using the `plaid` library:
157
+ ```python
158
+ from datasets import load_dataset
159
+
160
+ repo_id = "channel/dataset"
161
+
162
+ datasetdict = load_dataset(repo_id)
163
+
164
+ for split_name, dataset in datasetdict.items():
165
+ for raw_sample in dataset:
166
+ for feat_name in dataset.column_names:
167
+ feature = raw_sample[feat_name]
168
+ ```
169
+ Notice that raw data refers to the variable features only, with a specific encoding for time variable features.
170
+
171
+ ### Dataset Sources
172
+
173
+ - **Papers:**
174
+ - [arxiv](https://arxiv.org/abs/2505.02974)