Skip to content

Add setup_and_train helper and JSON-safe config serialization for flow reconstruction diffusion#1431

Open
jiayi33c wants to merge 1 commit intoNVIDIA:mainfrom
jiayi33c:codex/flow-reconstruction-setup-script
Open

Add setup_and_train helper and JSON-safe config serialization for flow reconstruction diffusion#1431
jiayi33c wants to merge 1 commit intoNVIDIA:mainfrom
jiayi33c:codex/flow-reconstruction-setup-script

Conversation

@jiayi33c
Copy link

Description

This PR improves reproducibility for the flow reconstruction diffusion example.

Changes

  • Add examples/cfd/flow_reconstruction_diffusion/setup_and_train.sh for one-command dependency setup + training.
  • Update examples/cfd/flow_reconstruction_diffusion/README.md with usage and optional env vars.
  • Fix JSON serialization in examples/cfd/flow_reconstruction_diffusion/train.py when logging/saving training options by converting config objects to JSON-safe types.

Notes

  • Default helper script config is unconditional training (config_dfsr_train).
  • Conditional runs are still supported via CONFIG_NAME=config_dfsr_cond_train.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 19, 2026

Greptile Summary

Improves reproducibility for flow reconstruction diffusion example by adding automation and fixing config serialization.

  • Added setup_and_train.sh helper script that automates dependency installation and training with configurable environment variables (CONFIG_NAME, TRAIN_EXTRA_ARGS)
  • Fixed JSON serialization errors when logging/saving training configs by introducing _to_json_serializable() helper that converts OmegaConf and EasyDict objects to JSON-compatible types
  • Updated README with helper script usage instructions and examples for both unconditional and conditional training modes

Important Files Changed

Filename Overview
examples/cfd/flow_reconstruction_diffusion/README.md Added documentation for new setup_and_train.sh helper script with usage examples and environment variable options. Removed trailing whitespace.
examples/cfd/flow_reconstruction_diffusion/setup_and_train.sh New bash script that automates dependency installation and training setup with configurable environment variables for reproducibility.
examples/cfd/flow_reconstruction_diffusion/train.py Added _to_json_serializable helper to convert OmegaConf/EasyDict config objects to JSON-safe types for logging and file saving.

Last reviewed commit: e6f3ace

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant