Zhongning commited on
Commit
f0652e2
·
verified ·
1 Parent(s): 7c628e7

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -1,60 +1,97 @@
1
  *.7z filter=lfs diff=lfs merge=lfs -text
2
  *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.avro filter=lfs diff=lfs merge=lfs -text
4
  *.bin filter=lfs diff=lfs merge=lfs -text
 
5
  *.bz2 filter=lfs diff=lfs merge=lfs -text
6
- *.ckpt filter=lfs diff=lfs merge=lfs -text
7
  *.ftz filter=lfs diff=lfs merge=lfs -text
8
  *.gz filter=lfs diff=lfs merge=lfs -text
9
  *.h5 filter=lfs diff=lfs merge=lfs -text
10
  *.joblib filter=lfs diff=lfs merge=lfs -text
11
  *.lfs.* filter=lfs diff=lfs merge=lfs -text
12
- *.lz4 filter=lfs diff=lfs merge=lfs -text
13
- *.mds filter=lfs diff=lfs merge=lfs -text
14
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
15
  *.model filter=lfs diff=lfs merge=lfs -text
16
  *.msgpack filter=lfs diff=lfs merge=lfs -text
17
- *.npy filter=lfs diff=lfs merge=lfs -text
18
- *.npz filter=lfs diff=lfs merge=lfs -text
19
  *.onnx filter=lfs diff=lfs merge=lfs -text
20
  *.ot filter=lfs diff=lfs merge=lfs -text
21
  *.parquet filter=lfs diff=lfs merge=lfs -text
22
  *.pb filter=lfs diff=lfs merge=lfs -text
23
- *.pickle filter=lfs diff=lfs merge=lfs -text
24
- *.pkl filter=lfs diff=lfs merge=lfs -text
25
  *.pt filter=lfs diff=lfs merge=lfs -text
26
  *.pth filter=lfs diff=lfs merge=lfs -text
27
  *.rar filter=lfs diff=lfs merge=lfs -text
28
- *.safetensors filter=lfs diff=lfs merge=lfs -text
29
  saved_model/**/* filter=lfs diff=lfs merge=lfs -text
30
- *.tar.* filter=lfs diff=lfs merge=lfs -text
31
  *.tar filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
32
  *.tflite filter=lfs diff=lfs merge=lfs -text
33
  *.tgz filter=lfs diff=lfs merge=lfs -text
34
- *.wasm filter=lfs diff=lfs merge=lfs -text
35
  *.xz filter=lfs diff=lfs merge=lfs -text
36
  *.zip filter=lfs diff=lfs merge=lfs -text
37
- *.zst filter=lfs diff=lfs merge=lfs -text
38
- *tfevents* filter=lfs diff=lfs merge=lfs -text
39
- # Audio files - uncompressed
40
- *.pcm filter=lfs diff=lfs merge=lfs -text
41
- *.sam filter=lfs diff=lfs merge=lfs -text
42
- *.raw filter=lfs diff=lfs merge=lfs -text
43
- # Audio files - compressed
44
- *.aac filter=lfs diff=lfs merge=lfs -text
45
- *.flac filter=lfs diff=lfs merge=lfs -text
46
- *.mp3 filter=lfs diff=lfs merge=lfs -text
47
- *.ogg filter=lfs diff=lfs merge=lfs -text
48
- *.wav filter=lfs diff=lfs merge=lfs -text
49
- # Image files - uncompressed
50
- *.bmp filter=lfs diff=lfs merge=lfs -text
51
- *.gif filter=lfs diff=lfs merge=lfs -text
52
- *.png filter=lfs diff=lfs merge=lfs -text
53
- *.tiff filter=lfs diff=lfs merge=lfs -text
54
- # Image files - compressed
55
  *.jpg filter=lfs diff=lfs merge=lfs -text
 
56
  *.jpeg filter=lfs diff=lfs merge=lfs -text
 
 
57
  *.webp filter=lfs diff=lfs merge=lfs -text
58
- # Video files - compressed
 
 
 
 
 
 
 
 
 
 
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
- *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  *.7z filter=lfs diff=lfs merge=lfs -text
2
  *.arrow filter=lfs diff=lfs merge=lfs -text
 
3
  *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
  *.bz2 filter=lfs diff=lfs merge=lfs -text
 
6
  *.ftz filter=lfs diff=lfs merge=lfs -text
7
  *.gz filter=lfs diff=lfs merge=lfs -text
8
  *.h5 filter=lfs diff=lfs merge=lfs -text
9
  *.joblib filter=lfs diff=lfs merge=lfs -text
10
  *.lfs.* filter=lfs diff=lfs merge=lfs -text
 
 
 
11
  *.model filter=lfs diff=lfs merge=lfs -text
12
  *.msgpack filter=lfs diff=lfs merge=lfs -text
 
 
13
  *.onnx filter=lfs diff=lfs merge=lfs -text
14
  *.ot filter=lfs diff=lfs merge=lfs -text
15
  *.parquet filter=lfs diff=lfs merge=lfs -text
16
  *.pb filter=lfs diff=lfs merge=lfs -text
 
 
17
  *.pt filter=lfs diff=lfs merge=lfs -text
18
  *.pth filter=lfs diff=lfs merge=lfs -text
19
  *.rar filter=lfs diff=lfs merge=lfs -text
 
20
  saved_model/**/* filter=lfs diff=lfs merge=lfs -text
 
21
  *.tar filter=lfs diff=lfs merge=lfs -text
22
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
23
+ *.mat filter=lfs diff=lfs merge=lfs -text
24
+ *.npz filter=lfs diff=lfs merge=lfs -text
25
+ *.npy filter=lfs diff=lfs merge=lfs -text
26
+ *.h5 filter=lfs diff=lfs merge=lfs -text
27
+ *.hdf5 filter=lfs diff=lfs merge=lfs -text
28
+ *.pickle filter=lfs diff=lfs merge=lfs -text
29
+ *.pkl filter=lfs diff=lfs merge=lfs -text
30
  *.tflite filter=lfs diff=lfs merge=lfs -text
31
  *.tgz filter=lfs diff=lfs merge=lfs -text
 
32
  *.xz filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
