File size: 10,270 Bytes
9bbbe29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
onescience_manifest_version: "0.1"
resource_type: dataset
resource:
  id: OneScience/cfd_benchmark
  name: cfd_benchmark
  domain: cfd
  domain_tags:
    - cfd
    - neural_pde_solver
    - benchmark
  task: cfd_operator_learning_dataset
  task_tags:
    - flow_field_prediction
    - pde_operator_learning
    - data_reading_validation
  modalities:
    - gridded_field
    - unstructured_mesh
  input_formats:
    - npy
    - mat
  output_formats: []
  summary: CFD_Benchmark 数据集的 ModelScope 标准数据包,本次包含 airfoil、darcy、elasticity、ns、pipe、plas 六个子集。

platform_resource:
  primary:
    platform: modelscope
    repo_id: OneScience/cfd_benchmark
    repo_type: dataset
    url: https://modelscope.cn/datasets/OneScience/cfd_benchmark
    revision: main
    readme_path: README.md
    manifest_path: manifest.yaml
  mirrors: []
  access:
    visibility: public
    license: null

website_integration:
  enabled: true
  click_target:
    platform: modelscope
    resource_url: https://modelscope.cn/datasets/OneScience/cfd_benchmark
  llm_handoff:
    readme_required: true
    manifest_required: true
    download_readme_first: true
    resolve_related_models: true
    default_run_goal: minimal_validation

runtime:
  enabled: true
  onescience_domain: cfd
  min_onescience_version: null
  supported_execution:
    - local
    - local_slurm
    - remote_slurm

onescience:
  repo: https://gitee.com/onescience-ai/onescience
  official_links:
    gitee:
      doc: https://gitee.com/onescience-ai/onescience-doc
      onescience: https://gitee.com/onescience-ai/onescience
      skills: https://gitee.com/onescience-ai/oneskills
    github:
      doc: https://github.com/onescience-ai/OneScience-doc
      onescience: https://github.com/onescience-ai/OneScience
      skills: https://github.com/onescience-ai/oneskills
  install:
    required_by_default: false
    command: source ~/env.sh && bash install.sh cfd
  source_paths: []
  compatibility:
    examples_path: examples/cfd/CFD_Benchmark
    status: examples_compatible

runtime_package:
  kind: standard_runtime_package
  package_root: .
  standard_layout:
    workdir: .
    config_dir: metadata
    checkpoint_dir: null
    data_dir: data
    output_dir: reports
  apply_policy:
    mode: direct_use
    target: session_workdir
    overwrite: true
    protect_installed_onescience: true
  entry_files:
    - metadata/file_manifest.csv
    - metadata/schema.yaml
    - scripts/validate_dataset.py
  entrypoints:
    preflight: scripts/validate_dataset.py
    inference: null
    train: null
    finetune: null
    evaluate: null
    visualize: null
    deploy: null

files:
  model_files: []
  dataset_files:
    - id: cfd_benchmark_data
      path: data/
      role: train_data
      description_zh: 本次整理的 CFD_Benchmark 六个子集数据目录,包含 airfoil、darcy、elasticity、ns、pipe、plas。
      required: true
      required_for:
        - train
        - evaluate
        - preflight
      format: npy_mat
      source:
        platform: modelscope
        repo_id: OneScience/cfd_benchmark
        repo_type: dataset
        path: data/
        revision: main
        download_method: command_ref
        command_ref: commands.download.download_dataset
      local_path: session_workdir/cfd_cfd_benchmark_data/data/
      size: "约 8.2G"
      checksum: metadata/file_manifest.csv
      large_file: true
    - id: file_manifest
      path: metadata/file_manifest.csv
      role: checksum_manifest
      description_zh: 整理后每个数据文件的相对路径、字节数和 SHA256。
      required: true
      required_for:
        - preflight
      format: csv
      source:
        platform: modelscope
        repo_id: OneScience/cfd_benchmark
        repo_type: dataset
        path: metadata/file_manifest.csv
        revision: main
        download_method: command_ref
        command_ref: commands.download.download_dataset
      local_path: session_workdir/cfd_cfd_benchmark_data/metadata/file_manifest.csv
      size: null
      checksum: null
      large_file: false
  config_files:
    - id: schema
      path: metadata/schema.yaml
      role: schema
      description_zh: 记录 npy shape/dtype  MATLAB 文件变量结构。
      required: true
      required_for:
        - preflight
        - train
        - evaluate
      format: yaml
      source:
        platform: modelscope
        repo_id: OneScience/cfd_benchmark
        repo_type: dataset
        path: metadata/schema.yaml
        revision: main
        download_method: command_ref
        command_ref: commands.download.download_dataset
      local_path: session_workdir/cfd_cfd_benchmark_data/metadata/schema.yaml
      checksum: null
      large_file: false
  sample_files: []

dataset:
  format:
    - npy
    - matlab_v5_mat
  sample_unit: 不同子集的一个样本定义不同,airfoil/pipe 为一个几何流场样本,darcy/ns/plas 为一个 PDE 系数或时间序列样本,elasticity 为一个随机单元结构样本。
  schema:
    path: metadata/schema.yaml
  checksum_manifest:
    path: metadata/file_manifest.csv
  splits:
    train:  CFD_Benchmark 运行脚本通过 ntrain  train_ratio 切分。
    validation: null
    test:  CFD_Benchmark 运行脚本通过 ntest  train_ratio 切分。

