From 632d1ab7d6b871f769d1d814700dd4d5c63e21cf Mon Sep 17 00:00:00 2001 From: protsenkovi Date: Tue, 7 May 2024 02:48:53 +0400 Subject: [PATCH] upd --- src/common/validation.py | 5 +---- src/train.py | 5 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/common/validation.py b/src/common/validation.py index 47921a1..c8d0c7f 100644 --- a/src/common/validation.py +++ b/src/common/validation.py @@ -94,10 +94,7 @@ def valid_steps(model, datasets, config, log_prefix=""): 'Total area', 'Total time, s' ] - config.logger.info(pd.DataFrame( - [row], - columns=column_names - ).set_index('Dataset')) + config.logger.info("\n" + str(pd.DataFrame([row], columns=column_names).set_index('Dataset').T)) config.writer.flush() results = pd.DataFrame(results, columns=column_names).set_index('Dataset') diff --git a/src/train.py b/src/train.py index 0f5f936..b797a5b 100644 --- a/src/train.py +++ b/src/train.py @@ -50,14 +50,15 @@ class TrainOptions: def parse_args(self): args = self.parser.parse_args() - args.models_dir = Path(args.models_dir) + args.datasets_dir = Path(args.datasets_dir).resolve() + args.models_dir = Path(args.models_dir).resolve() args.model_path = Path(args.model_path) if not args.model_path is None else None args.train_datasets = args.train_datasets.split(',') args.val_datasets = args.val_datasets.split(',') return args def __repr__(self): - config = self.parser.parse_args() + config = self.parse_args() message = '' message += '----------------- Options ---------------\n' for k, v in sorted(vars(config).items()):