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

update ocrd_pc_segmentation, move from tf21 to tf2 #264

Merged
merged 3 commits into from
Jul 21, 2021

Conversation

bertsky
Copy link
Collaborator

@bertsky bertsky commented Jun 18, 2021

To prevent pc_segmentation from dragging in TF 2.5 and thus invalidating that venv for other modules.

@bertsky
Copy link
Collaborator Author

bertsky commented Jun 18, 2021

See ocr-d-modul-2-segmentierung/page-segmentation#4 for details.

@bertsky
Copy link
Collaborator Author

bertsky commented Jun 18, 2021

Damn. Placing ocrd_pc_segmentation in sub-venv/headless-tf2 creates another conflict around h5py (ocrd_calamari wants <3, but ocr4all-pixel-classifier drags in 3.1).

@bertsky
Copy link
Collaborator Author

bertsky commented Jun 20, 2021

Placing ocrd_pc_segmentation in sub-venv/headless-tf2 creates another conflict around h5py (ocrd_calamari wants <3, but ocr4all-pixel-classifier drags in 3.1).

It's not ocrd_pc_segmentation's or ocr4all-pixel-classifier's fault: they simply allow running the most recent TF, which happens to be incompatible with current ocrd_calamari. Unfortunately, the latter does not advertise this dependency. (See fix for the latter here and analysis of the former here.)

I see no way around this other than using different venvs for ocrd_calamari (headless-tf24) and ocrd_pc_segmentation (headless-tf2) – which will cost us another 2GB in the maximum image.

Unless anyone has a better idea?

bertsky referenced this pull request in OCR-D/ocrd_calamari Jul 14, 2021
@bertsky bertsky mentioned this pull request Jul 16, 2021
@kba
Copy link
Member

kba commented Jul 19, 2021

To summarize:

So, we need a new release of ocrd_calamari and the only remaining tf21 processor would be ocrd_anybaseocr?

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 19, 2021

To summarize:

yes

yes

  • ocrd_calamari can be moved to tf2

no, ocrd_calamari is already in headless-tf2, but it can stay there along with ocrd_pc_segmentation if ...

and the h5py downgrade is redundant

yes, the combination h5py<3 and TF<2.5 is overly restrictive, and prevents sharing the venv with ocrd_pc_segmentation. (We would need a tf24 venv for no gain.)

So, we need a new release of ocrd_calamari and the only remaining tf21 processor would be ocrd_anybaseocr?

yes

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 21, 2021

Ok, I have removed the h5py hack for headless-tf2 and switched to OCR-D/ocrd_calamari@76b34c5 now – let's see if it works.

@bertsky
Copy link
Collaborator Author

bertsky commented Jul 21, 2021

Ok, I have removed the h5py hack for headless-tf2 and switched to OCR-D/ocrd_calamari@76b34c5 now – let's see if it works.

No. Seems like ocrd_pc_segmentation needs another fix. Let's see...

@kba kba merged commit bc024ca into OCR-D:master Jul 21, 2021
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