relations:
  required_datasets: []
  optional_datasets: []
  compatible_models:
    - id: OneScience/CFD_Benchmark
      role: train_data
      required_for:
        - train
        - evaluate
        - preflight
      resource_ref:
        platform: modelscope
        repo_id: OneScience/CFD_Benchmark
        repo_type: model
        url: https://modelscope.cn/models/OneScience/CFD_Benchmark
        revision: main
        readme_path: README.md
        manifest_path: manifest.yaml
      expected_local_path: ../cfd_cfd_benchmark_data/data
      adapter: scripts/standard_train_airfoil_transolver.sh

run_matrix:
  scenarios:
    - name: minimal_validation
      capability: preflight
      default: true
      required_datasets:
        - id: OneScience/cfd_benchmark
          role: train_data
          local_path: data/
      required_model_files: []
      command_refs:
        - commands.preflight.validate_dataset
      expected_outputs:
        - reports/dataset_validation.json
      prerequisites:
        - 已下载数据集 OneScience/cfd_benchmark。
    - name: cfd_benchmark_model_train
      capability: train
      required_datasets:
        - id: OneScience/cfd_benchmark
          role: train_data
          local_path: data/
      required_model_files:
        - OneScience/CFD_Benchmark runtime/
      command_refs:
        - commands.preflight.validate_dataset
      expected_outputs:
        - reports/dataset_validation.json
      prerequisites:
        - 下载并进入模型仓库 OneScience/CFD_Benchmark。

capabilities:
  inference: false
  train: false
  finetune: false
  evaluate: false
  visualize: false
  deploy: false
  data_reading_validation: true

commands:
  download:
    - name: download_dataset
      description: 下载 CFD_Benchmark 数据集标准包。
      cwd: .
      command: modelscope download --dataset OneScience/cfd_benchmark --local_dir ./cfd_cfd_benchmark_data
      required_files: []
      required_env:
        - MODELSCOPE_TOKEN
      expected_outputs:
        - path: cfd_cfd_benchmark_data/manifest.yaml
          type: file
        - path: cfd_cfd_benchmark_data/data/
          type: directory
      success_criteria:
        - exit_code == 0
  preflight:
    - name: validate_dataset
      description: 校验 14 个数据文件的存在性、大小、SHA256、npy shape/dtype  mat 变量结构。
      cwd: .
      command: source ~/env.sh && python scripts/validate_dataset.py --data-root data --file-manifest metadata/file_manifest.csv
      required_files:
        - scripts/validate_dataset.py
        - metadata/file_manifest.csv
        - data/
      required_env:
        - python
        - numpy
        - scipy
      expected_outputs:
        - path: reports/dataset_validation.json
          type: file
      success_criteria:
        - exit_code == 0
  prepare: []
  inference: []
  train: []
  finetune: []
  evaluate: []
  visualize: []
  deploy: []

expected_outputs:
  - path: reports/dataset_validation.json
    type: json
    description_zh: 数据文件完整性和可读性验证报告。
  - path: metadata/file_manifest.csv
    type: csv
    description_zh: 文件名、大小和 SHA256 校验清单。
  - path: metadata/schema.yaml
    type: yaml
    description_zh: 数据结构说明。

diagnostics:
  - id: missing_file
    symptom: validate_dataset.py 报告 status=missing。
    cause: 数据下载不完整或放置目录错误。
    fix: 重新执行 modelscope download --dataset OneScience/cfd_benchmark --local_dir ./cfd_cfd_benchmark_data。
  - id: sha256_mismatch
    symptom: validate_dataset.py 报告 status=sha256_mismatch。
    cause: 文件损坏、复制中断或上传下载过程中内容变化。
    fix: 删除对应文件后重新下载数据集,或用 metadata/source_file_manifest.csv 与源目录重新比对。
  - id: scipy_missing
    symptom: MATLAB 文件只完成 header_only 检查。
    cause: 当前 Python 环境缺少 scipy。
    fix: source ~/env.sh 后重跑验证;当前标准化过程中已用 scipy 生成 metadata/schema.yaml。

domain_extension:
  cfd:
    benchmark_name: CFD_Benchmark
    included_subsets:
      airfoil:
        files:
          - NACA_Cylinder_X.npy
          - NACA_Cylinder_Y.npy
          - NACA_Cylinder_Q.npy
      darcy:
        files:
          - piececonst_r421_N1024_smooth1.mat
          - piececonst_r421_N1024_smooth2.mat
      elasticity:
        files:
          - Meshes/Random_UnitCell_XY_10.npy
          - Meshes/Random_UnitCell_rr_10.npy
          - Meshes/Random_UnitCell_sigma_10.npy
          - Meshes/Random_UnitCell_theta_10.npy
      ns:
        files:
          - NavierStokes_V1e-5_N1200_T20.mat
      pipe:
        files:
          - Pipe_X.npy
          - Pipe_Y.npy
          - Pipe_Q.npy
      plas:
        files:
          - plas_N987_T20.mat
    skipped_source_subsets:
      - car
      - diffusion_sorption