neon.util.argparser.extract_valid_args

neon.util.argparser.extract_valid_args(args, func, startidx=0)[source]

Given a namespace of argparser args, extract those applicable to func.

Parameters:
  • args (Namespace) – a namespace of args from argparse
  • func (Function) – a function to inspect, to determine valid args
  • startidx (int) – Start index
Returns:

dict of (arg, value) pairs from args that are valid for func