Skip to content

Add supervised torchfort_save_model/torchfort_load_model API tests.#108

Merged
azrael417 merged 3 commits into
masterfrom
joshr/supervised-load-model-test
Jun 5, 2026
Merged

Add supervised torchfort_save_model/torchfort_load_model API tests.#108
azrael417 merged 3 commits into
masterfrom
joshr/supervised-load-model-test

Conversation

@romerojosh

Copy link
Copy Markdown
Collaborator

Summary

Adds supervised test coverage for the public torchfort_save_model / torchfort_load_model API.

The new coverage exercises both native MLP models and TorchScript models, including loading saved model weights across device combinations. Each case verifies that:

  • inference matches after loading saved model weights into a fresh model
  • the loaded model remains trainable on the destination device

Changes

  • Added a trainable TorchScript test fixture generated by tests/supervised/scripts/setup_tests.py
  • Added configs/torchscript_trainable.yaml
  • Installed the new config through the supervised test CMake rules
  • Added model-only save/load coverage in test_checkpoint for:
    • native MLP
    • TorchScript
    • CPU -> CPU
    • GPU -> GPU
    • CPU -> GPU
    • GPU -> CPU
    • GPU0 -> GPU1 when 2 GPUs are available

Signed-off-by: Josh Romero <joshr@nvidia.com>
Signed-off-by: Josh Romero <joshr@nvidia.com>
@romerojosh

Copy link
Copy Markdown
Collaborator Author

/build_and_test

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🚀 Build workflow triggered! View run

@romerojosh romerojosh changed the title Add supervised save_model/load_model API tests. Add supervised torchfort_save_model/torchfort_load_model API tests. Jun 3, 2026
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

❌ Build workflow failed! View run

Signed-off-by: Josh Romero <joshr@nvidia.com>
@romerojosh

Copy link
Copy Markdown
Collaborator Author

/build_and_test

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🚀 Build workflow triggered! View run

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

✅ Build workflow passed! View run

@romerojosh romerojosh requested a review from azrael417 June 4, 2026 16:17
@azrael417

Copy link
Copy Markdown
Collaborator

LGTM, all tests make sense.

@azrael417 azrael417 merged commit 2e5ab5d into master Jun 5, 2026
4 checks passed
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