mirror of
https://github.com/qurator-spk/eynollah.git
synced 2025-12-01 08:44:13 +01:00
disable tf/keras logging on first import
This commit is contained in:
parent
9d9d32daed
commit
0f410c2e7c
2 changed files with 5 additions and 1 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue