src/orion/core/cli/init_only.py
def add_subparser(parser):
    """Return the parser that needs to be used for this command"""
    init_only_parser = parser.add_parser(
        "init_only", help=DESCRIPTION, description=DESCRIPTION
    )

    orion_group = cli.get_basic_args_group(
        init_only_parser, group_name="init_only arguments", group_help=""
    )

    orion.core.config.experiment.add_arguments(
        orion_group,
        rename=dict(max_broken="--exp-max-broken", max_trials="--exp-max-trials"),
    )

    orion_group.add_argument(
        "--max-trials",
        type=int,
        metavar="#",
        help="(DEPRECATED) This argument will be removed in v0.3. Use --exp-max-trials instead",
    )

    evc_cli.get_branching_args_group(init_only_parser)

    cli.get_user_args_group(init_only_parser)

    init_only_parser.set_defaults(func=main)
    init_only_parser.set_defaults(help_empty=True)  # Print help if command is empty

    return init_only_parser
Return the parser that needs to be used for this command
Return the parser that needs to be used for this command
Return the parser that needs to be used for this command
def add_subparser(parser):
    init_only_parser = parser.add_parser(
        "init_only", help=DESCRIPTION, description=DESCRIPTION
    )
    orion_group = cli.get_basic_args_group(
        init_only_parser, group_name="init_only arguments", group_help=""
    )
    orion.core.config.experiment.add_arguments(
        orion_group,
        rename=dict(max_broken="--exp-max-broken", max_trials="--exp-max-trials"),
    )
    orion_group.add_argument(
        "--max-trials",
        type=int,
        metavar="#",
        help="(DEPRECATED) This argument will be removed in v0.3. Use --exp-max-trials instead",
    )
    evc_cli.get_branching_args_group(init_only_parser)
    cli.get_user_args_group(init_only_parser)
    init_only_parser.set_defaults(func=main)
    init_only_parser.set_defaults(help_empty=True)  
    return init_only_parser
def add_subparser ( parser ) : init_only_parser = parser . add_parser ( "init_only" , help = DESCRIPTION , description = DESCRIPTION ) orion_group = cli . get_basic_args_group ( init_only_parser , group_name = "init_only arguments" , group_help = "" ) orion . core . config . experiment . add_arguments ( orion_group , rename = dict ( max_broken = "--exp-max-broken" , max_trials = "--exp-max-trials" ) , ) orion_group . add_argument ( "--max-trials" , type = int , metavar = "#" , help = "(DEPRECATED) This argument will be removed in v0.3. Use --exp-max-trials instead" , ) evc_cli . get_branching_args_group ( init_only_parser ) cli . get_user_args_group ( init_only_parser ) init_only_parser . set_defaults ( func = main ) init_only_parser . set_defaults ( help_empty = True ) return init_only_parser
Return the parser that needs to be used for this command
Return the parser that needs to be used for this command
"""Return the parser that needs to be used for this command""" # Print help if command is empty
parser