Skip to content

load gzipped models #49

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

Merged
merged 1 commit into from
Jun 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ocrd_cis/ocropy/recognize.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def process(self):
Produce a new output file by serialising the resulting hierarchy.
"""
# from ocropus-rpred:
self.network = load_object(self.get_model(), verbose=1)
self.network = load_object(self.get_model(), zip=1, verbose=1)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this is necessary. The default setting zip=0 already decompressed files if they are named *.gz. See here:

if zip==0 and fname.endswith(".gz"):

Ignoring the file name will now make parameter files (or workflow definitions) fail which don't use .gz suffix, for example because of an old workaround to #41

for x in self.network.walk():
x.postLoad()
for x in self.network.walk():
Expand Down