Skip to content

Add 2025.3.1 backwards-compat to ML models#2331

Merged
mcm001 merged 17 commits intoPhotonVision:mainfrom
mcm001:fix-nnmm-deserdes
Jan 28, 2026
Merged

Add 2025.3.1 backwards-compat to ML models#2331
mcm001 merged 17 commits intoPhotonVision:mainfrom
mcm001:fix-nnmm-deserdes

Conversation

@mcm001
Copy link
Contributor

@mcm001 mcm001 commented Jan 24, 2026

Description

In #1894 we decided for some reason not to be backwards compatible. But fixing this requires SSHing in and deleting files which is ugly. It's also not that much code to maintain compat. It also causes configs to be partially lost if Object Detection pipelines were saved (discovered via Discord report). In light of that discovery, changes were made to increase robustness to exceptions during config loading, including a more fine-grained try-catch.

Changes

  • NeuralNetworkModelManager::loadModel will load legacy models from disk, and save to ConfigManager.getInstance().getConfig().neuralNetworkPropertyManager().addModelProperties(properties);; this saves them to disk
  • Renames NeuralNetworkPropertyManager to NeuralNetworkModelsSettings
  • Add ModelProperties string-only constructor to handle legacy serialization/deserialization from old ObjectDetection pipelines that just saved the name
  • Move try-catch in SqlConfigProvider::loadCameraConfigs to be per-camera; one bad camera won't cause the rest to be skipped

Meta

Merge checklist:

  • Pull Request title is short, imperative summary of proposed changes
  • The description documents the what and why
  • If this PR changes behavior or adds a feature, user documentation is updated
  • If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly
  • If this PR touches configuration, this is backwards compatible with settings back to v2025.3.2
  • If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated
  • If this PR addresses a bug, a regression test for it is added

@mcm001 mcm001 requested a review from a team as a code owner January 24, 2026 21:15
@github-actions github-actions bot added the backend Things relating to photon-core and photon-server label Jan 24, 2026
@samfreund

This comment was marked as resolved.

@samfreund samfreund requested a review from Gold856 January 28, 2026 19:13
@mcm001 mcm001 merged commit a398443 into PhotonVision:main Jan 28, 2026
93 of 94 checks passed
@mcm001 mcm001 deleted the fix-nnmm-deserdes branch January 28, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Things relating to photon-core and photon-server settings import robustness

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants