# /*--------------------------------------------------------------------------------------------- # * Copyright (c) 2022 STMicroelectronics. # * All rights reserved. # * This software is licensed under terms that can be found in the LICENSE file in # * the root directory of this software component. # * If no LICENSE file comes with this software, it is provided AS-IS. # *--------------------------------------------------------------------------------------------*/ import sys,os,logging import warnings warnings.filterwarnings("ignore") os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' import tensorflow as tf logger = tf.get_logger() logger.setLevel(logging.ERROR) import hydra from omegaconf import DictConfig os.chdir(os.path.dirname(os.path.abspath(__file__))) sys.path.append(os.path.abspath('/opt/ml/model')) sys.path.append(os.path.abspath('/opt/ml/input/data/train')) sys.path.append(os.path.abspath('../utils')) sys.path.append(os.path.abspath('../utils/models')) sys.path.append(os.path.abspath('../../../common')) from utils import * @hydra.main(version_base=None, config_path="", config_name="user_config") def main(cfg : DictConfig) -> None: print(cfg) #initilize configuration & mlflow configs = get_config(cfg) mlflow_ini(configs) # Set all seeds setup_seed(42) #train the model train(configs) if __name__ == "__main__": main()