"git@developer.sourcefind.cn:yangql/googletest.git" did not exist on "051fe2fa05af4ee761904aaee5314d67d5a15720"
Unverified Commit 4e4dc4b8 authored by Guolin Ke's avatar Guolin Ke Committed by GitHub
Browse files

fix validate_with_ema option

parent d01a62ef
...@@ -137,7 +137,8 @@ def parse_args_and_arch( ...@@ -137,7 +137,8 @@ def parse_args_and_arch(
args.no_seed_provided = True args.no_seed_provided = True
else: else:
args.no_seed_provided = False args.no_seed_provided = False
args.validate_with_ema = getattr(args, "validate_with_ema", False)
# Apply architecture configuration. # Apply architecture configuration.
if hasattr(args, "arch") and args.arch in ARCH_CONFIG_REGISTRY: if hasattr(args, "arch") and args.arch in ARCH_CONFIG_REGISTRY:
ARCH_CONFIG_REGISTRY[args.arch](args) ARCH_CONFIG_REGISTRY[args.arch](args)
...@@ -194,7 +195,7 @@ def get_parser(desc, default_task='test'): ...@@ -194,7 +195,7 @@ def get_parser(desc, default_task='test'):
"main method can return a value (useful for sweeps)") "main method can return a value (useful for sweeps)")
parser.add_argument('--profile', action='store_true', help="enable autograd profiler emit_nvtx") parser.add_argument('--profile', action='store_true', help="enable autograd profiler emit_nvtx")
parser.add_argument('--ema-decay', default=-1.0, type=float, help="enable moving average for model weights") parser.add_argument('--ema-decay', default=-1.0, type=float, help="enable moving average for model weights")
parser.add_argument("--validate-with-ema", default=False, action="store_true") parser.add_argument("--validate-with-ema", action="store_true")
from unicore.registry import REGISTRIES from unicore.registry import REGISTRIES
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment