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",
|
"--model-basedir",
|
||||||
"-m",
|
"-m",
|
||||||
help="directory of models",
|
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',
|
default=f'{os.getcwd()}/models_eynollah',
|
||||||
)
|
)
|
||||||
@click.option(
|
@click.option(
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Load libraries with possible race conditions once. This must be imported as the first module of eynollah.
|
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 *
|
from torch import *
|
||||||
|
tf_disable_interactive_logs()
|
||||||
import tensorflow.keras
|
import tensorflow.keras
|
||||||
from shapely import *
|
from shapely import *
|
||||||
imported_libs = True
|
imported_libs = True
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue