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

use binary strings in dictionaries to save memory #128

Merged
merged 9 commits into from
May 24, 2024
Merged

use binary strings in dictionaries to save memory #128

merged 9 commits into from
May 24, 2024

Conversation

adbar
Copy link
Owner

@adbar adbar commented May 22, 2024

See discussions in #72 and #125.

The PR cannot be merged until the dictionaries have been re-processed to account for the change.

@adbar adbar marked this pull request as draft May 22, 2024 11:51
Copy link

codecov bot commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.38%. Comparing base (2caac80) to head (6550bef).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #128      +/-   ##
==========================================
+ Coverage   96.34%   96.38%   +0.03%     
==========================================
  Files          33       33              
  Lines         575      581       +6     
==========================================
+ Hits          554      560       +6     
  Misses         21       21              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adbar adbar marked this pull request as ready for review May 22, 2024 13:16
training/dictionary_pickler.py Outdated Show resolved Hide resolved
@adbar
Copy link
Owner Author

adbar commented May 22, 2024

@juanjoDiaz I believe the PR is ready to be merged, do you have anything to add?

Edit: all the tests pass and the evaluation results are strictly the same on my computer.

simplemma/utils.py Fixed Show fixed Hide fixed
@adbar adbar merged commit 546ab7e into main May 24, 2024
16 checks passed
@adbar adbar deleted the binary_dicts branch May 24, 2024 15:07
@juanjoDiaz
Copy link
Collaborator

Sorry for the slow response.

Did you test the performance impact of this?
Is it worth it for the memory savings?

@adbar
Copy link
Owner Author

adbar commented May 27, 2024

Yes, the difference in performance is either not noticeable or not significant. The package is a little bit lighter even with compressed pickle files so this is obviously good.

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.

Function is_known() not working as expected (missing word when a rule is active)
2 participants