alessandro trinca tornidor
feat: use everywhere a single app_logger instance defined in samgis_lisa_on_zero.__init__
bb6e1c0
raw
history blame
854 Bytes
"""Get machine learning predictions from geodata raster images"""
import logging
import os
# not used here but contextily_tile is imported in samgis_lisa_on_zero.io_package.tms2geotiff
from contextily import tile as contextily_tile
from pathlib import Path
from lisa_on_cuda.utils import session_logger
from samgis_lisa_on_zero.utilities.constants import SERVICE_NAME
ROOT = Path(globals().get("__file__", "./_")).absolute().parent.parent
PROJECT_ROOT_FOLDER = Path(os.getenv("PROJECT_ROOT_FOLDER", ROOT))
WORKDIR = Path(os.getenv("WORKDIR", ROOT))
MODEL_FOLDER_PROJECT_ROOT_FOLDER = Path(PROJECT_ROOT_FOLDER / "machine_learning_models")
MODEL_FOLDER = Path(os.getenv("MODEL_FOLDER", MODEL_FOLDER_PROJECT_ROOT_FOLDER))
loglevel = os.getenv('LOGLEVEL', 'INFO').upper()
session_logger.change_logging(loglevel)
app_logger = logging.getLogger(__name__)