Conversation
Copilot
AI
changed the title
[WIP] if able to access the chat history at https://github.com/copilot/c/156c0648-660c-4f7e-8987-b8dcba4c3f61 please begin implementing the plan described therein
Fix pysindy compatibility and pandas deprecation warnings in modpods
Sep 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR modernizes the modpods codebase to work with current versions of pysindy (2.0.0) and pandas, fixing critical compatibility issues that prevented the library from running.
Issues Fixed
1. PySINDy Compatibility
The main issue was that the code was written for an older version of pysindy that included
ConstrainedSR3optimizer, which is no longer available. This caused immediate crashes when trying to use any system identification functionality:2. PySINDy API Changes
feature_namesparameter fromSINDyconstructor callsthreshold→reg_weight_lam)ps.SR3→ps.optimizers.SR3)3. Pandas Deprecation Warnings
Fixed multiple pandas deprecation warnings related to
.fillna()method:Impact on Functionality
While the constraint removal changes the optimization behavior slightly, the core functionality remains intact:
Warning messages are displayed when constraints are removed to maintain transparency about the behavioral changes.
Testing
Verified functionality with multiple test cases:
test_lti_system_gen.py- System identification from datatest_topo_inference.py- Network topology inferencetest_coef_constraints.py- Coefficient constraint handlingtest_lti_from_gamma.py- LTI model generationAll tests now run successfully with appropriate warnings where constraints have been removed.
Breaking Changes
None for end users. The API remains the same, though internal optimization behavior may differ slightly due to constraint removal. This is clearly communicated through warning messages.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.