Skip to content

Conversation

@laurator
Copy link
Contributor

@laurator laurator commented Oct 27, 2025

Adds automatic scikit-learn version management for LFP_developing_brain.py and EEG_AD.py scripts to ensure compatibility with version 1.3.2.

Changes

  • Added version checking: Scripts now verify scikit-learn version at runtime
  • Automatic installation: If version ≠ 1.3.2, automatically uninstalls current version and installs 1.3.2
  • Isolated impact: Only affects the two specified scripts; other scripts remain unchanged
  • Functions centralized in /ncpi/tools.py for maintainability

Impact

Ensures consistent model behavior and reproducibility for these specific example scripts that require scikit-learn 1.3.2 for compatibility with trained models and feature processing.

Testing

To test if this new version of the code works, it's necessary to do pip install . in the /ncpi folder. The changes of this pull request only affect EEG_AD and LFP_developing_brain examples.

…equirement of ncpi package is now scikit-learn==1.5.0. Only LFP and EEG scripts include this check.
@laurator laurator changed the title Scikit-learn version Management for specific example scripts Scikit-learn version management for specific example scripts Oct 27, 2025
Copy link
Contributor

@AlejandroOrozcoValero AlejandroOrozcoValero 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 tested the changes and confirmed that they work as expected. The automatic version management successfully installs scikit-learn 1.3.2 for both example scripts.

laurator and others added 2 commits October 31, 2025 12:33
Extended ensure_module to handle the installation of a previous version of an already installed package. This eliminates the need for the specialized
function for scikit-learn module
@pablomc88 pablomc88 merged commit cad54db into main Nov 3, 2025
1 check passed
@pablomc88 pablomc88 deleted the sklearn-check branch November 3, 2025 10:24
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.

4 participants