def to_train_kwargs(args):
    """Parse command-line training arguments.
    Parameters
    ----------
    args : argparse.Namespace
        Namespace of an argument parser that was created with
        create_default_argument_parser.
    Returns
    -------
    Dict[str, T]
        Returns a dictionary of named arguments to be passed on to
        train_loop.
    """
    kwargs_dict = {
        "batch_size": args.batch_size,
        "learning_rate": args.learning_rate,
        "log_dir": args.log_dir,
        "loss_mode": args.loss_mode,
        "number_of_steps": args.number_of_steps,
        "restore_path": args.restore_path,
        "run_id": args.run_id,
    }
    return kwargs_dict