Closed stweil closed 4 years ago
All help outputs for the processors ocrd-anybaseocr-*
show the first four lines with the TensorFlow related warnings. Loading TensorFlow also takes several seconds. That should not be needed for the help. Maybe TensorFlow can be loaded only when it is really used.
Notes for other repositories:
Other processors with a similar problem:
Other processors with different help problems:
Likely that they are doing too much in the constructor which will always be invoked, even if just version, ocrd-tool.json or help is requested.
Likely that they are doing too much in the constructor which will always be invoked, even if just version, ocrd-tool.json or help is requested.
The problem is with Tensorflow itself. The import time even used to be worse. The messages appear as soon as you import it. (And I think we all agree that imports should not be in member functions or conditionals.) I recommend this recipe against the misplaced messages.
Command output: