yanbarros commited on
Commit
e3a5b82
·
verified ·
1 Parent(s): c25c6c3

darcy_2d_li2021 v1.0.0.post1: card, Parquet copies

Browse files
README.md CHANGED
@@ -1,26 +1,65 @@
1
  ---
 
2
  license: cc-by-4.0
 
 
 
 
3
  tags:
4
  - pinneapple
5
- - operator learning
6
- - neural operator
7
- - Darcy
 
 
8
  - benchmark
9
- - FNO
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  ---
11
 
12
  # 2-D Darcy flow, Li et al. (2021) operator-learning benchmark (1200 coefficient / pressure pairs, 128 x 128)
13
 
14
  -div(a grad u) = 1 on the unit square, u = 0 on the boundary. Coefficients a = 12 where g >= 0 and 3 where g < 0, g ~ N(0, (-Laplacian + 9 I)^-2) (Li et al. 2021, section 5.2). g is drawn as a periodic Gaussian random field on the 128 x 128 cell grid (Li et al. use a cosine expansion on 421 nodes), so a is piecewise constant on the cells of the stored grid. The task maps a to u. Cell centres ((i + 1/2) / 128, (j + 1/2) / 128); u is the cell average of the solution.
15
 
16
- `darcy_2d_li2021` v1.0.0 · licence cc-by-4.0 · Hub `PINNeAPPle-Labs/darcy-2d-li2021` @ v1.0.0 · 2 file(s), 71.1 MB, downloaded on first use
17
 
18
- ## Splits
19
 
20
- | Split | Rows | Content |
21
- |---|---|---|
22
- | `train` | 1000 | 1000 pairs |
23
- | `test` | 200 | 200 pairs (held out) |
 
 
24
 
25
  ## Columns
26
 
@@ -30,6 +69,33 @@ tags:
30
  | `index` | - | int32 | sample index (row of the generated set) |
31
  | `u` | - | float32[128, 128] | pressure, cell averages on the 128 x 128 cells |
32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  ## Provenance
34
 
35
  python scripts/zoo/operator_data.py generate --out DIR (inputs drawn from fixed seeds in the parent process, so the data do not depend on the number of workers); solvers in pinneapple_simulation.numerical_solvers.operator_benchmarks, written from the equations; seed 20212
