diff --git a/src/eynollah/cli.py b/src/eynollah/cli.py index 9787054..c37864a 100644 --- a/src/eynollah/cli.py +++ b/src/eynollah/cli.py @@ -25,7 +25,9 @@ class EynollahCliCtx: "--model-basedir", "-m", help="directory of models", - type=click.Path(exists=True), + # NOTE: not mandatory to exist so --help for subcommands works but will log a warning + # and raise exception when trying to load models in the CLI + # type=click.Path(exists=True), default=f'{os.getcwd()}/models_eynollah', ) @click.option( diff --git a/src/eynollah/eynollah_imports.py b/src/eynollah/eynollah_imports.py index a57f87d..f04cfdc 100644 --- a/src/eynollah/eynollah_imports.py +++ b/src/eynollah/eynollah_imports.py @@ -1,7 +1,9 @@ """ Load libraries with possible race conditions once. This must be imported as the first module of eynollah. """ +from ocrd_utils import tf_disable_interactive_logs from torch import * +tf_disable_interactive_logs() import tensorflow.keras from shapely import * imported_libs = True