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

Make InferenceData and Dataset type-unstable #24

Draft
wants to merge 29 commits into
base: main
Choose a base branch
from
Draft

Conversation

sethaxen
Copy link
Member

@sethaxen sethaxen commented Oct 2, 2022

Fixes #15 by removing type annotations from InferenceData and Dataset. This makes high-order operations on these types compile quickly (and possibly automatically precompile), while operations on arrays are still compiled for the specific dimensions of that array and so are still fast.

@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2022

Codecov Report

Merging #24 (676e82d) into main (766efd4) will increase coverage by 0.66%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #24      +/-   ##
==========================================
+ Coverage   97.08%   97.75%   +0.66%     
==========================================
  Files          10        9       -1     
  Lines         309      312       +3     
==========================================
+ Hits          300      305       +5     
+ Misses          9        7       -2     
Impacted Files Coverage Δ
src/dataset.jl 92.30% <ø> (ø)
...ferenceObjectsNetCDF/src/InferenceObjectsNetCDF.jl 95.77% <100.00%> (+0.12%) ⬆️
src/from_namedtuple.jl 97.29% <100.00%> (ø)
src/inference_data.jl 100.00% <100.00%> (+3.03%) ⬆️
src/utils.jl 100.00% <0.00%> (ø)
src/InferenceObjects.jl

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

@sethaxen
Copy link
Member Author

sethaxen commented Oct 2, 2022

I'd like to in this PR also explore the feasibility of making Dataset have dictionary storage instead of NamedTuple. I expect this will eliminate even more compile time lag, e.g. show, and will allow new variables to be added to existing datasets.

@sethaxen sethaxen marked this pull request as draft February 18, 2023 09:43
@sethaxen
Copy link
Member Author

Supporting mutable and type-unstable Dataset will require some changes to DimensionalData (see rafaqz/DimensionalData.jl#457), so that will wait for another PR in a future breaking release.

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.

Reducing compilation time with InferenceData
2 participants