@@ -38,20 +104,20 @@ python scripts/zoo/operator_data.py generate --out DIR (inputs drawn from fixed
38
 
39
  Solver (cell-centred two-point-flux finite volumes, harmonic face coefficients, sparse direct solve) checked in tests/test_operator_benchmarks.py on a manufactured variable-coefficient solution (second order, max error < 2e-3 at 64^2). Each sample is solved on the 512^2 grid (the piecewise-constant coefficient is represented exactly on every refinement) and averaged onto its 128^2 cells. Grid study on 4 held-aside inputs against 1024^2: max rel. L2 error 4.6e-3 (128^2), 1.6e-3 (256^2), 4.3e-4 (512^2, the dataset); observed order 1.36 / 1.21 (reduced from 2 by the coefficient jumps); Richardson estimate of the dataset's discretisation error ~8e-4 rel. L2, ten times below the ~1e-2 operator-learning methods reach on this task. u > 0 and below the a = 3 bound 1/24 in every sample.
40
 
41
- Split rule: rows 0-999 are train, 1000-1199 test; inputs are i.i.d. draws, so the contiguous split is a random split
42
 
43
- ## Citation
44
-
45
- Li Z., Kovachki N., Azizzadenesheli K., Liu B., Bhattacharya K., Stuart A., Anandkumar A. (2021). Fourier Neural Operator for Parametric Partial Differential Equations. ICLR 2021, arXiv:2010.08895. Data generated with PINNeAPPle's reference solvers (pinneapple_simulation.numerical_solvers.operator_benchmarks); PINNeAPPle, Zenodo DOI 10.5281/zenodo.23343062.
46
 
 
 
 
 
47
 
48
- ## Use
49
 
50
- ```python
51
- import pinneapple as pp
52
- d = pp.datasets.load("darcy_2d_li2021", split="test")
53
- ```
54
 
 
55
 
56
  ## Cite
57
 
 
1
  ---
2
+ pretty_name: 2-D Darcy flow, Li et al. (2021) operator-learning benchmark (1200 coefficient / pressure pairs, 128 x 128)
3
  license: cc-by-4.0
4
+ task_categories:
5
+ - other
6
+ size_categories:
7
+ - 1K<n<10K
8
  tags:
9
  - pinneapple
10
+ - physics
11
+ - scientific-machine-learning
12
+ - operator-learning
13
+ - neural-operator
14
+ - darcy
15
  - benchmark
16
+ - fno
17
+ configs:
18
+ - config_name: default
19
+ default: true
20
+ data_files:
21
+ - split: train
22
+ path: data/default/train-*.parquet
23
+ - split: test
24
+ path: data/default/test-*.parquet
25
+ dataset_info:
26
+ - config_name: default
27
+ features:
28
+ - name: a
29
+ list:
30
+ list: float32
31
+ length: 128
32
+ length: 128
33
+ - name: index
34
+ dtype: int32
35
+ - name: u
36
+ list:
37
+ list: float32
38
+ length: 128
39
+ length: 128
40
+ splits:
41
+ - name: train
42
+ num_bytes: 131076000
43
+ num_examples: 1000
44
+ - name: test
45
+ num_bytes: 26215200
46
+ num_examples: 200
47
  ---
48
 
49
  # 2-D Darcy flow, Li et al. (2021) operator-learning benchmark (1200 coefficient / pressure pairs, 128 x 128)
50
 
51
  -div(a grad u) = 1 on the unit square, u = 0 on the boundary. Coefficients a = 12 where g >= 0 and 3 where g < 0, g ~ N(0, (-Laplacian + 9 I)^-2) (Li et al. 2021, section 5.2). g is drawn as a periodic Gaussian random field on the 128 x 128 cell grid (Li et al. use a cosine expansion on 421 nodes), so a is piecewise constant on the cells of the stored grid. The task maps a to u. Cell centres ((i + 1/2) / 128, (j + 1/2) / 128); u is the cell average of the solution.
52
 
53
+ `darcy_2d_li2021` v1.0.0 (revision `v1.0.0.post1`) · licence cc-by-4.0 · part of the [PINNeAPPle](https://github.com/PINNeAPPle-Labs/PINNeAPPle) zoo
54
 
55
+ ## Configs and splits
56
 
57
+ | Config | Split | Samples | Parquet rows | Parquet files | Content |
58
+ |---|---|---|---|---|---|
59
+ | `default` | `train` | 1000 | 1000 | 1 | 1000 pairs |
60
+ | `default` | `test` | 200 | 200 | 1 | 200 pairs (held out) |
61
+
62
+ Split rule: rows 0-999 are train, 1000-1199 test; inputs are i.i.d. draws, so the contiguous split is a random split
63
 
64
  ## Columns
65
 
 
69
  | `index` | - | int32 | sample index (row of the generated set) |
70
  | `u` | - | float32[128, 128] | pressure, cell averages on the 128 x 128 cells |
71
 
72
+ ## Load
73
+
74
+ With the library (the npz files, SHA-256 checked; arrays with their full shape):
75
+
76
+ ```bash
77
+ pip install "pinneapple @ git+https://github.com/PINNeAPPle-Labs/PINNeAPPle"
78
+ ```
79
+
80
+ ```python
81
+ import pinneapple as pp
82
+
83
+ d = pp.datasets.load("darcy_2d_li2021", split="test")
84
+ print(d.n_rows, d.columns)
85
+ print(d["a"].shape)
86
+ ```
87
+
88
+ With `datasets` (the Parquet files of this repo):
89
+
90
+ ```python
91
+ from datasets import load_dataset
92
+
93
+ ds = load_dataset("PINNeAPPle-Labs/darcy-2d-li2021", split="test", revision="v1.0.0.post1")
94
+ print(ds)
95
+ ds = ds.with_format("numpy")
96
+ print(ds[0]["a"].shape)
97
+ ```
98
+
99
  ## Provenance
100
 
101
  python scripts/zoo/operator_data.py generate --out DIR (inputs drawn from fixed seeds in the parent process, so the data do not depend on the number of workers); solvers in pinneapple_simulation.numerical_solvers.operator_benchmarks, written from the equations; seed 20212
 
104
 
105
  Solver (cell-centred two-point-flux finite volumes, harmonic face coefficients, sparse direct solve) checked in tests/test_operator_benchmarks.py on a manufactured variable-coefficient solution (second order, max error < 2e-3 at 64^2). Each sample is solved on the 512^2 grid (the piecewise-constant coefficient is represented exactly on every refinement) and averaged onto its 128^2 cells. Grid study on 4 held-aside inputs against 1024^2: max rel. L2 error 4.6e-3 (128^2), 1.6e-3 (256^2), 4.3e-4 (512^2, the dataset); observed order 1.36 / 1.21 (reduced from 2 by the coefficient jumps); Richardson estimate of the dataset's discretisation error ~8e-4 rel. L2, ten times below the ~1e-2 operator-learning methods reach on this task. u > 0 and below the a = 3 bound 1/24 in every sample.
106
 
107
+ ## Files
108
 
109
+ The npz files are the library's format and the source of truth: `pp.datasets.load` downloads them from this repo at the tagged revision and refuses any file whose SHA-256 differs from the manifest of the package. The Parquet files under `data/` are derived from them by `pinneapple_hub.zoo.parquet.write_dataset` and hold the same numbers (a test round-trips npz -> Parquet -> arrays bit for bit); they are what the dataset viewer and `load_dataset` read.
 
 
110
 
111
+ | File | Size | SHA-256 |
112
+ |---|---|---|
113
+ | `train.npz` | 59.2 MB | `e32d8114482e9bcef831ab291938bbe0fd9306a24fb675d95a5735a98d1cc72d` |
114
+ | `test.npz` | 11.8 MB | `c7f7b49deb5eff530405f44a8b2f8246d8c666b898b32ebeb6a18e82b049e89e` |
115
 
116
+ Total 71.1 MB of npz.
117
 
118
+ ## Citation
 
 
 
119
 
120
+ Li Z., Kovachki N., Azizzadenesheli K., Liu B., Bhattacharya K., Stuart A., Anandkumar A. (2021). Fourier Neural Operator for Parametric Partial Differential Equations. ICLR 2021, arXiv:2010.08895. Data generated with PINNeAPPle's reference solvers (pinneapple_simulation.numerical_solvers.operator_benchmarks); PINNeAPPle, Zenodo DOI 10.5281/zenodo.23343062.
121
 
122
  ## Cite
123
 
data/default/test-00000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac12b1106bb8eaa76bab507f4c158196d2f3e4ccb07305d48160a77011a4fa5f
3
+ size 11983791
data/default/train-00000.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4540f3ff849ab16405f9b3587fa2f5af18f4b5476ce36205c21d0cf16522054a
3
+ size 59902919