From 03137c2032668c216fb53cf8f6acc80e39a505d5 Mon Sep 17 00:00:00 2001 From: vue1999 Date: Thu, 14 Nov 2024 13:58:01 +0000 Subject: [PATCH 1/2] Enable swa if start_swa was given --- mace/tools/arg_parser_tools.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mace/tools/arg_parser_tools.py b/mace/tools/arg_parser_tools.py index da64806a..213ca4e1 100644 --- a/mace/tools/arg_parser_tools.py +++ b/mace/tools/arg_parser_tools.py @@ -92,6 +92,15 @@ def check_args(args): # Loss and optimization # Check Stage Two loss start + if args.start_swa is not None: + args.swa = True + log_messages.append( + ( + f"Stage Two is activated as start_stage_two was defined", + logging.INFO, + ) + ) + if args.swa: if args.start_swa is None: args.start_swa = max(1, args.max_num_epochs // 4 * 3) From 2efbd5ea344939668bec9b3068cb2b7fbf80cd6f Mon Sep 17 00:00:00 2001 From: vue1999 Date: Thu, 14 Nov 2024 19:20:31 +0000 Subject: [PATCH 2/2] fix pylint error --- mace/tools/arg_parser_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mace/tools/arg_parser_tools.py b/mace/tools/arg_parser_tools.py index 213ca4e1..be714b26 100644 --- a/mace/tools/arg_parser_tools.py +++ b/mace/tools/arg_parser_tools.py @@ -96,7 +96,7 @@ def check_args(args): args.swa = True log_messages.append( ( - f"Stage Two is activated as start_stage_two was defined", + "Stage Two is activated as start_stage_two was defined", logging.INFO, ) )