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

Add save() and load() methods to MetaResult objects #771

Merged
merged 4 commits into from Feb 21, 2023

Conversation

JulioAPeraza
Copy link
Collaborator

Closes #770.

Changes proposed in this pull request:

  • Pass NiMAREBase to MetaResult class to be able to save and load MetaResult objects.

@JulioAPeraza JulioAPeraza added the enhancement New feature or request label Feb 13, 2023
@codecov
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Base: 88.66% // Head: 88.65% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (4703d5e) compared to base (87964b8).
Patch coverage: 89.47% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #771      +/-   ##
==========================================
- Coverage   88.66%   88.65%   -0.02%     
==========================================
  Files          38       39       +1     
  Lines        4323     4327       +4     
==========================================
+ Hits         3833     3836       +3     
- Misses        490      491       +1     
Impacted Files Coverage Δ
nimare/estimator.py 86.66% <86.66%> (ø)
nimare/base.py 84.52% <100.00%> (-0.30%) ⬇️
nimare/meta/cbma/base.py 96.01% <100.00%> (ø)
nimare/meta/ibma.py 99.50% <100.00%> (ø)
nimare/results.py 69.23% <100.00%> (+0.48%) ⬆️
nimare/transforms.py 75.36% <100.00%> (-0.28%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@jdkent jdkent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but does get_params still work with a MetaResult object?

@JulioAPeraza
Copy link
Collaborator Author

I think MetaResult.get_params() gives the parameter of the estimator (as a nested object) in the format <component>__<parameter>, and the mask, maps, and tables from a MetaResult object.
Are those the expected outputs?

@jdkent jdkent self-requested a review February 14, 2023 19:24
Copy link
Member

@jdkent jdkent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@tsalo tsalo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this change, but can you add the new methods to one of the tests?

@JulioAPeraza
Copy link
Collaborator Author

Thanks! I've added the test to test_meta_ale after the saving/loading method of the estimator is tested.

@jdkent
Copy link
Member

jdkent commented Feb 21, 2023

this looks good to merge.

@jdkent jdkent merged commit 6e7d603 into neurostuff:main Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add save() and load() methods to MetaResult objects.
3 participants