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

RF+ENH+BUG: Use npz for cache; store means #177

Merged
merged 33 commits into from Jun 18, 2021

Conversation

scottclowe
Copy link
Member

@scottclowe scottclowe commented Jun 13, 2021

Change from saving a list of a few numpy.ndarrays with numpy.save, we save several arrays associated with keys using
numpy.savez_compressed.

At the same time, we refactor some code to remove a superfluous nesting depth for the main preparation and separation code blocks.

We now save the means into the .npz file, so this is now restored. This resolves the issue (described in PR #169) that running an experiment that loads from cache does not set experiment.means.

@scottclowe scottclowe added bug enhancement vX.Y.0 New Minor Release This should be included in a minor release labels Jun 13, 2021
@codecov
Copy link

codecov bot commented Jun 13, 2021

Codecov Report

Merging #177 (4ae725c) into master (ae4e7f0) will increase coverage by 0.27%.
The diff coverage is 97.58%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #177      +/-   ##
==========================================
+ Coverage   92.65%   92.93%   +0.27%     
==========================================
  Files           8        8              
  Lines         831      863      +32     
  Branches      165      178      +13     
==========================================
+ Hits          770      802      +32     
  Misses         31       31              
  Partials       30       30              
Flag Coverage Δ
unittests 92.81% <97.58%> (+0.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
fissa/core.py 96.63% <97.58%> (+0.40%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae4e7f0...4ae725c. Read the comment docs.

The `dirs_exist_ok` argument was added to shutil.copytree
in python 3.6.

We just delete the target directory instead, so it is compatible
with python 3.5.
Copy link
Member

@swkeemink swkeemink left a comment

Choose a reason for hiding this comment

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

Overall I agree with these changes.

The only thing I would suggest is to add a short section to the jupyter notebook about interacting with the cache files without using FISSA. This was not there before because we didn't really consider this usecase, but makes a lot of sense with these changes. Could also be done as a separate PR.

@scottclowe scottclowe merged commit ae8b909 into rochefort-lab:master Jun 18, 2021
@scottclowe scottclowe deleted the bug_mean-not-saved branch June 18, 2021 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug enhancement vX.Y.0 New Minor Release This should be included in a minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants