CFO-Burgers-Flow / README.md
yushuang88's picture
Upload folder using huggingface_hub
bdccc62 verified
|
Raw History Blame Contribute Delete
3.8 kB
---
license: apache-2.0
language:
- en
tags:
- OneScience
- fluid-dynamics
- burgers-equation
- pytorch
library_name: pytorch
---
<p align="center"><strong><span style="font-size: 30px;">CFO-Burgers-Flow</span></strong></p>
# Model Introduction
CFO-Burgers-Flow predicts continuous-time trajectories of the one-dimensional Burgers equation from an initial state.
Paper: [CFO: Learning Continuous-Time PDE Dynamics via Flow-Matched Neural Operators](https://arxiv.org/pdf/2512.05297).
# Model Description
This package reproduces the paper's Table 1 Burgers experiment with 100% time sampling and the Quintic CFO method. A time-conditioned 1D U-Net learns a continuous-time velocity field, and RK4 integrates the predicted trajectory.
## Intended Use
| Task | Description |
| --- | --- |
| Burgers forecasting | Predict a full space-time trajectory from an initial field |
| PDE surrogate research | Study continuous-time neural operators |
# Usage
## 1. OneCode
[Open the OneCode environment](https://web-2069360198568017922-iaaj.ksai.scnet.cn:58043/home).
## 2. Manual Setup
**Hardware requirements**
A GPU or DCU is recommended. CPU inference is possible but slower.
### Download the Model Package
```bash
hf download OneScience-Group/CFO-Burgers-Flow --local-dir ./CFO-Burgers-Flow
cd CFO-Burgers-Flow
```
### Set Up the Runtime Environment
**DCU environment**
```bash
conda create -n onescience311 python=3.11 -y
conda activate onescience311
pip install onescience[cfd-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
pip install scipy pyyaml matplotlib
```
**GPU environment**
```bash
conda create -n onescience311 python=3.11 -y libstdcxx-ng=12 libgcc-ng=12 gcc_linux-64=12 gxx_linux-64=12
conda activate onescience311
pip install onescience[cfd-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai
pip install scipy pyyaml matplotlib
```
### Training Data
The [OneScience/CFO-Burgers dataset on ModelScope](https://www.modelscope.cn/datasets/OneScience/CFO-Burgers) provides the original `Burger.mat` and `DATA_MANIFEST.json`. Place both files in `data/`. The original data came from the paper authors' [CFO data download page](https://drive.google.com/drive/folders/1tz0FQ8qqbLMxu_WPlAMHZmLMr2sBv2oE). The file has 1200 trajectories; the model uses 1000/100/100 train/validation/test trajectories, with a fixed split seed of 43.
This Hugging Face repository contains the **model only**, not a Hugging Face dataset mirror. Do not use a Hugging Face dataset download command until such a dataset repository exists.
### Training
From the model package root, run:
```bash
python scripts/train.py
```
The configured run uses 60,000 training steps.
### Checkpoint
The trained checkpoint is `weight/best_model.pth` (7,308,542 bytes; SHA256 `7287ce3dddb7f620f75d7ab6a9dc8ce9fa313b67e87566e8c19841effc79e42b`). The reproduced test trajectory relative L2 is `0.00347142`; the paper's Table 1 reports `0.00589 +/- 0.00079` across multiple runs, so these are not identical statistical settings.
### Inference
```bash
python scripts/inference.py
```
### Evaluation and Visualization
```bash
python scripts/result.py
```
# Official OneScience Information
| Platform | Main Repository | Skills Repository |
| --- | --- | --- |
| Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
| GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
# Citation and License
Paper: [CFO](https://arxiv.org/pdf/2512.05297). Official implementation: [CFO_official](https://github.com/shannon-hou/CFO_official). The original data's redistribution terms should be checked separately from the official code license.