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

UDPipe Lemmatizer: remove self.model from pickle #722

Merged
merged 1 commit into from
Oct 8, 2021

Conversation

PrimozGodec
Copy link
Collaborator

Issue

UDPipe remembers models' absolute files on computer via instance of UDPipeModels class which cause that normalisation with the same model on the other computer fails.

Description of changes

This PR removes UDPipeModels's instance from the pickle (and init it on unpickle). It can be without harm initialize on unpickling and we even save the amount of the pickle content.

The test is not required since existing tests already test pickling/unpickling.

Includes
  • Code changes
  • Tests
  • Documentation

@codecov-commenter
Copy link

Codecov Report

Merging #722 (3159b67) into master (a6b6676) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #722      +/-   ##
==========================================
- Coverage   74.20%   74.17%   -0.03%     
==========================================
  Files          72       72              
  Lines        9576     9577       +1     
  Branches     1303     1303              
==========================================
- Hits         7106     7104       -2     
- Misses       2221     2223       +2     
- Partials      249      250       +1     

@PrimozGodec PrimozGodec changed the title UDPipe Lemmatizer: remote self.model from pickle UDPipe Lemmatizer: remove self.model from pickle Sep 24, 2021
@ajdapretnar ajdapretnar merged commit aad3d51 into biolab:master Oct 8, 2021
@PrimozGodec PrimozGodec deleted the updpip-pickle branch March 29, 2023 10:37
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.

3 participants