src/orion/core/cli/db/rm.py
def add_subparser(parser):
    """Return the parser that needs to be used for this command"""
    rm_parser = parser.add_parser(
        "rm",
        description=DESCRIPTION,
        help="Deletes experiments and trials",
        formatter_class=argparse.RawTextHelpFormatter,
    )

    rm_parser.set_defaults(func=main)

    rm_parser.add_argument("name", help="Name of the experiment to delete.")

    rm_parser.add_argument(
        "-c",
        "--config",
        type=argparse.FileType("r"),
        metavar="path-to-config",
        help="user provided " "orion configuration file",
    )

    rm_parser.add_argument(
        "-v",
        "--version",
        type=int,
        default=None,
        help="specific version of experiment to fetch; "
        "(default: last version matching.)",
    )

    rm_parser.add_argument(
        "-s",
        "--status",
        help="Remove all trials of the experiment with the given status "
        "(Will not delete the experiment). "
        "Also supports --status=* to delete all trials of a given experiment.",
    )

    rm_parser.add_argument(
        "-f",
        "--force",
        action="store_true",
        help="Force delete without asking to enter experiment name twice.",
    )

    return rm_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):
    rm_parser = parser.add_parser(
        "rm",
        description=DESCRIPTION,
        help="Deletes experiments and trials",
        formatter_class=argparse.RawTextHelpFormatter,
    )
    rm_parser.set_defaults(func=main)
    rm_parser.add_argument("name", help="Name of the experiment to delete.")
    rm_parser.add_argument(
        "-c",
        "--config",
        type=argparse.FileType("r"),
        metavar="path-to-config",
        help="user provided " "orion configuration file",
    )
    rm_parser.add_argument(
        "-v",
        "--version",
        type=int,
        default=None,
        help="specific version of experiment to fetch; "
        "(default: last version matching.)",
    )
    rm_parser.add_argument(
        "-s",
        "--status",
        help="Remove all trials of the experiment with the given status "
        "(Will not delete the experiment). "
        "Also supports --status=* to delete all trials of a given experiment.",
    )
    rm_parser.add_argument(
        "-f",
        "--force",
        action="store_true",
        help="Force delete without asking to enter experiment name twice.",
    )
    return rm_parser
def add_subparser ( parser ) : rm_parser = parser . add_parser ( "rm" , description = DESCRIPTION , help = "Deletes experiments and trials" , formatter_class = argparse . RawTextHelpFormatter , ) rm_parser . set_defaults ( func = main ) rm_parser . add_argument ( "name" , help = "Name of the experiment to delete." ) rm_parser . add_argument ( "-c" , "--config" , type = argparse . FileType ( "r" ) , metavar = "path-to-config" , help = "user provided " "orion configuration file" , ) rm_parser . add_argument ( "-v" , "--version" , type = int , default = None , help = "specific version of experiment to fetch; " "(default: last version matching.)" , ) rm_parser . add_argument ( "-s" , "--status" , help = "Remove all trials of the experiment with the given status " "(Will not delete the experiment). " "Also supports --status=* to delete all trials of a given experiment." , ) rm_parser . add_argument ( "-f" , "--force" , action = "store_true" , help = "Force delete without asking to enter experiment name twice." , ) return rm_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"""
parser