Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Experimental parallel #723

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

bruAristimunha
Copy link
Collaborator

No description provided.

@bruAristimunha
Copy link
Collaborator Author

This is so hard >.<

@PierreGtch
Copy link
Collaborator

Discussion with @bruAristimunha, action plan for the refactoring:

  • We will have one shared evaluation method in the base evaluation class which will:
    • Load only the metadata
    • Split the metadata into different cv folds (calling methods defined in the subclasses)
    • Check which cv folds already have a result and can be skipped (except if overwrite=True)
    • Then, two options:
      • If lazy_loading=False, load the data of the cv folds that still need to be computed
      • If lazy_loading=True, do nothing
    • Launch, in parallel, a shared train_and_evaluate function on all cv folds (if lazy_loading=False, pass the pre-loaded data)
    • Gather the results in a dataframe and return
  • The shared train_and_evaluate method defined in the base evaluation class:
    • (It only handles one cv fold and one pipeline)
    • Loads the data:
      • If lazy_loading=False (data+metadata provided), selects only the epochs corresponding to this fold
      • If lazy_loading=True (only metadata provided), loads the data. In this case, we recommend the users to activate the BIDS cache mechanism to avoid pre-processing the same data multiple times.
    • Trains the pipeline on the cv fold
    • computes codecarbone, training time, etc.
    • Groups the test data by session
    • For each test session, computes the pipeline's score
    • Pushes all the test session scores
    • Returns the list of test session scores

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