Skip to content

Conversation

@ayush4874
Copy link

@ayush4874 ayush4874 commented Dec 10, 2025

This PR adds a standalone example demonstrating how to couple SU2 with PyTorch using the Python Wrapper.

Files:

  • train_online.py: Driver script for bidirectional coupling.
  • inv_NACA0012.cfg: Configuration file.
  • mesh_NACA0012_inv.su2: Mesh file.

Context:
Migrated from su2code/SU2#2638 and the tracking issue su2code/SU2#2637 as per discussion with @bigfooted.
This example serves as a reference for users implementing online surrogate modeling or PIML workflows.

@ayush4874
Copy link
Author

ayush4874 commented Dec 19, 2025

Hi @bigfooted,

I've successfully migrated the tutorial files here and opened the corresponding documentation PR in the website repo (su2code/su2code.github.io#189).

Regarding the regression test: I am ready to implement this, but I have a technical concern. This tutorial depends on torch, and I noticed that the current regression.yml in the main repo doesn't seem to include PyTorch in the environment.

Should I:

  1. Structure the test to be skipped if torch is not found?
  2. Or would you prefer to merge this as a "manual-only" tutorial for now to avoid modifying the CI environment?

I’m available to implement whichever path you prefer before the holiday break. Thanks!

@bigfooted
Copy link
Contributor

Let's not add pytorch to the regression test, it is very large and will increase the size of the docker container by a lot.

@ayush4874
Copy link
Author

Thanks for the feedback @bigfooted. That makes sense, adding the full PyTorch dependency to the regression test environment significantly increases the container size for a single tutorial.

Plan:

  1. I will revert the changes to the environment/Docker files (removing PyTorch).
  2. I will keep the tutorial files (scripts/configs) so users can run it if they have PyTorch installed locally.
  3. I will add a note to the tutorial documentation specifying the manual dependency.
  4. I will remove this specific case from the automated regression suite to prevent CI failures.

I'll push these updates shortly.

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.

2 participants