logger.info('Runing FULL: ' + str(not demo)) logger.strong_line() with open(cfg_dir / param_path, 'r') as param_file: suite_params = yaml.safe_load(param_file)['suite_params'] with open(cfg_dir / plots_path, 'r') as plots_file: plot_params = yaml.safe_load(plots_file) suite = BenchmarkSuite(**suite_params) for env_id in env_ids: config_path = cfg_dir / 'env' / (env_id + '.yaml') if not config_path.exists(): logger.error('The environment configuration file ' + config_path.name + ' does not exists') exit() with open(config_path, 'r') as config_file: yaml_file = yaml.safe_load(config_file) run_params = yaml_file['run_params'] env_data = yaml_file['env_params'] agent_data = yaml_file['agent_params'] agents = agent_data.keys() agents_params = agent_data.values() env = env_data['name'] env_params = env_data['params'] if demo:
logger_no_folder = Logger('tutorial_no_folder', results_dir=None) # Write a line of hashtags, to be used as a separator logger.strong_line() # Print an info message logger.debug('This is a debug message') # Print an info message logger.info('This is an info message') # Print a warning logger.warning('This is a warning message') # Print an error logger.error('This is an error message') # Print a critical error message logger.critical('This is a critical error') # Print a line of dashes, to be used as a (weak) separator logger.weak_line() # Exception logging try: raise RuntimeError('A runtime exception occurred') except RuntimeError as e: logger.error('Exception catched, here\'s the stack trace:') logger.exception(e) logger.weak_line()