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] Pickle TypeMap #1050

Closed
wants to merge 5 commits into from
Closed

[WIP] Pickle TypeMap #1050

wants to merge 5 commits into from

Conversation

ajtritt
Copy link
Member

@ajtritt ajtritt commented Aug 21, 2019

Motivation

Currently, it takes about 2.5 seconds to PyNWB. Pickling the TypeMap on build/install will help bring this down.

This is WIP to make sure it works with testing/deployment

@dorukozturk @jcfr Your thoughts/input on this would be greatly appreciated.

How to test the behavior?

Run test suite

Checklist

  • Have you checked our Contributing document?
  • Have you ensured the PR description clearly describes problem and the solution?
  • Is your contribution compliant with our coding style ? This can be checked running flake8 from the source directory.
  • Have you checked to ensure that there aren't other open Pull Requests for the same change?
  • Have you included the relevant issue number using #XXX notation where XXX is the issue number ?

@ajtritt ajtritt requested review from dorukozturk, oruebel and rly August 21, 2019 16:55
@ajtritt ajtritt requested a review from jcfr August 21, 2019 16:59
@codecov
Copy link

codecov bot commented Aug 23, 2019

Codecov Report

Merging #1050 into dev will decrease coverage by 3.77%.
The diff coverage is 77.41%.

Impacted file tree graph

@@            Coverage Diff            @@
##              dev   #1050      +/-   ##
=========================================
- Coverage   71.17%   67.4%   -3.78%     
=========================================
  Files          37      37              
  Lines        2793    2807      +14     
  Branches      554     557       +3     
=========================================
- Hits         1988    1892      -96     
- Misses        679     789     +110     
  Partials      126     126
Impacted Files Coverage Δ
src/pynwb/legacy/__init__.py 0% <0%> (-86.96%) ⬇️
src/pynwb/__init__.py 70.67% <82.75%> (-1.5%) ⬇️
src/pynwb/legacy/io/__init__.py 0% <0%> (-100%) ⬇️
src/pynwb/legacy/io/misc.py 0% <0%> (-83.34%) ⬇️
src/pynwb/legacy/io/image.py 0% <0%> (-66.67%) ⬇️
src/pynwb/legacy/io/base.py 0% <0%> (-35.9%) ⬇️
src/pynwb/legacy/io/epoch.py 0% <0%> (-35.3%) ⬇️
src/pynwb/legacy/io/behavior.py 0% <0%> (-33.34%) ⬇️
src/pynwb/legacy/io/icephys.py 0% <0%> (-31.25%) ⬇️
... and 9 more

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 0843e24...853e84f. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Aug 23, 2019

Codecov Report

Merging #1050 into dev will decrease coverage by 3.77%.
The diff coverage is 77.41%.

Impacted file tree graph

@@            Coverage Diff            @@
##              dev   #1050      +/-   ##
=========================================
- Coverage   71.17%   67.4%   -3.78%     
=========================================
  Files          37      37              
  Lines        2793    2807      +14     
  Branches      554     557       +3     
=========================================
- Hits         1988    1892      -96     
- Misses        679     789     +110     
  Partials      126     126
Impacted Files Coverage Δ
src/pynwb/legacy/__init__.py 0% <0%> (-86.96%) ⬇️
src/pynwb/__init__.py 70.67% <82.75%> (-1.5%) ⬇️
src/pynwb/legacy/io/__init__.py 0% <0%> (-100%) ⬇️
src/pynwb/legacy/io/misc.py 0% <0%> (-83.34%) ⬇️
src/pynwb/legacy/io/image.py 0% <0%> (-66.67%) ⬇️
src/pynwb/legacy/io/base.py 0% <0%> (-35.9%) ⬇️
src/pynwb/legacy/io/epoch.py 0% <0%> (-35.3%) ⬇️
src/pynwb/legacy/io/behavior.py 0% <0%> (-33.34%) ⬇️
src/pynwb/legacy/io/icephys.py 0% <0%> (-31.25%) ⬇️
... and 9 more

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 0843e24...853e84f. Read the comment docs.


def _dec(cls):
__rct_kwargs.append({'data_type': neurodata_type, 'namespace': namespace, 'container_cls': cls})
return cls
Copy link
Contributor

Choose a reason for hiding this comment

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

The above code will not work with extensions that call register_class. This will add kwargs to __rct_kwargs but they are not registered into the __TYPE_MAP. Same for the register_map method.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch... back to the drawing board.

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