Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@FlorianDeconinck
Copy link
Collaborator

Description
Embryo of a gt backend purposed debugger.
Feature list:

  • Can save netcdf for each parameter IN and OUT by name (no read/write analysis, just name matching on parameters list of stencils and instrumented methods)
  • Save all IN and OUT of stencils and instrumented methods

System is multi-rank and multi-call ready. It is driven by a yaml file of the shape:

mode: Runtime
stencils_or_class:
  - copy_corners_x_nord
  - copy_corners_y_nord
  - fy_calc_stencil_column
track_parameter_by_name:
  - fy

How Has This Been Tested?
This has been used during f32 debugging of the Dynamics

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included

fmalatino
fmalatino previously approved these changes May 19, 2025
romanc
romanc previously approved these changes May 19, 2025
Copy link
Collaborator

@romanc romanc left a comment

Choose a reason for hiding this comment

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

Looks good to me. Couple small notes and questions inline, but nothing that would make me formally request changes.

I mostly skimmed over the viz/fv3 part since that was just copied from back then.

Thanks for adding this. I think this will be add a lot to quality of live and we'll probably come back later (once we used it a bit) to make changes.

Add warning for config not existing but set
Use Pathlib for cross-OS resilience
@FlorianDeconinck FlorianDeconinck dismissed stale reviews from romanc and fmalatino via dda1013 May 19, 2025 18:57
fmalatino
fmalatino previously approved these changes May 20, 2025
romanc
romanc previously approved these changes May 20, 2025
Copy link
Collaborator

@romanc romanc left a comment

Choose a reason for hiding this comment

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

Found one debug print statement, which I must have missed in my earlier review. Otherwise all good now.

@FlorianDeconinck FlorianDeconinck dismissed stale reviews from romanc and fmalatino via 45ace08 May 20, 2025 12:39
Copy link
Collaborator

@oelbert oelbert left a comment

Choose a reason for hiding this comment

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

I have a small question on the implementation of debugger, and a (potentially) larger one on the license for the viz code

@@ -0,0 +1,14 @@
# Acknowledgment

This code was lifted from <https://github.com/ai2cm/fv3net> and developped by AI2 under the MIT license (see below).
Copy link
Collaborator

Choose a reason for hiding this comment

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

We're sure there's not a license violation or conflict between this and our top-level license?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also assuming you talked to the AI2 folks about this?

Actually, why not directly import fv3net? I have it as a Pace dependency (at least in the dockerfile...)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because fv3net is a huge repository - and the viz is a very small code untouched for the last three years. It's the case of bring in thousands of line of code, for the benefit of using a handful.

I'll check the license, I think it's ok.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not a layer here, but the MIT license (as stated below) is pretty loose. In particular it allows to modify and re-distribute the code provided that the license header is preserved.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So I checked and this is correct. If we were to make "substantial" changes we could rope the code in the Apache 2.0.

MIT is basically covering up AI2 for any side effect and by knock-on free us to use or reuse as is. If we modify we can argue that the license applying to the code is the one under we operate

Copy link
Collaborator

Choose a reason for hiding this comment

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

I also checked lol, but yeah it seems like this is fine. Probably still good to drop Oli WM a line to let him know if you haven't already

Copy link
Collaborator

@oelbert oelbert left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@FlorianDeconinck FlorianDeconinck merged commit 2a6150c into NOAA-GFDL:develop May 20, 2025
5 checks passed
@FlorianDeconinck FlorianDeconinck deleted the experimental/debugger branch May 20, 2025 17:49
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.

5 participants