Skip to content

Use ArgumentParser.add_argument_group for clarity of presentation of flags  #4119

@odedbd

Description

@odedbd

🚀 Feature

Add Trainer arguments in an argument groups, to allow for clearer command line help.

Motivation

The Trainer class already has a large number of arguments. When adding the arguments for a Model, DataModule and program level arguments the list of flags in the command line help is too long and confused to be useful.

Pitch

The Trainer arguments should be grouped within an arguments group using add_arument_group. In addition, the documentation for add_model_specific_args and similar functions should recommend using add_argument_group for grouping together the arguments of each part of the code in a sensible way.

Alternatives

I have explored switching to using a configuration file, specifically using Hydra, but I find that I like the ArgumentParser approach better for my use cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existsfeatureIs an improvement or enhancementhelp wantedOpen to be worked onwon't fixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions