-
Notifications
You must be signed in to change notification settings - Fork 512
Example diffusion urban flow 2d #1245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…mplete pipeline using EDM model Signed-off-by: Abhijeet Vishwasrao <[email protected]>
Signed-off-by: Abhijeet Vishwasrao <[email protected]>
Signed-off-by: Abhijeet Vishwasrao <[email protected]>
Signed-off-by: Abhijeet Vishwasrao <[email protected]>
Greptile OverviewGreptile SummaryAdds complete pipeline for 2D urban turbulent flow generation using EDM diffusion models, including training, generation, and statistical evaluation capabilities. Critical Issues Found:
Strengths:
Recommendations:
Important Files ChangedFile Analysis
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
22 files reviewed, 4 comments
| for seed, pred_np in zip(batch_seeds, preds_np): | ||
| image_dir = img_outdir | ||
| os.makedirs(image_dir, exist_ok=True) | ||
| image_path = os.path.join(image_dir, f"{seed:06d}.npy") | ||
| np.save(image_path, pred_np) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Outputs saved as .npy files but evaluate-uncond-gen-2D.py:44 expects HDF5 format with key 'pred'. This breaks the evaluation pipeline.
Either consolidate individual .npy files into HDF5 after generation, or update evaluation to load from .npy files.
| Generated samples are saved as HDF5 files: | ||
|
|
||
| ```text | ||
| outputs/diffusion_uflow/generated/pred_snaps-<steps>.h5 | ||
| ``` | ||
|
|
||
| **File Structure:** | ||
|
|
||
| ```python | ||
| { | ||
| 'u_pred': (N, 288, 96), # Generated U-velocity | ||
| 'v_pred': (N, 288, 96), # Generated V-velocity | ||
| 'x': (288,), # X-coordinates | ||
| 'y': (96,) # Y-coordinates | ||
| } | ||
| ``` | ||
|
|
||
| Velocities are denormalized to physical units. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Incorrect output format documented. generate.py saves individual .npy files (line 359-360), not HDF5.
| ds_ratio=config.dataset.ds_ratio, | ||
| ) # Check this while integrating the function | ||
| u_pt_p = get_data_for_stats( | ||
| self.pred[:, i], | ||
| x=x, | ||
| y=y, | ||
| z=z, | ||
| input_data_type="2D", | ||
| data="point", | ||
| mean_over_time=False, | ||
| ds_ratio=config.dataset.ds_ratio, | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: config variable undefined - should be self.ds_ratio (used consistently elsewhere in this class)
|
|
||
| # Generation | ||
| - generation/uflow2d | ||
| #- generation/patched_based |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Space missing before # comment character
PhysicsNeMo Pull Request
Description
Checklist
Dependencies
Review Process
All PRs are reviewed by the PhysicsNeMo team before merging.
Depending on which files are changed, GitHub may automatically assign a maintainer for review.
We are also testing AI-based code review tools (e.g., Greptile), which may add automated comments with a confidence score.
This score reflects the AI’s assessment of merge readiness and is not a qualitative judgment of your work, nor is
it an indication that the PR will be accepted / rejected.
AI-generated feedback should be reviewed critically for usefulness.
You are not required to respond to every AI comment, but they are intended to help both authors and reviewers.
Please react to Greptile comments with 👍 or 👎 to provide feedback on their accuracy.