35
+ *.tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ *.db* filter=lfs diff=lfs merge=lfs -text
37
+ *.ark* filter=lfs diff=lfs merge=lfs -text
38
+ **/*ckpt*data* filter=lfs diff=lfs merge=lfs -text
39
+ **/*ckpt*.meta filter=lfs diff=lfs merge=lfs -text
40
+ **/*ckpt*.index filter=lfs diff=lfs merge=lfs -text
41
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
42
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
43
  *.jpg filter=lfs diff=lfs merge=lfs -text
44
+ *.png filter=lfs diff=lfs merge=lfs -text
45
  *.jpeg filter=lfs diff=lfs merge=lfs -text
46
+ *.bmp filter=lfs diff=lfs merge=lfs -text
47
+ *.gif filter=lfs diff=lfs merge=lfs -text
48
  *.webp filter=lfs diff=lfs merge=lfs -text
49
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
50
+ *.wav filter=lfs diff=lfs merge=lfs -text
51
+ *.wma filter=lfs diff=lfs merge=lfs -text
52
+ *.aac filter=lfs diff=lfs merge=lfs -text
53
+ *.ogg filter=lfs diff=lfs merge=lfs -text
54
+ *.m4a filter=lfs diff=lfs merge=lfs -text
55
+ *.m3u8 filter=lfs diff=lfs merge=lfs -text
56
+ *.amr filter=lfs diff=lfs merge=lfs -text
57
+ *.audio filter=lfs diff=lfs merge=lfs -text
58
+ *.avi filter=lfs diff=lfs merge=lfs -text
59
+ *.flv filter=lfs diff=lfs merge=lfs -text
60
  *.mp4 filter=lfs diff=lfs merge=lfs -text
61
+ *.mpg filter=lfs diff=lfs merge=lfs -text
62
+ *.asf filter=lfs diff=lfs merge=lfs -text
63
+ *.mov filter=lfs diff=lfs merge=lfs -text
64
+ *.mpeg filter=lfs diff=lfs merge=lfs -text
65
+ *.3gp filter=lfs diff=lfs merge=lfs -text
66
+ *.wmv filter=lfs diff=lfs merge=lfs -text
67
+ *.rmvb filter=lfs diff=lfs merge=lfs -text
68
+ *.rm filter=lfs diff=lfs merge=lfs -text
69
+ *.ts filter=lfs diff=lfs merge=lfs -text
70
+ *.mkv filter=lfs diff=lfs merge=lfs -text
71
+ *.flash filter=lfs diff=lfs merge=lfs -text
72
+ *.vob filter=lfs diff=lfs merge=lfs -text
73
+ *.pdf filter=lfs diff=lfs merge=lfs -text
74
+ *.ost filter=lfs diff=lfs merge=lfs -text
75
+ *.pst filter=lfs diff=lfs merge=lfs -text
76
+ *.doc filter=lfs diff=lfs merge=lfs -text
77
+ *.docx filter=lfs diff=lfs merge=lfs -text
78
+ *.txt filter=lfs diff=lfs merge=lfs -text
79
+ *.ppt filter=lfs diff=lfs merge=lfs -text
80
+ *.pptx filter=lfs diff=lfs merge=lfs -text
81
+ *.xls filter=lfs diff=lfs merge=lfs -text
82
+ *.xlsx filter=lfs diff=lfs merge=lfs -text
83
+ *.vsd filter=lfs diff=lfs merge=lfs -text
84
+ *.vsdx filter=lfs diff=lfs merge=lfs -text
85
+
86
+
87
+ dataset_infos.json ignore
88
+ *.csv filter=lfs diff=lfs merge=lfs -text
89
+ *.tsv filter=lfs diff=lfs merge=lfs -text
90
+
91
+ data/cylinder_flow/test.tfrecord filter=lfs diff=lfs merge=lfs -text
92
+
93
+ data/cylinder_flow/train.tfrecord filter=lfs diff=lfs merge=lfs -text
94
+
95
+ data/cylinder_flow/valid.tfrecord filter=lfs diff=lfs merge=lfs -text
96
+
97
+ files_sha256.jsonl filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ #User-Defined Tags
4
+ tags:
5
+ - CylinderFlow
6
+ - computational fluid dynamics
7
+ - incompressible flow
8
+ language:
9
+ - en
10
+ - zh
11
+ ---
12
+ <p align="center">
13
+ <strong>
14
+ <span style="font-size: 30px;">Cylinder Flow</span>
15
+ </strong>
16
+ </p>
17
+
18
+ ## Dataset Description
19
+
20
+ The Cylinder Flow dataset is sourced from DeepMind's MeshGraphNets benchmark and describes flow around a cylinder (vortex shedding) on a two-dimensional unstructured triangular mesh. The data was generated using COMSOL simulations. Each trajectory contains 600 time steps with a time-step size of `dt=0.01` and records the fluid velocity and pressure fields.
21
+
22
+ Paper: [Learning Mesh-Based Simulation with Graph Networks](https://arxiv.org/abs/2010.03409)
23
+
24
+ ## Supported Tasks
25
+
26
+ | Scenario | Description |
27
+ |---|---|
28
+ | Flow field time-series prediction | Predict subsequent velocity and pressure fields from historical mesh states. |
29
+ | Vortex shedding simulation | Learn the evolution of transient flow around a cylinder. |
30
+ | Graph neural network simulation | Provide training and evaluation data for mesh-based models such as MeshGraphNet. |
31
+ | Mesh-based physics modeling | Learn physical relationships between nodes and edges on an unstructured triangular mesh. |
32
+
33
+ ## Dataset Format and Structure
34
+
35
+ The data uses the TFRecord format and is divided into training, validation, and test sets:
36
+
37
+ ```text
38
+ data/cylinder_flow/
39
+ train.tfrecord
40
+ valid.tfrecord
41
+ test.tfrecord
42
+ meta.json
43
+ stats/
44
+ ```
45
+
46
+ Each record corresponds to an unstructured mesh trajectory. The main fields are as follows:
47
+
48
+ | Field | shape | dtype | Description |
49
+ |---|---|---|---|
50
+ | `cells` | `[1, -1, 3]` | `int32` | Node indices of triangular cells. |
51
+ | `mesh_pos` | `[1, -1, 2]` | `float32` | Two-dimensional coordinates of mesh nodes. |
52
+ | `node_type` | `[1, -1, 1]` | `int32` | Node types, such as interior, boundary, inlet, and outlet. |
53
+ | `velocity` | `[600, -1, 2]` | `float32` | Two-dimensional velocity fields over 600 time steps. |
54
+ | `pressure` | `[600, -1, 1]` | `float32` | Pressure fields over 600 time steps. |
55
+
56
+ `stats/` stores normalization statistics for edge features, node velocities, velocity differences, and pressure.
57
+
58
+ ## How to Use the Dataset
59
+
60
+ This dataset is compatible with the `OneScience-Sugon/MeshGraphNet` model. Download the dataset and model:
61
+
62
+ ```bash
63
+ hf download --dataset OneScience-Sugon/cylinder_flow --local-dir ./cylinder_flow
64
+ hf download --model OneScience-Sugon/MeshGraphNet --local-dir ./MeshGraphNet
65
+ ```
66
+
67
+ The validation script included with the dataset can be used to check the directory structure, metadata, and the first TFRecord sample:
68
+
69
+ ```bash
70
+ cd cylinder_flow
71
+ python scripts/validate_cylinder_flow_dataset.py
72
+ ```
73
+
74
+ Append the `--verify-sha256` option to perform full SHA256 verification.
75
+
76
+ ## Official OneScience Information
77
+
78
+ | Platform | OneScience Main Repository | Skills Repository |
79
+ |---|---|---|
80
+ | Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
81
+ | GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
82
+
83
+ ## Citation and License
84
+
85
+ - Original Cylinder Flow paper: [Learning Mesh-Based Simulation with Graph Networks](https://arxiv.org/abs/2010.03409)
86
+ - This repository retains information about the data source and organizes the data for automated runs on OneScience ModelScope. Before public distribution or redistribution, confirm the licensing requirements of the upstream project.
README_zh.md ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ #用户自定义标签
4
+ tags:
5
+ - CylinderFlow
6
+ - computational fluid dynamics
7
+ - incompressible flow
8
+ language:
9
+ - en
10
+ - zh
11
+ ---
12
+ <p align="center">
13
+ <strong>
14
+ <span style="font-size: 30px;">Cylinder Flow</span>
15
+ </strong>
16
+ </p>
17
+
18
+ ## 数据集描述
19
+
20
+ Cylinder Flow 数据集来源于 DeepMind 的 MeshGraphNets 基准,用于描述二维非结构化三角网格上的圆柱绕流(vortex shedding)。数据由 COMSOL 仿真生成,每条轨迹包含 600 个时间步,时间步长为 `dt=0.01`,记录流体速度场和压力场。
21
+
22
+ 论文:[Learning Mesh-Based Simulation with Graph Networks](https://arxiv.org/abs/2010.03409)
23
+
24
+ ## 数据集支持的任务
25
+
26
+ | 场景 | 说明 |
27
+ |---|---|
28
+ | 流场时序预测 | 根据历史网格状态预测后续速度和压力场。 |
29
+ | 涡脱落模拟 | 学习圆柱绕流中的瞬态流动演化。 |
30
+ | 图神经网络仿真 | 为 MeshGraphNet 等网格模型提供训练和评测数据。 |
31
+ | 网格物理建模 | 在非结构化三角网格上学习节点和边的物理关系。 |
32
+
33
+ ## 数据集的格式和结构
34
+
35
+ 数据采用 TFRecord 格式,按训练、验证和测试划分:
36
+
37
+ ```text
38
+ data/cylinder_flow/
39
+ train.tfrecord
40
+ valid.tfrecord
41
+ test.tfrecord
42
+ meta.json
43
+ stats/
44
+ ```
45
+
46
+ 每条记录对应一条非结构化网格轨迹,主要字段如下:
47
+
48
+ | 字段 | shape | dtype | 说明 |
49
+ |---|---|---|---|
50
+ | `cells` | `[1, -1, 3]` | `int32` | 三角形单元的节点索引。 |
51
+ | `mesh_pos` | `[1, -1, 2]` | `float32` | 网格节点的二维坐标。 |
52
+ | `node_type` | `[1, -1, 1]` | `int32` | 节点类型,如内部、边界、入口和出口。 |
53
+ | `velocity` | `[600, -1, 2]` | `float32` | 600 个时间步的二维速度场。 |
54
+ | `pressure` | `[600, -1, 1]` | `float32` | 600 个时间步的压力场。 |
55
+
56
+ `stats/` 中保存边特征、节点速度、速度差分和压力的归一化统计量。
57
+
58
+ ## 数据集使用方式
59
+
60
+ 本数据集适配 `OneScience-Sugon/MeshGraphNet` 模型。下载数据集和模型:
61
+
62
+ ```bash
63
+ hf download --dataset OneScience-Sugon/cylinder_flow --local-dir ./cylinder_flow
64
+ hf download --model OneScience-Sugon/MeshGraphNet --local-dir ./MeshGraphNet
65
+ ```
66
+
67
+ 可使用数据集内的校验脚本检查目录结构、元信息和 TFRecord 首条样本:
68
+
69
+ ```bash
70
+ cd cylinder_flow
71
+ python scripts/validate_cylinder_flow_dataset.py
72
+ ```
73
+
74
+ 完整 SHA256 校验可附加 `--verify-sha256` 参数。
75
+
76
+ ## OneScience 官方信息
77
+
78
+ | 平台 | OneScience 主仓库 | Skills 仓库 |
79
+ |---|---|---|
80
+ | Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
81
+ | GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
82
+
83
+ ## 引用与许可证
84
+
85
+ - Cylinder Flow 原始论文:[Learning Mesh-Based Simulation with Graph Networks](https://arxiv.org/abs/2010.03409)
86
+ - 本仓库保留数据来源说明,并面向 OneScience ModelScope 自动运行场景进行整理;公开分发或二次发布前,请根据上游项目确认许可证要求。
data/cylinder_flow/meta.json ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "simulator": "comsol",
3
+ "dt": 0.01,
4
+ "collision_radius": null,
5
+ "features": {
6
+ "cells": {
7
+ "type": "static",
8
+ "shape": [
9
+ 1,
10
+ -1,
11
+ 3
12
+ ],
13
+ "dtype": "int32"
14
+ },
15
+ "mesh_pos": {
16
+ "type": "static",
17
+ "shape": [
18
+ 1,
19
+ -1,
20
+ 2
21
+ ],
22
+ "dtype": "float32"
23
+ },
24
+ "node_type": {
25
+ "type": "static",
26
+ "shape": [
27
+ 1,
28
+ -1,
29
+ 1
30
+ ],
31
+ "dtype": "int32"
32
+ },
33
+ "velocity": {
34
+ "type": "dynamic",
35
+ "shape": [
36
+ 600,
37
+ -1,
38
+ 2
39
+ ],
40
+ "dtype": "float32"
41
+ },
42
+ "pressure": {
43
+ "type": "dynamic",
44
+ "shape": [
45
+ 600,
46
+ -1,
47
+ 1
48
+ ],
49
+ "dtype": "float32"
50
+ }
51
+ },
52
+ "field_names": [
53
+ "cells",
54
+ "mesh_pos",
55
+ "node_type",
56
+ "velocity",
57
+ "pressure"
58
+ ],
59
+ "trajectory_length": 600
60
+ }
data/cylinder_flow/stats/edge_stats.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "edge_mean": [
3
+ -1.8337848600724627e-12,
4
+ 1.9015786666652656e-13,
5
+ 0.019958416000008583
6
+ ],
7
+ "edge_std": [
8
+ 0.01587940752506256,
9
+ 0.014747538603842258,
10
+ 0.008444361388683319
11
+ ]
12
+ }
data/cylinder_flow/stats/node_stats.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "velocity_mean": [
3
+ 0.5875466465950012,
4
+ 0.0005995402461849153
5
+ ],
6
+ "velocity_diff_mean": [
7
+ -0.0006314588827081025,
8
+ 2.141517825293704e-06
9
+ ],
10
+ "pressure_mean": [
11
+ 0.02848142944276333
12
+ ],
13
+ "velocity_std": [
14
+ 0.5751428008079529,
15
+ 0.14606069028377533
16
+ ],
17
+ "pressure_std": [
18
+ 0.3340202569961548
19
+ ],
20
+ "velocity_diff_std": [
21
+ 0.021763920783996582,
22
+ 0.020587600767612457
23
+ ]
24
+ }
data/cylinder_flow/test.tfrecord ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8522932a23da6ccdee996c56158e4b908f7091f0ade11e8acea700be321af8c3
3
+ size 1355376404
data/cylinder_flow/train.tfrecord ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea63bf985ef131d542b763dded130f242040b9389a59b76f5e2d61a3f40c6ada
3
+ size 13645805387
data/cylinder_flow/valid.tfrecord ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79171fa282fcd4fd5ff93d13e04ade43e83c1b11a0b96eee0951e4e0ed37f3ca
3
+ size 1363987289
data_integrity_summary.json ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "source_root": "cfd_dataset/vortex_shedding_mgn/cylinder_flow",
3
+ "standardized_root": "modelscope_standardized/dataset/cfd_cylinder_flow",
4
+ "file_count": 6,
5
+ "all_files_match": true,
6
+ "files": [
7
+ {
8
+ "name": "meta.json",
9
+ "source": {
10
+ "path": "cfd_dataset/vortex_shedding_mgn/cylinder_flow/meta.json",
11
+ "name": "meta.json",
12
+ "size": 883,
13
+ "sha256": "2a3e39429a55a0cf47355717cc07f4b292629daeb48a89abd518ea0402033e96"
14
+ },
15
+ "standardized": {
16
+ "path": "data/cylinder_flow/meta.json",
17
+ "name": "meta.json",
18
+ "size": 883,
19
+ "sha256": "2a3e39429a55a0cf47355717cc07f4b292629daeb48a89abd518ea0402033e96"
20
+ },
21
+ "matches": true
22
+ },
23
+ {
24
+ "name": "train.tfrecord",
25
+ "source": {
26
+ "path": "cfd_dataset/vortex_shedding_mgn/cylinder_flow/train.tfrecord",
27
+ "name": "train.tfrecord",
28
+ "size": 13645805387,
29
+ "sha256": "ea63bf985ef131d542b763dded130f242040b9389a59b76f5e2d61a3f40c6ada"
30
+ },
31
+ "standardized": {
32
+ "path": "data/cylinder_flow/train.tfrecord",
33
+ "name": "train.tfrecord",
34
+ "size": 13645805387,
35
+ "sha256": "ea63bf985ef131d542b763dded130f242040b9389a59b76f5e2d61a3f40c6ada"
36
+ },
37
+ "matches": true
38
+ },
39
+ {
40
+ "name": "valid.tfrecord",
41
+ "source": {
42
+ "path": "cfd_dataset/vortex_shedding_mgn/cylinder_flow/valid.tfrecord",
43
+ "name": "valid.tfrecord",
44
+ "size": 1363987289,
45
+ "sha256": "79171fa282fcd4fd5ff93d13e04ade43e83c1b11a0b96eee0951e4e0ed37f3ca"
46
+ },
47
+ "standardized": {
48
+ "path": "data/cylinder_flow/valid.tfrecord",
49
+ "name": "valid.tfrecord",
50
+ "size": 1363987289,
51
+ "sha256": "79171fa282fcd4fd5ff93d13e04ade43e83c1b11a0b96eee0951e4e0ed37f3ca"
52
+ },
53
+ "matches": true
54
+ },
55
+ {
56
+ "name": "test.tfrecord",
57
+ "source": {
58
+ "path": "cfd_dataset/vortex_shedding_mgn/cylinder_flow/test.tfrecord",
59
+ "name": "test.tfrecord",
60
+ "size": 1355376404,
61
+ "sha256": "8522932a23da6ccdee996c56158e4b908f7091f0ade11e8acea700be321af8c3"
62
+ },
63
+ "standardized": {
64
+ "path": "data/cylinder_flow/test.tfrecord",
65
+ "name": "test.tfrecord",
66
+ "size": 1355376404,
67
+ "sha256": "8522932a23da6ccdee996c56158e4b908f7091f0ade11e8acea700be321af8c3"
68
+ },
69
+ "matches": true
70
+ },
71
+ {
72
+ "name": "stats/edge_stats.json",
73
+ "source": {
74
+ "path": "cfd_dataset/vortex_shedding_mgn/cylinder_flow/stats/edge_stats.json",
75
+ "name": "stats/edge_stats.json",
76
+ "size": 235,
77
+ "sha256": "ab0860bf8bece19460278095592c6bb90fa06e7ae77274530be48b3b9d3d799a"
78
+ },
79
+ "standardized": {
80
+ "path": "data/cylinder_flow/stats/edge_stats.json",
81
+ "name": "stats/edge_stats.json",
82
+ "size": 235,
83
+ "sha256": "ab0860bf8bece19460278095592c6bb90fa06e7ae77274530be48b3b9d3d799a"
84
+ },
85
+ "matches": true
86
+ },
87
+ {
88
+ "name": "stats/node_stats.json",
89
+ "source": {
90
+ "path": "cfd_dataset/vortex_shedding_mgn/cylinder_flow/stats/node_stats.json",
91
+ "name": "stats/node_stats.json",
92
+ "size": 479,
93
+ "sha256": "1b595ea651193e3e22191dbb5afdfabd8bc96dc8dcfea4d73d92c99512eaae86"
94
+ },
95
+ "standardized": {
96
+ "path": "data/cylinder_flow/stats/node_stats.json",
97
+ "name": "stats/node_stats.json",
98
+ "size": 479,
99
+ "sha256": "1b595ea651193e3e22191dbb5afdfabd8bc96dc8dcfea4d73d92c99512eaae86"
100
+ },
101
+ "matches": true
102
+ }
103
+ ]
104
+ }
files_sha256.jsonl ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {"path": "data/cylinder_flow/meta.json", "sha256": "2a3e39429a55a0cf47355717cc07f4b292629daeb48a89abd518ea0402033e96", "size": 883, "source_path": "cfd_dataset/vortex_shedding_mgn/cylinder_flow/meta.json"}
2
+ {"path": "data/cylinder_flow/train.tfrecord", "sha256": "ea63bf985ef131d542b763dded130f242040b9389a59b76f5e2d61a3f40c6ada", "size": 13645805387, "source_path": "cfd_dataset/vortex_shedding_mgn/cylinder_flow/train.tfrecord"}
3
+ {"path": "data/cylinder_flow/valid.tfrecord", "sha256": "79171fa282fcd4fd5ff93d13e04ade43e83c1b11a0b96eee0951e4e0ed37f3ca", "size": 1363987289, "source_path": "cfd_dataset/vortex_shedding_mgn/cylinder_flow/valid.tfrecord"}
4
+ {"path": "data/cylinder_flow/test.tfrecord", "sha256": "8522932a23da6ccdee996c56158e4b908f7091f0ade11e8acea700be321af8c3", "size": 1355376404, "source_path": "cfd_dataset/vortex_shedding_mgn/cylinder_flow/test.tfrecord"}
5
+ {"path": "data/cylinder_flow/stats/edge_stats.json", "sha256": "ab0860bf8bece19460278095592c6bb90fa06e7ae77274530be48b3b9d3d799a", "size": 235, "source_path": "cfd_dataset/vortex_shedding_mgn/cylinder_flow/stats/edge_stats.json"}
6
+ {"path": "data/cylinder_flow/stats/node_stats.json", "sha256": "1b595ea651193e3e22191dbb5afdfabd8bc96dc8dcfea4d73d92c99512eaae86", "size": 479, "source_path": "cfd_dataset/vortex_shedding_mgn/cylinder_flow/stats/node_stats.json"}
metadata/cylinder_flow_schema.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": "DeepMind CylinderFlow / Vortex Shedding",
3
+ "modelscope_dataset_id": "OneScience/cylinder_flow",
4
+ "format": "tfrecord",
5
+ "data_root": "data/cylinder_flow",
6
+ "splits": {
7
+ "train": "data/cylinder_flow/train.tfrecord",
8
+ "valid": "data/cylinder_flow/valid.tfrecord",
9
+ "test": "data/cylinder_flow/test.tfrecord"
10
+ },
11
+ "metadata": "data/cylinder_flow/meta.json",
12
+ "stats": {
13
+ "edge": "data/cylinder_flow/stats/edge_stats.json",
14
+ "node": "data/cylinder_flow/stats/node_stats.json"
15
+ },
16
+ "trajectory_length": 600,
17
+ "dt": 0.01,
18
+ "simulator": "comsol",
19
+ "features": {
20
+ "cells": {"type": "static", "shape": [1, -1, 3], "dtype": "int32"},
21
+ "mesh_pos": {"type": "static", "shape": [1, -1, 2], "dtype": "float32"},
22
+ "node_type": {"type": "static", "shape": [1, -1, 1], "dtype": "int32"},
23
+ "velocity": {"type": "dynamic", "shape": [600, -1, 2], "dtype": "float32"},
24
+ "pressure": {"type": "dynamic", "shape": [600, -1, 1], "dtype": "float32"}
25
+ },
26
+ "normalization_stats": {
27
+ "edge_stats": ["edge_mean", "edge_std"],
28
+ "node_stats": [
29
+ "velocity_mean",
30
+ "velocity_std",
31
+ "velocity_diff_mean",
32
+ "velocity_diff_std",
33
+ "pressure_mean",
34
+ "pressure_std"
35
+ ]
36
+ },
37
+ "default_model_config_usage": {
38
+ "train_samples": 400,
39
+ "train_steps": 300,
40
+ "val_samples": 10,
41
+ "val_steps": 300,
42
+ "test_samples": 10,
43
+ "test_steps": 300
44
+ }
45
+ }
onescience_relations.yaml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ relations:
2
+ required_datasets: []
3
+ optional_datasets: []
4
+ compatible_models:
5
+ - id: OneScience/Vortex_shedding_mgn
6
+ resource_ref:
7
+ platform: modelscope
8
+ repo_id: OneScience/Vortex_shedding_mgn
9
+ repo_type: model
10
+ url: https://modelscope.cn/models/OneScience/Vortex_shedding_mgn
11
+ revision: main
12
+ readme_path: README.md
13
+ manifest_path: onescience_run_manifest.yaml
14
+ expected_local_path: data/cylinder_flow
15
+ expected_env: ONESCIENCE_CYLINDER_FLOW_DATA_DIR
onescience_run_manifest.yaml ADDED
@@ -0,0 +1,434 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ onescience_manifest_version: "0.1"
2
+ resource_type: dataset
3
+
4
+ resource:
5
+ id: OneScience/cylinder_flow
6
+ name: cylinder_flow
7
+ domain: cfd
8
+ domain_tags:
9
+ - cfd
10
+ - vortex_shedding
11
+ - cylinder_flow
12
+ - unstructured_mesh
13
+ task: transient_cylinder_flow_dataset
14
+ task_tags:
15
+ - train_data
16
+ - eval_data
17
+ - inference_input
18
+ - dataset_validation
19
+ modalities:
20
+ - unstructured_mesh
21
+ - graph
22
+ - transient_flow_field
23
+ input_formats:
24
+ - tfrecord
25
+ - json
26
+ output_formats:
27
+ - tfrecord
28
+ - json
29
+ summary: DeepMind CylinderFlow 圆柱绕流数据集,包含 train/valid/test TFRecord、meta.json 和 MeshGraphNet 归一化统计量。
30
+
31
+ platform_resource:
32
+ primary:
33
+ platform: modelscope
34
+ repo_id: OneScience/cylinder_flow
35
+ repo_type: dataset
36
+ url: https://modelscope.cn/datasets/OneScience/cylinder_flow
37
+ revision: main
38
+ readme_path: README.md
39
+ manifest_path: onescience_run_manifest.yaml
40
+ mirrors: []
41
+ access:
42
+ visibility: public
43
+ license: unknown
44
+
45
+ website_integration:
46
+ enabled: true
47
+ click_target:
48
+ platform: modelscope
49
+ resource_url: https://modelscope.cn/datasets/OneScience/cylinder_flow
50
+ llm_handoff:
51
+ readme_required: true
52
+ manifest_required: true
53
+ download_readme_first: true
54
+ resolve_related_models: true
55
+ default_run_goal: dataset_validation
56
+ cwd_note: 如果使用 modelscope download --cache_dir 下载数据集,请先 cd 到实际下载后的数据集仓库根目录;模型侧默认读取 data/cylinder_flow。
57
+
58
+ runtime:
59
+ enabled: true
60
+ onescience_domain: cfd
61
+ min_onescience_version: null
62
+ supported_execution:
63
+ - local_dataset_validation
64
+ - model_training_input
65
+ - model_inference_input
66
+ environment:
67
+ exported_env:
68
+ ONESCIENCE_CYLINDER_FLOW_DATA_DIR: <dataset_repo_root>/data/cylinder_flow
69
+ dependencies:
70
+ python: ">=3.10"
71
+ python_packages:
72
+ - tensorflow
73
+ - numpy
74
+ - pyyaml
75
+
76
+ onescience:
77
+ repo: https://gitee.com/onescience-ai/onescience
78
+ official_links:
79
+ gitee:
80
+ doc: https://gitee.com/onescience-ai/onescience-doc
81
+ onescience: https://gitee.com/onescience-ai/onescience
82
+ skills: https://gitee.com/onescience-ai/oneskills
83
+ github:
84
+ doc: https://github.com/onescience-ai/OneScience-doc
85
+ onescience: https://github.com/onescience-ai/OneScience
86
+ skills: https://github.com/onescience-ai/oneskills
87
+ install:
88
+ required_by_default: false
89
+ command: bash install.sh cfd
90
+ source_paths:
91
+ - onescience/src/onescience/datapipes/cfd/deepmind_cylinderflow.py
92
+ compatibility:
93
+ examples_path: onescience/examples/cfd/Vortex_shedding_mgn
94
+ status: examples_compatible
95
+ datapipe: onescience.datapipes.cfd.DeepMind_CylinderFlowDatapipe
96
+
97
+ runtime_package:
98
+ kind: standard_runtime_package
99
+ package_root: .
100
+ standard_layout:
101
+ workdir: .
102
+ data_dir: data/cylinder_flow
103
+ metadata_dir: metadata
104
+ output_dir: validation_outputs
105
+ apply_policy:
106
+ mode: direct_use
107
+ target: session_workdir
108
+ overwrite: false
109
+ protect_installed_onescience: true
110
+ entry_files:
111
+ - data/cylinder_flow/meta.json
112
+ - data/cylinder_flow/train.tfrecord
113
+ - data/cylinder_flow/valid.tfrecord
114
+ - data/cylinder_flow/test.tfrecord
115
+ - data/cylinder_flow/stats/edge_stats.json
116
+ - data/cylinder_flow/stats/node_stats.json
117
+ - metadata/cylinder_flow_schema.json
118
+ - scripts/validate_cylinder_flow_dataset.py
119
+ - files_sha256.jsonl
120
+ entrypoints:
121
+ preflight: scripts/validate_cylinder_flow_dataset.py
122
+ validate: scripts/validate_cylinder_flow_dataset.py
123
+ inference: null
124
+ train: null
125
+ finetune: null
126
+ evaluate: null
127
+ visualize: null
128
+ deploy: null
129
+
130
+ files:
131
+ model_files: []
132
+ dataset_files:
133
+ - path: data/cylinder_flow/train.tfrecord
134
+ role: train_split
135
+ description_zh: CylinderFlow 训练轨迹 TFRecord,供 MeshGraphNet 训练使用。
136
+ required: true
137
+ required_for: [dataset_validation, train]
138
+ source:
139
+ platform: modelscope
140
+ repo_id: OneScience/cylinder_flow
141
+ repo_type: dataset
142
+ download_method: command_ref
143
+ command_ref: commands.download.download_dataset
144
+ local_path: data/cylinder_flow/train.tfrecord
145
+ - path: data/cylinder_flow/valid.tfrecord
146
+ role: validation_split
147
+ description_zh: CylinderFlow 验证轨迹 TFRecord,供训练过程验证使用。
148
+ required: true
149
+ required_for: [dataset_validation, train, evaluate]
150
+ source:
151
+ platform: modelscope
152
+ repo_id: OneScience/cylinder_flow
153
+ repo_type: dataset
154
+ download_method: command_ref
155
+ command_ref: commands.download.download_dataset
156
+ local_path: data/cylinder_flow/valid.tfrecord
157
+ - path: data/cylinder_flow/test.tfrecord
158
+ role: test_split
159
+ description_zh: CylinderFlow 测试轨迹 TFRecord,供推理、评测和可视化使用。
160
+ required: true
161
+ required_for: [dataset_validation, inference, evaluate, visualize]
162
+ source:
163
+ platform: modelscope
164
+ repo_id: OneScience/cylinder_flow
165
+ repo_type: dataset
166
+ download_method: command_ref
167
+ command_ref: commands.download.download_dataset
168
+ local_path: data/cylinder_flow/test.tfrecord
169
+ - path: data/cylinder_flow/meta.json
170
+ role: tfrecord_schema_metadata
171
+ description_zh: TFRecord 字段、shape、dtype、轨迹长度和仿真步长元数据。
172
+ required: true
173
+ required_for: [dataset_validation, train, inference, evaluate]
174
+ source:
175
+ platform: modelscope
176
+ repo_id: OneScience/cylinder_flow
177
+ repo_type: dataset
178
+ download_method: command_ref
179
+ command_ref: commands.download.download_dataset
180
+ local_path: data/cylinder_flow/meta.json
181
+ - path: data/cylinder_flow/stats/edge_stats.json
182
+ role: edge_normalization_stats
183
+ description_zh: MeshGraphNet 边特征归一化均值和标准差。
184
+ required: true
185
+ required_for: [dataset_validation, train, inference, evaluate]
186
+ source:
187
+ platform: modelscope
188
+ repo_id: OneScience/cylinder_flow
189
+ repo_type: dataset
190
+ download_method: command_ref
191
+ command_ref: commands.download.download_dataset
192
+ local_path: data/cylinder_flow/stats/edge_stats.json
193
+ - path: data/cylinder_flow/stats/node_stats.json
194
+ role: node_normalization_stats
195
+ description_zh: MeshGraphNet 节点速度、速度差和压力归一化均值与标准差。
196
+ required: true
197
+ required_for: [dataset_validation, train, inference, evaluate]
198
+ source:
199
+ platform: modelscope
200
+ repo_id: OneScience/cylinder_flow
201
+ repo_type: dataset
202
+ download_method: command_ref
203
+ command_ref: commands.download.download_dataset
204
+ local_path: data/cylinder_flow/stats/node_stats.json
205
+ - path: files_sha256.jsonl
206
+ role: file_size_sha256_inventory
207
+ description_zh: 整理后数据文件的大小和 SHA256 清单,用于完整性校验。
208
+ required: true
209
+ required_for: [dataset_validation]
210
+ source:
211
+ platform: modelscope
212
+ repo_id: OneScience/cylinder_flow
213
+ repo_type: dataset
214
+ download_method: command_ref
215
+ command_ref: commands.download.download_dataset
216
+ local_path: files_sha256.jsonl
217
+ - path: data_integrity_summary.json
218
+ role: source_to_standardized_integrity_summary
219
+ description_zh: 原始数据与整理后数据的文件名、大小、SHA256 对照摘要。
220
+ required: true
221
+ required_for: [dataset_validation]
222
+ source:
223
+ platform: modelscope
224
+ repo_id: OneScience/cylinder_flow
225
+ repo_type: dataset
226
+ download_method: command_ref
227
+ command_ref: commands.download.download_dataset
228
+ local_path: data_integrity_summary.json
229
+ config_files:
230
+ - path: metadata/cylinder_flow_schema.json
231
+ role: dataset_schema
232
+ description_zh: 描述 CylinderFlow TFRecord 字段、shape、dtype、split、metadata 和 stats。
233
+ required: true
234
+ required_for: [dataset_validation, train, inference]
235
+ source:
236
+ platform: modelscope
237
+ repo_id: OneScience/cylinder_flow
238
+ repo_type: dataset
239
+ download_method: command_ref
240
+ command_ref: commands.download.download_dataset
241
+ local_path: metadata/cylinder_flow_schema.json
242
+ sample_files:
243
+ - path: scripts/validate_cylinder_flow_dataset.py
244
+ role: dataset_validation_entry
245
+ description_zh: 数据集读取验证脚本,检查文件结构、shape、dtype、stats、可读性和 SHA256。
246
+ required: true
247
+ required_for: [dataset_validation]
248
+ source:
249
+ platform: modelscope
250
+ repo_id: OneScience/cylinder_flow
251
+ repo_type: dataset
252
+ download_method: command_ref
253
+ command_ref: commands.download.download_dataset
254
+ local_path: scripts/validate_cylinder_flow_dataset.py
255
+
256
+ relations:
257
+ required_datasets: []
258
+ optional_datasets: []
259
+ compatible_models:
260
+ - id: OneScience/Vortex_shedding_mgn
261
+ role: train_eval_inference_model
262
+ required_for: [train, inference, evaluate, visualize]
263
+ resource_ref:
264
+ platform: modelscope
265
+ repo_id: OneScience/Vortex_shedding_mgn
266
+ repo_type: model
267
+ url: https://modelscope.cn/models/OneScience/Vortex_shedding_mgn
268
+ revision: main
269
+ readme_path: README.md
270
+ manifest_path: onescience_run_manifest.yaml
271
+ expected_local_path: data/cylinder_flow
272
+ expected_env: ONESCIENCE_CYLINDER_FLOW_DATA_DIR
273
+
274
+ run_matrix:
275
+ scenarios:
276
+ - name: validate_structure
277
+ capability: dataset_validation
278
+ default: true
279
+ required_datasets:
280
+ - id: OneScience/cylinder_flow
281
+ role: train_eval_inference_data
282
+ local_path: data/cylinder_flow
283
+ required_model_files: []
284
+ required_dataset_files:
285
+ - data/cylinder_flow/meta.json
286
+ - data/cylinder_flow/train.tfrecord
287
+ - data/cylinder_flow/valid.tfrecord
288
+ - data/cylinder_flow/test.tfrecord
289
+ - metadata/cylinder_flow_schema.json
290
+ preconditions:
291
+ - 当前工作目录为数据集仓库根目录。
292
+ command_refs:
293
+ - commands.preflight.validate_dataset
294
+ outputs:
295
+ - 控制台输出 [OK] CylinderFlow dataset validation passed
296
+ - name: validate_integrity_full_hash
297
+ capability: dataset_validation
298
+ default: false
299
+ required_datasets:
300
+ - id: OneScience/cylinder_flow
301
+ role: train_eval_inference_data
302
+ local_path: data/cylinder_flow
303
+ required_model_files: []
304
+ required_dataset_files:
305
+ - files_sha256.jsonl
306
+ - data/cylinder_flow/train.tfrecord
307
+ - data/cylinder_flow/valid.tfrecord
308
+ - data/cylinder_flow/test.tfrecord
309
+ preconditions:
310
+ - 当前工作目录为数据集仓库根目录。
311
+ command_refs:
312
+ - commands.preflight.validate_dataset_full_hash
313
+ outputs:
314
+ - 控制台输出 [OK] CylinderFlow dataset validation passed
315
+ - name: provide_to_vortex_shedding_mgn_model
316
+ capability: train
317
+ default: true
318
+ required_datasets:
319
+ - id: OneScience/cylinder_flow
320
+ role: train_data
321
+ local_path: data/cylinder_flow
322
+ required_model_files:
323
+ - OneScience/Vortex_shedding_mgn:conf/mgn_cylinderflow.yaml
324
+ required_dataset_files:
325
+ - data/cylinder_flow/train.tfrecord
326
+ - data/cylinder_flow/valid.tfrecord
327
+ - data/cylinder_flow/test.tfrecord
328
+ preconditions:
329
+ - 模型仓库 OneScience/Vortex_shedding_mgn 已下载。
330
+ - 将本仓库 data/cylinder_flow 放到模型包根目录 data/cylinder_flow,或设置 ONESCIENCE_CYLINDER_FLOW_DATA_DIR 指向本目录用于预检。
331
+ command_refs:
332
+ - commands.prepare.export_dataset_env
333
+ outputs:
334
+ - 模型侧 scripts/preflight_vortex_shedding_mgn.py 可以读取数据集。
335
+
336
+ capabilities:
337
+ dataset_validation: true
338
+ train_input: true
339
+ inference_input: true
340
+ evaluation_input: true
341
+ visualization_input: true
342
+ preflight: true
343
+ inference: false
344
+ train: false
345
+ finetune: false
346
+ evaluate: false
347
+ visualize: false
348
+ deploy: false
349
+
350
+ commands:
351
+ download:
352
+ - name: download_dataset
353
+ command: modelscope download --dataset OneScience/cylinder_flow
354
+ cwd: session_workdir
355
+ - name: download_model
356
+ command: modelscope download --model OneScience/Vortex_shedding_mgn
357
+ cwd: session_workdir
358
+ prepare:
359
+ - name: export_dataset_env
360
+ command: export ONESCIENCE_CYLINDER_FLOW_DATA_DIR=/path/to/OneScience_cylinder_flow/data/cylinder_flow
361
+ cwd: .
362
+ preflight:
363
+ - name: validate_dataset
364
+ command: python scripts/validate_cylinder_flow_dataset.py --dataset-root . --skip-tfrecord-read
365
+ cwd: .
366
+ - name: validate_dataset_full_hash
367
+ command: python scripts/validate_cylinder_flow_dataset.py --dataset-root . --verify-sha256 --skip-tfrecord-read
368
+ cwd: .
369
+ - name: validate_dataset_read_first_record
370
+ command: python scripts/validate_cylinder_flow_dataset.py --dataset-root .
371
+ cwd: .
372
+ inference: []
373
+ train: []
374
+ finetune: []
375
+ evaluate: []
376
+ visualize: []
377
+ deploy: []
378
+
379
+ expected_outputs:
380
+ - name: validate_dataset
381
+ paths: []
382
+ success_criteria:
383
+ - 控制台输出 [OK] CylinderFlow dataset validation passed
384
+ - name: validate_dataset_full_hash
385
+ paths:
386
+ - files_sha256.jsonl
387
+ success_criteria:
388
+ - SHA256 与 files_sha256.jsonl 完全一致。
389
+ - name: model_consumption
390
+ paths: []
391
+ success_criteria:
392
+ - 模型包 scripts/preflight_vortex_shedding_mgn.py 通过数据路径和 schema 检查。
393
+
394
+ diagnostics:
395
+ - name: missing_data_root
396
+ symptom: missing required file 或 missing data directory
397
+ action: 确认当前目录为 OneScience/cylinder_flow 数据集仓库根目录,且 data/cylinder_flow 存在。
398
+ - name: missing_tfrecord
399
+ symptom: "missing required file: data/cylinder_flow/*.tfrecord"
400
+ action: 对照 files_sha256.jsonl 重新上传或重新下载缺失 TFRecord。
401
+ - name: schema_mismatch
402
+ symptom: meta.json feature shape mismatch 或 dtype mismatch
403
+ action: 确认没有用其他 CylinderFlow 数据覆盖当前文件。
404
+ - name: checksum_mismatch
405
+ symptom: sha256 mismatch
406
+ action: 删除损坏文件后重新下载 OneScience/cylinder_flow。
407
+ - name: model_cannot_find_data
408
+ symptom: 模型侧报告 data/cylinder_flow 不存在
409
+ action: 将本仓库 data/cylinder_flow 复制到模型包根目录 data/cylinder_flow,或修改模型包配置副本中的 data_dir 与 stats_dir。
410
+
411
+ domain_extension:
412
+ cfd:
413
+ dataset_family: DeepMind CylinderFlow
414
+ physics: transient incompressible cylinder wake / vortex shedding
415
+ simulator: comsol
416
+ file_count: 6
417
+ trajectory_length: 600
418
+ dt: 0.01
419
+ schema:
420
+ cells:
421
+ shape: [1, -1, 3]
422
+ dtype: int32
423
+ mesh_pos:
424
+ shape: [1, -1, 2]
425
+ dtype: float32
426
+ node_type:
427
+ shape: [1, -1, 1]
428
+ dtype: int32
429
+ velocity:
430
+ shape: [600, -1, 2]
431
+ dtype: float32
432
+ pressure:
433
+ shape: [600, -1, 1]
434
+ dtype: float32
scripts/validate_cylinder_flow_dataset.py ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Validate the standardized DeepMind CylinderFlow dataset package."""
3
+
4
+ from __future__ import annotations
5
+
6
+ import argparse
7
+ import hashlib
8
+ import json
9
+ from pathlib import Path
10
+
11
+
12
+ EXPECTED_SPLITS = ["train", "valid", "test"]
13
+ EXPECTED_REQUIRED = {
14
+ "data/cylinder_flow/meta.json",
15
+ "data/cylinder_flow/train.tfrecord",
16
+ "data/cylinder_flow/valid.tfrecord",
17
+ "data/cylinder_flow/test.tfrecord",
18
+ "data/cylinder_flow/stats/edge_stats.json",
19
+ "data/cylinder_flow/stats/node_stats.json",
20
+ }
21
+
22
+
23
+ def fail(message: str) -> None:
24
+ raise SystemExit(f"[FAIL] {message}")
25
+
26
+
27
+ def sha256_file(path: Path) -> str:
28
+ digest = hashlib.sha256()
29
+ with path.open("rb") as f:
30
+ for chunk in iter(lambda: f.read(1024 * 1024), b""):
31
+ digest.update(chunk)
32
+ return digest.hexdigest()
33
+
34
+
35
+ def parse_args() -> argparse.Namespace:
36
+ parser = argparse.ArgumentParser()
37
+ parser.add_argument("--dataset-root", default=".", help="dataset package root")
38
+ parser.add_argument(
39
+ "--verify-sha256",
40
+ action="store_true",
41
+ help="recompute and verify SHA256 values from files_sha256.jsonl",
42
+ )
43
+ parser.add_argument(
44
+ "--skip-tfrecord-read",
45
+ action="store_true",
46
+ help="skip optional TensorFlow first-record readability check",
47
+ )
48
+ return parser.parse_args()
49
+
50
+
51
+ def check_files(dataset_root: Path) -> dict:
52
+ sizes = {}
53
+ for rel_path in sorted(EXPECTED_REQUIRED):
54
+ path = dataset_root / rel_path
55
+ if not path.is_file():
56
+ fail(f"missing required file: {rel_path}")
57
+ if path.stat().st_size <= 0:
58
+ fail(f"empty required file: {rel_path}")
59
+ sizes[rel_path] = path.stat().st_size
60
+ return sizes
61
+
62
+
63
+ def check_metadata(data_dir: Path) -> dict:
64
+ meta = json.loads((data_dir / "meta.json").read_text(encoding="utf-8"))
65
+ if meta.get("simulator") != "comsol":
66
+ fail("meta.json simulator must be comsol")
67
+ if meta.get("trajectory_length") != 600:
68
+ fail("meta.json trajectory_length must be 600")
69
+ expected_fields = ["cells", "mesh_pos", "node_type", "velocity", "pressure"]
70
+ if meta.get("field_names") != expected_fields:
71
+ fail("meta.json field_names mismatch")
72
+ expected_shapes = {
73
+ "cells": [1, -1, 3],
74
+ "mesh_pos": [1, -1, 2],
75
+ "node_type": [1, -1, 1],
76
+ "velocity": [600, -1, 2],
77
+ "pressure": [600, -1, 1],
78
+ }
79
+ expected_dtypes = {
80
+ "cells": "int32",
81
+ "mesh_pos": "float32",
82
+ "node_type": "int32",
83
+ "velocity": "float32",
84
+ "pressure": "float32",
85
+ }
86
+ for key in expected_fields:
87
+ feature = meta.get("features", {}).get(key)
88
+ if not feature:
89
+ fail(f"meta.json missing feature {key}")
90
+ if feature.get("shape") != expected_shapes[key]:
91
+ fail(f"meta.json feature {key} shape mismatch")
92
+ if feature.get("dtype") != expected_dtypes[key]:
93
+ fail(f"meta.json feature {key} dtype mismatch")
94
+ return meta
95
+
96
+
97
+ def check_stats(stats_dir: Path) -> None:
98
+ edge = json.loads((stats_dir / "edge_stats.json").read_text(encoding="utf-8"))
99
+ node = json.loads((stats_dir / "node_stats.json").read_text(encoding="utf-8"))
100
+ for key in ["edge_mean", "edge_std"]:
101
+ if not isinstance(edge.get(key), list) or len(edge[key]) != 3:
102
+ fail(f"edge_stats.json {key} must be length 3")
103
+ for key in ["velocity_mean", "velocity_std", "velocity_diff_mean", "velocity_diff_std"]:
104
+ if not isinstance(node.get(key), list) or len(node[key]) != 2:
105
+ fail(f"node_stats.json {key} must be length 2")
106
+ for key in ["pressure_mean", "pressure_std"]:
107
+ if not isinstance(node.get(key), list) or len(node[key]) != 1:
108
+ fail(f"node_stats.json {key} must be length 1")
109
+
110
+
111
+ def verify_inventory(dataset_root: Path, sizes: dict, verify_sha256: bool) -> None:
112
+ inventory_path = dataset_root / "files_sha256.jsonl"
113
+ if not inventory_path.is_file():
114
+ fail("missing files_sha256.jsonl")
115
+ seen = {}
116
+ for line in inventory_path.read_text(encoding="utf-8").splitlines():
117
+ if not line.strip():
118
+ continue
119
+ item = json.loads(line)
120
+ rel_path = item["path"]
121
+ path = dataset_root / rel_path
122
+ if not path.is_file():
123
+ fail(f"inventory path missing on disk: {rel_path}")
124
+ if path.stat().st_size != item["size"]:
125
+ fail(f"size mismatch for {rel_path}")
126
+ if rel_path in sizes and sizes[rel_path] != item["size"]:
127
+ fail(f"required file size mismatch for {rel_path}")
128
+ if verify_sha256 and sha256_file(path) != item["sha256"]:
129
+ fail(f"sha256 mismatch for {rel_path}")
130
+ seen[rel_path] = item
131
+ missing = sorted(EXPECTED_REQUIRED - set(seen))
132
+ if missing:
133
+ fail(f"inventory missing required files: {missing}")
134
+
135
+
136
+ def check_tfrecord_first_record(data_dir: Path, meta: dict) -> None:
137
+ try:
138
+ import numpy as np
139
+ import tensorflow.compat.v1 as tf
140
+ except Exception as exc: # pragma: no cover - optional runtime dependency
141
+ print(f"[WARN] TensorFlow first-record check skipped: {exc}")
142
+ return
143
+
144
+ feature_dict = {k: tf.io.VarLenFeature(tf.string) for k in meta["field_names"]}
145
+ for split in EXPECTED_SPLITS:
146
+ record_iter = iter(tf.data.TFRecordDataset(str(data_dir / f"{split}.tfrecord")).take(1))
147
+ try:
148
+ raw = next(record_iter)
149
+ except StopIteration:
150
+ fail(f"{split}.tfrecord contains no records")
151
+ features = tf.io.parse_single_example(raw, feature_dict)
152
+ velocity = np.frombuffer(features["velocity"].values[0].numpy(), dtype=np.float32)
153
+ pressure = np.frombuffer(features["pressure"].values[0].numpy(), dtype=np.float32)
154
+ mesh_pos = np.frombuffer(features["mesh_pos"].values[0].numpy(), dtype=np.float32)
155
+ cells = np.frombuffer(features["cells"].values[0].numpy(), dtype=np.int32)
156
+ if velocity.size % (meta["trajectory_length"] * 2) != 0:
157
+ fail(f"{split}.tfrecord velocity shape incompatible with metadata")
158
+ nodes = velocity.size // (meta["trajectory_length"] * 2)
159
+ if pressure.size != meta["trajectory_length"] * nodes:
160
+ fail(f"{split}.tfrecord pressure node count mismatch")
161
+ if mesh_pos.size != nodes * 2:
162
+ fail(f"{split}.tfrecord mesh_pos node count mismatch")
163
+ if cells.size % 3 != 0:
164
+ fail(f"{split}.tfrecord cells are not triangular")
165
+ print(f"[OK] {split}.tfrecord first record: nodes={nodes}, cells={cells.size // 3}")
166
+
167
+
168
+ def main() -> None:
169
+ args = parse_args()
170
+ dataset_root = Path(args.dataset_root).resolve()
171
+ data_dir = dataset_root / "data" / "cylinder_flow"
172
+ sizes = check_files(dataset_root)
173
+ meta = check_metadata(data_dir)
174
+ check_stats(data_dir / "stats")
175
+ verify_inventory(dataset_root, sizes, args.verify_sha256)
176
+ if not args.skip_tfrecord_read:
177
+ check_tfrecord_first_record(data_dir, meta)
178
+ print("[OK] CylinderFlow dataset validation passed")
179
+
180
+
181
+ if __name__ == "__main__":
182
+ main()