File size: 2,450 Bytes
db32cff | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | ---
license: apache-2.0
library_name: pytorch
tags:
- OneScience
- neural-operator
- darcy-flow
---
# MoNo-light: Darcy 85x85
This package reproduces the MoNo-light Darcy experiment in Table 3 of the [MoNo paper](https://arxiv.org/pdf/2608.09764v1). It predicts pressure from permeability on an 85x85 grid using multiscale latent variables and Sinkhorn transport. The single-seed run completed 500 epochs with 1,000 training and 200 test samples.
## Results
The reloaded final-epoch checkpoint achieves mean test relative L2 **0.00693725**, versus **0.0070** in the paper, a numerical difference of about 0.9%. Hardware, software, and the Sinkhorn kernel differ from the authors' setup, so this is not evidence of strict same-condition superiority. Full metrics and plots are in `results/`.
## Download
```bash
hf download OneScience-Group/MoNo-light --local-dir ./MoNo-light
cd MoNo-light
```
The two original 421x421 Darcy MAT files are also hosted in the [OneScience/HNO-Darcy ModelScope dataset](https://www.modelscope.cn/datasets/OneScience/HNO-Darcy). This Hugging Face repository contains the model only, not the raw data. Download the dataset from the model directory:
```bash
modelscope download --dataset OneScience/HNO-Darcy --local_dir ./data
```
The package reads `data/piececonst_r421_N1024_smooth1.mat` and `data/piececonst_r421_N1024_smooth2.mat`. Both contain `coeff` and `sol` arrays; the loader uses the first 1,000 and 200 samples respectively and strides the 421x421 grid by five. It creates a local cache on first use.
## Environment and usage
Use Python 3.11, PyTorch on an allocated GPU/DCU, `onescience[cfd-gpu]` or `onescience[cfd-dcu]`, SciPy, PyYAML, and Matplotlib. The raw MAT files total about 3.39 GB; allow sufficient RAM for the first load.
```bash
python scripts/inference.py
python scripts/result.py
```
For a new 500-epoch training run, move the included `weight/` and `results/` outside the model directory before running `python scripts/train.py`. The published inference accepts a relocated data directory while retaining the model/training-configuration check. The weights are unchanged from the original run.
Checkpoint: `weight/best_model.pth` (SHA256 `d20393f9ae89d38f53b8da9e09799db57bef37154ec8c7fddb9a9dd4a6666122`). Original data source: [FNO Darcy files](https://drive.google.com/drive/folders/1UnbQh2WWc6knEHbLn-ZaXrKUZhp7pjt-). Check the source's terms before redistributing the data.
|