diff --git a/.doctrees/api/tyro/_argparse_formatter/index.doctree b/.doctrees/api/tyro/_argparse_formatter/index.doctree index 74486778..cb7c1e66 100644 Binary files a/.doctrees/api/tyro/_argparse_formatter/index.doctree and b/.doctrees/api/tyro/_argparse_formatter/index.doctree differ diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index c3e5b547..2f95031b 100644 Binary files a/.doctrees/environment.pickle and b/.doctrees/environment.pickle differ diff --git a/.doctrees/examples/02_nesting/03_multiple_subcommands.doctree b/.doctrees/examples/02_nesting/03_multiple_subcommands.doctree index 5f329b4b..5711348c 100644 Binary files a/.doctrees/examples/02_nesting/03_multiple_subcommands.doctree and b/.doctrees/examples/02_nesting/03_multiple_subcommands.doctree differ diff --git a/_modules/tyro/_argparse_formatter/index.html b/_modules/tyro/_argparse_formatter/index.html index e4ed15d5..e6d1b3fa 100644 --- a/_modules/tyro/_argparse_formatter/index.html +++ b/_modules/tyro/_argparse_formatter/index.html @@ -262,6 +262,9 @@
TODO: the current implementation should be robust given our test coverage, but unideal
long-term. We should just maintain our own fork of argparse.
"""
+
+from __future__ import annotations
+
import argparse
import contextlib
import dataclasses
@@ -271,7 +274,7 @@ Source code for tyro._argparse_formatter
import shutil
import sys
from gettext import gettext as _
-from typing import Any, Generator, List, NoReturn, Optional, Tuple
+from typing import Any, Dict, Generator, List, NoReturn, Optional, Set, Tuple
from rich.columns import Columns
from rich.console import Console, Group, RenderableType
@@ -324,6 +327,109 @@ Source code for tyro._argparse_formatter
)
+[docs]def recursive_arg_search(
+ args: List[str],
+ parser_spec: ParserSpecification,
+ prog: str,
+ unrecognized_arguments: Set[str],
+) -> Tuple[List[_ArgumentInfo], bool, bool]:
+ """Recursively search for arguments in a ParserSpecification. Used for error message
+ printing.
+
+ Returns a list of arguments, whether the parser has subcommands or not, and -- if
+ `unrecognized_arguments` is passed in --- whether an unrecognized argument exists
+ under a different subparser.
+
+ Args:
+ args: Arguments being parsed. Used for heuristics on subcommands.
+ parser_spec: Argument parser specification.
+ subcommands: Prog corresponding to parser_spec.
+ unrecognized_arguments: Used for same_exists return value.
+ """
+ # Argument name => subcommands it came from.
+ arguments: List[_ArgumentInfo] = []
+ has_subcommands = False
+ same_exists = False
+
+ def _recursive_arg_search(
+ parser_spec: ParserSpecification,
+ prog: str,
+ subcommand_match_score: float,
+ ) -> None:
+ """Find all possible arguments that could have been passed in."""
+
+ # When tyro.conf.ConsolidateSubcommandArgs is turned on, arguments will
+ # only appear in the help message for "leaf" subparsers.
+ help_flag = (
+ " (other subcommands) --help"
+ if parser_spec.consolidate_subcommand_args
+ and parser_spec.subparsers is not None
+ else " --help"
+ )
+ for arg in parser_spec.args:
+ if arg.field.is_positional() or arg.lowered.is_fixed():
+ # Skip positional arguments.
+ continue
+
+ # Skip suppressed arguments.
+ if conf.Suppress in arg.field.markers or (
+ conf.SuppressFixed in arg.field.markers
+ and conf.Fixed in arg.field.markers
+ ):
+ continue
+
+ option_strings = (arg.lowered.name_or_flag,)
+
+ # Handle actions, eg BooleanOptionalAction will map ("--flag",) to
+ # ("--flag", "--no-flag").
+ if (
+ arg.lowered.action is not None
+ # Actions are sometimes strings in Python 3.7, eg "append".
+ # We'll ignore these, but this kind of thing is a good reason
+ # for just forking argparse.
+ and callable(arg.lowered.action)
+ ):
+ option_strings = arg.lowered.action(
+ option_strings, dest="" # dest should not matter.
+ ).option_strings
+
+ arguments.append(
+ _ArgumentInfo(
+ # Currently doesn't handle actions well, eg boolean optional
+ # arguments.
+ option_strings,
+ metavar=arg.lowered.metavar,
+ usage_hint=prog + help_flag,
+ help=arg.lowered.help,
+ subcommand_match_score=subcommand_match_score,
+ )
+ )
+
+ # An unrecognized argument.
+ nonlocal same_exists
+ if not same_exists and arg.lowered.name_or_flag in unrecognized_arguments:
+ same_exists = True
+
+ if parser_spec.subparsers is not None:
+ nonlocal has_subcommands
+ has_subcommands = True
+ for (
+ subparser_name,
+ subparser,
+ ) in parser_spec.subparsers.parser_from_name.items():
+ _recursive_arg_search(
+ subparser,
+ prog + " " + subparser_name,
+ # Leaky (!!) heuristic for if this subcommand is matched or not.
+ subcommand_match_score=subcommand_match_score
+ + (1 if subparser_name in args else -0.001),
+ )
+
+ _recursive_arg_search(parser_spec, prog, 0)
+
+ return arguments, has_subcommands, same_exists
+
+
# TODO: this is a prototype; for a v1.0.0 release we should revisit whether the global
# state here is acceptable or not.
THEME = TyroTheme()
@@ -693,14 +799,6 @@ Source code for tyro._argparse_formatter
# return the updated namespace and the extra arguments
return namespace, extras
- def _print_usage_succinct(self, console: Console) -> None:
- """Print usage, but abridged if too long."""
- usage = self.format_usage().strip() + "\n"
- if len(usage) < 400:
- print(usage)
- else: # pragma: no cover
- console.print(f"[bold]help:[/bold] {self.prog} --help\n")
-
[docs] @override
def error(self, message: str) -> NoReturn:
"""Improve error messages from argparse.
@@ -715,7 +813,6 @@ Source code for tyro._argparse_formatter
"""
console = Console(theme=THEME.as_rich_theme())
- self._print_usage_succinct(console)
extra_info: List[RenderableType] = []
global global_unrecognized_args
@@ -724,117 +821,33 @@ Source code for tyro._argparse_formatter
):
global_unrecognized_args = message.partition(":")[2].strip().split(" ")
+ message_title = "Parsing error"
+
if len(global_unrecognized_args) > 0:
+ message_title = "Unrecognized arguments"
message = f"Unrecognized arguments: {' '.join(global_unrecognized_args)}"
- unrecognized_arguments = [
+ unrecognized_arguments = set(
arg
for arg in global_unrecognized_args
# If we pass in `--spell-chekc on`, we only want `spell-chekc` and not
# `on`.
if arg.startswith("--")
- ]
-
- # Argument name => subcommands it came from.
- arguments: List[_ArgumentInfo] = []
- has_subcommands = False
- same_exists = False
-
- def _recursive_arg_search(
- parser_spec: ParserSpecification,
- subcommands: str,
- subcommand_match_score: float,
- ) -> None:
- """Find all possible arguments that could have been passed in."""
-
- # When tyro.conf.ConsolidateSubcommandArgs is turned on, arguments will
- # only appear in the help message for "leaf" subparsers.
- help_flag = (
- " (other subcommands) --help"
- if parser_spec.consolidate_subcommand_args
- and parser_spec.subparsers is not None
- else " --help"
- )
- for arg in parser_spec.args:
- if arg.field.is_positional() or arg.lowered.is_fixed():
- # Skip positional arguments.
- continue
-
- # Skip suppressed arguments.
- if conf.Suppress in arg.field.markers or (
- conf.SuppressFixed in arg.field.markers
- and conf.Fixed in arg.field.markers
- ):
- continue
-
- option_strings = (arg.lowered.name_or_flag,)
-
- # Handle actions, eg BooleanOptionalAction will map ("--flag",) to
- # ("--flag", "--no-flag").
- if (
- arg.lowered.action is not None
- # Actions are sometimes strings in Python 3.7, eg "append".
- # We'll ignore these, but this kind of thing is a good reason
- # for just forking argparse.
- and callable(arg.lowered.action)
- ):
- option_strings = arg.lowered.action(
- option_strings, dest="" # dest should not matter.
- ).option_strings
-
- arguments.append(
- _ArgumentInfo(
- # Currently doesn't handle actions well, eg boolean optional
- # arguments.
- option_strings,
- metavar=arg.lowered.metavar,
- usage_hint=subcommands + help_flag,
- help=arg.lowered.help,
- subcommand_match_score=subcommand_match_score,
- )
- )
-
- # An unrecognized argument.
- nonlocal same_exists
- if (
- not same_exists
- and arg.lowered.name_or_flag in unrecognized_arguments
- ):
- same_exists = True
-
- if parser_spec.subparsers is not None:
- nonlocal has_subcommands
- has_subcommands = True
- for (
- subparser_name,
- subparser,
- ) in parser_spec.subparsers.parser_from_name.items():
- _recursive_arg_search(
- subparser,
- subcommands + " " + subparser_name,
- subcommand_match_score=subcommand_match_score
- + (1 if subparser_name in self._args else -0.001),
- )
-
- _recursive_arg_search(
- self._parser_specification,
- # Remove other subcommands.
- self.prog.split(" ")[0],
- 0,
+ )
+ arguments, has_subcommands, same_exists = recursive_arg_search(
+ args=self._args,
+ parser_spec=self._parser_specification,
+ prog=self.prog.partition(" ")[0],
+ unrecognized_arguments=unrecognized_arguments,
)
if has_subcommands and same_exists:
- misplaced_arguments = message.partition(":")[2].strip()
- message = (
- "unrecognized or misplaced arguments: " + misplaced_arguments
- if " " in misplaced_arguments
- else "unrecognized or misplaced argument: " + misplaced_arguments
- )
+ message = f"Unrecognized or misplaced arguments: {' '.join(global_unrecognized_args)}"
# Show similar arguments for keyword options.
for unrecognized_argument in unrecognized_arguments:
# Sort arguments by similarity.
scored_arguments: List[Tuple[_ArgumentInfo, float]] = []
- for argument in arguments:
+ for arg_info in arguments:
# Compute a score for each argument.
assert unrecognized_argument.startswith("--")
@@ -856,14 +869,14 @@ Source code for tyro._argparse_formatter
).ratio()
scored_arguments.append(
- (argument, max(map(get_score, argument.option_strings)))
+ (arg_info, max(map(get_score, arg_info.option_strings)))
)
# Add information about similar arguments.
prev_arg_option_strings: Optional[Tuple[str, ...]] = None
show_arguments: List[_ArgumentInfo] = []
unique_counter = 0
- for argument, score in (
+ for arg_info, score in (
# Sort scores greatest to least.
sorted(
scored_arguments,
@@ -885,13 +898,13 @@ Source code for tyro._argparse_formatter
if (
score < 0.9
and unique_counter >= 3
- and prev_arg_option_strings != argument.option_strings
+ and prev_arg_option_strings != arg_info.option_strings
):
break
- unique_counter += prev_arg_option_strings != argument.option_strings
+ unique_counter += prev_arg_option_strings != arg_info.option_strings
- show_arguments.append(argument)
- prev_arg_option_strings = argument.option_strings
+ show_arguments.append(arg_info)
+ prev_arg_option_strings = arg_info.option_strings
prev_arg_option_strings = None
prev_argument_help: Optional[str] = None
@@ -907,9 +920,9 @@ Source code for tyro._argparse_formatter
)
unique_counter = 0
- for argument in show_arguments:
+ for arg_info in show_arguments:
same_counter += 1
- if argument.option_strings != prev_arg_option_strings:
+ if arg_info.option_strings != prev_arg_option_strings:
same_counter = 0
if unique_counter >= 10:
break
@@ -920,7 +933,7 @@ Source code for tyro._argparse_formatter
if (
len(show_arguments) >= 8
and same_counter >= 4
- and argument.option_strings == prev_arg_option_strings
+ and arg_info.option_strings == prev_arg_option_strings
):
if not dots_printed:
extra_info.append(
@@ -934,17 +947,17 @@ Source code for tyro._argparse_formatter
if not (
has_subcommands
- and argument.option_strings == prev_arg_option_strings
+ and arg_info.option_strings == prev_arg_option_strings
):
extra_info.append(
Padding(
"[bold]"
+ (
- ", ".join(argument.option_strings)
- if argument.metavar is None
- else ", ".join(argument.option_strings)
+ ", ".join(arg_info.option_strings)
+ if arg_info.metavar is None
+ else ", ".join(arg_info.option_strings)
+ " "
- + argument.metavar
+ + arg_info.metavar
)
+ "[/bold]",
(0, 0, 0, 4),
@@ -958,36 +971,115 @@ Source code for tyro._argparse_formatter
# )
# )
- if argument.help is not None and (
+ if arg_info.help is not None and (
# Only print help messages if it's not the same as the previous
# one.
- argument.help != prev_argument_help
- or argument.option_strings != prev_arg_option_strings
+ arg_info.help != prev_argument_help
+ or arg_info.option_strings != prev_arg_option_strings
):
- extra_info.append(Padding(argument.help, (0, 0, 0, 8)))
+ extra_info.append(Padding(arg_info.help, (0, 0, 0, 8)))
# Show the subcommand that this argument is available in.
if has_subcommands:
extra_info.append(
Padding(
- f"in [green]{argument.usage_hint}[/green]",
+ f"in [green]{arg_info.usage_hint}[/green]",
(0, 0, 0, 12),
)
)
- prev_arg_option_strings = argument.option_strings
- prev_argument_help = argument.help
+ prev_arg_option_strings = arg_info.option_strings
+ prev_argument_help = arg_info.help
+
+ elif message.startswith("the following arguments are required:"):
+ message_title = "Required arguments"
+
+ info_from_required_arg: Dict[str, Optional[_ArgumentInfo]] = {}
+ for arg in message.partition(":")[2].strip().split(", "):
+ info_from_required_arg[arg] = None
+
+ arguments, has_subcommands, same_exists = recursive_arg_search(
+ args=self._args,
+ parser_spec=self._parser_specification,
+ prog=self.prog.partition(" ")[0],
+ unrecognized_arguments=set(),
+ )
+ del same_exists
+
+ for arg_info in arguments:
+ # Iterate over each option string separately. This can help us support
+ # aliases in the future.
+ for option_string in arg_info.option_strings:
+ # If the option string was found...
+ if option_string in info_from_required_arg and (
+ # And it's the first time it was found...
+ info_from_required_arg[option_string] is None
+ # Or we found a better one...
+ or arg_info.subcommand_match_score
+ > info_from_required_arg[option_string].subcommand_match_score # type: ignore
+ ):
+ # Record the argument info.
+ info_from_required_arg[option_string] = arg_info
+
+ # Try to print help text for required arguments.
+ first = True
+ for maybe_arg in info_from_required_arg.values():
+ if maybe_arg is None:
+ # No argument info found. This will currently happen for
+ # subcommands.
+ continue
+
+ if first:
+ extra_info.extend(
+ [
+ Rule(style=Style(color="red")),
+ "Argument helptext:",
+ ]
+ )
+ first = False
+
+ extra_info.append(
+ Padding(
+ "[bold]"
+ + (
+ ", ".join(maybe_arg.option_strings)
+ if maybe_arg.metavar is None
+ else ", ".join(maybe_arg.option_strings)
+ + " "
+ + maybe_arg.metavar
+ )
+ + "[/bold]",
+ (0, 0, 0, 4),
+ )
+ )
+ if maybe_arg.help is not None:
+ extra_info.append(Padding(maybe_arg.help, (0, 0, 0, 8)))
+ if has_subcommands:
+ # We are explicit about where the argument helptext is being
+ # extracted from because the `subcommand_match_score` heuristic
+ # above is flawed.
+ #
+ # The stars really need to be aligned for it to fail, but this makes
+ # sure that if it does fail that it's obvious to the user.
+ extra_info.append(
+ Padding(
+ f"in [green]{maybe_arg.usage_hint}[/green]",
+ (0, 0, 0, 12),
+ )
+ )
- # print(self._parser_specification)
console.print(
Panel(
Group(
f"{message[0].upper() + message[1:]}" if len(message) > 0 else "",
*extra_info,
+ Rule(style=Style(color="red")),
+ f"For full helptext, run [bold]{self.prog} --help[/bold]",
),
- title="[bold]Parsing error[/bold]",
+ title=f"[bold]{message_title}[/bold]",
title_align="left",
border_style=Style(color="bright_red"),
+ expand=False,
)
)
sys.exit(2)
diff --git a/_modules/tyro/_cli/index.html b/_modules/tyro/_cli/index.html
index a61f80a4..afa13970 100644
--- a/_modules/tyro/_cli/index.html
+++ b/_modules/tyro/_cli/index.html
@@ -627,8 +627,8 @@ Source code for tyro._cli
# Print help message when no arguments are passed in. (but arguments are
# expected)
- if len(args) == 0 and parser_spec.has_required_args:
- args = ["--help"]
+ # if len(args) == 0 and parser_spec.has_required_args:
+ # args = ["--help"]
if return_parser:
_arguments.USE_RICH = True
@@ -699,7 +699,6 @@ Source code for tyro._cli
from ._argparse_formatter import THEME
console = Console(theme=THEME.as_rich_theme())
- parser._print_usage_succinct(console)
console.print(
Panel(
Group(
@@ -720,6 +719,8 @@ Source code for tyro._cli
),
pad=(0, 0, 0, 4),
),
+ Rule(style=Style(color="red")),
+ f"For full helptext, see [bold]{parser.prog} --help[/bold]",
]
),
),
diff --git a/_sources/api/tyro/_argparse_formatter/index.rst.txt b/_sources/api/tyro/_argparse_formatter/index.rst.txt
index fb3fcb86..c2a557af 100644
--- a/_sources/api/tyro/_argparse_formatter/index.rst.txt
+++ b/_sources/api/tyro/_argparse_formatter/index.rst.txt
@@ -81,6 +81,21 @@ Module Contents
Set an accent color to use in help messages. Takes any color supported by ``rich``\ ,
see ``python -m rich.color``. Experimental.
+.. py:function:: recursive_arg_search(args: List[str], parser_spec: tyro._parsers.ParserSpecification, prog: str, unrecognized_arguments: Set[str]) -> Tuple[List[_ArgumentInfo], bool, bool]
+
+
+ Recursively search for arguments in a ParserSpecification. Used for error message
+ printing.
+
+ Returns a list of arguments, whether the parser has subcommands or not, and -- if
+ ``unrecognized_arguments`` is passed in --- whether an unrecognized argument exists
+ under a different subparser.
+
+ :param args: Arguments being parsed. Used for heuristics on subcommands.
+ :param parser_spec: Argument parser specification.
+ :param subcommands: Prog corresponding to parser_spec.
+ :param unrecognized_arguments: Used for same_exists return value.
+
.. py:data:: THEME
diff --git a/api/tyro/_argparse_formatter/index.html b/api/tyro/_argparse_formatter/index.html
index 19db0129..fe493a01 100644
--- a/api/tyro/_argparse_formatter/index.html
+++ b/api/tyro/_argparse_formatter/index.html
@@ -335,6 +335,30 @@ Module Contents
+
+tyro._argparse_formatter.recursive_arg_search(args: List[str], parser_spec: tyro._parsers.ParserSpecification, prog: str, unrecognized_arguments: Set[str]) Tuple[List[_ArgumentInfo], bool, bool] [source]#
+Recursively search for arguments in a ParserSpecification. Used for error message
+printing.
+Returns a list of arguments, whether the parser has subcommands or not, and – if
+unrecognized_arguments
is passed in — whether an unrecognized argument exists
+under a different subparser.
+
+- Parameters
+
+args (List[str]) – Arguments being parsed. Used for heuristics on subcommands.
+parser_spec (tyro._parsers.ParserSpecification) – Argument parser specification.
+subcommands – Prog corresponding to parser_spec.
+unrecognized_arguments (Set[str]) – Used for same_exists return value.
+prog (str) –
+
+
+- Return type
+Tuple[List[_ArgumentInfo], bool, bool]
+
+
+
+
-
tyro._argparse_formatter.THEME#
@@ -518,6 +542,7 @@ Module Contentsset_accent_color
+
recursive_arg_search
THEME
monkeypatch_len
ansi_context
diff --git a/examples/02_nesting/03_multiple_subcommands/index.html b/examples/02_nesting/03_multiple_subcommands/index.html
index 2ee552bd..35b8427b 100644
--- a/examples/02_nesting/03_multiple_subcommands/index.html
+++ b/examples/02_nesting/03_multiple_subcommands/index.html
@@ -314,11 +314,11 @@ Sequenced Subcommands
-python 02_nesting/03_multiple_subcommands.pyusage: 03_multiple_subcommands.py [-h] {dataset:mnist,dataset:image-net}
-
-â•â”€ Parsing error ──────────────────────────────────────────────────────────────╮
-│ The following arguments are required: {dataset:mnist,dataset:image-net} │
-╰──────────────────────────────────────────────────────────────────────────────╯
+python 02_nesting/03_multiple_subcommands.pyâ•â”€ Required arguments ────────────────────────────────────────────────────╮
+│ The following arguments are required: {dataset:mnist,dataset:image-net} │
+│ ─────────────────────────────────────────────────────────────────────── │
+│ For full helptext, run 03_multiple_subcommands.py --help │
+╰─────────────────────────────────────────────────────────────────────────╯
python 02_nesting/03_multiple_subcommands.py --helpusage: 03_multiple_subcommands.py [-h] {dataset:mnist,dataset:image-net}
diff --git a/genindex/index.html b/genindex/index.html
index 0d47a032..75bab847 100644
--- a/genindex/index.html
+++ b/genindex/index.html
@@ -797,6 +797,8 @@ P
R
+ - recursive_arg_search() (in module tyro._argparse_formatter)
+
- remove_single_line_breaks() (in module tyro._strings)
- required (tyro._arguments.LoweredArgumentDefinition attribute)
diff --git a/objects.inv b/objects.inv
index efdac430..8401c077 100644
Binary files a/objects.inv and b/objects.inv differ
diff --git a/searchindex.js b/searchindex.js
index 65aee056..0153b670 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"docnames": ["api/tyro/_argparse_formatter/index", "api/tyro/_arguments/index", "api/tyro/_calling/index", "api/tyro/_cli/index", "api/tyro/_deprecated/index", "api/tyro/_docstrings/index", "api/tyro/_fields/index", "api/tyro/_instantiators/index", "api/tyro/_parsers/index", "api/tyro/_resolver/index", "api/tyro/_singleton/index", "api/tyro/_strings/index", "api/tyro/_subcommand_matching/index", "api/tyro/_typing/index", "api/tyro/_unsafe_cache/index", "api/tyro/conf/_confstruct/index", "api/tyro/conf/_markers/index", "api/tyro/conf/index", "api/tyro/extras/_base_configs/index", "api/tyro/extras/_choices_type/index", "api/tyro/extras/_serialization/index", "api/tyro/extras/index", "api/tyro/index", "building_configuration_systems", "examples/01_basics/01_functions", "examples/01_basics/02_dataclasses", "examples/01_basics/03_containers", "examples/01_basics/04_enums", "examples/01_basics/05_flags", "examples/01_basics/06_literals", "examples/01_basics/07_unions", "examples/02_nesting/01_nesting", "examples/02_nesting/02_subcommands", "examples/02_nesting/03_multiple_subcommands", "examples/02_nesting/04_nesting_in_containers", "examples/03_config_systems/01_base_configs", "examples/03_config_systems/02_overriding_yaml", "examples/04_additional/01_positional_args", "examples/04_additional/02_dictionaries", "examples/04_additional/03_tuples", "examples/04_additional/04_classes", "examples/04_additional/05_generics", "examples/04_additional/06_conf", "examples/04_additional/07_flax", "examples/04_additional/08_pydantic", "examples/04_additional/09_attrs", "goals_and_alternatives", "helptext_generation", "index", "installation", "tab_completion", "your_first_cli"], "filenames": ["api/tyro/_argparse_formatter/index.rst", "api/tyro/_arguments/index.rst", "api/tyro/_calling/index.rst", "api/tyro/_cli/index.rst", "api/tyro/_deprecated/index.rst", "api/tyro/_docstrings/index.rst", "api/tyro/_fields/index.rst", "api/tyro/_instantiators/index.rst", "api/tyro/_parsers/index.rst", "api/tyro/_resolver/index.rst", "api/tyro/_singleton/index.rst", "api/tyro/_strings/index.rst", "api/tyro/_subcommand_matching/index.rst", "api/tyro/_typing/index.rst", "api/tyro/_unsafe_cache/index.rst", "api/tyro/conf/_confstruct/index.rst", "api/tyro/conf/_markers/index.rst", "api/tyro/conf/index.rst", "api/tyro/extras/_base_configs/index.rst", "api/tyro/extras/_choices_type/index.rst", "api/tyro/extras/_serialization/index.rst", "api/tyro/extras/index.rst", "api/tyro/index.rst", "building_configuration_systems.md", "examples/01_basics/01_functions.rst", "examples/01_basics/02_dataclasses.rst", "examples/01_basics/03_containers.rst", "examples/01_basics/04_enums.rst", "examples/01_basics/05_flags.rst", "examples/01_basics/06_literals.rst", "examples/01_basics/07_unions.rst", "examples/02_nesting/01_nesting.rst", "examples/02_nesting/02_subcommands.rst", "examples/02_nesting/03_multiple_subcommands.rst", "examples/02_nesting/04_nesting_in_containers.rst", "examples/03_config_systems/01_base_configs.rst", "examples/03_config_systems/02_overriding_yaml.rst", "examples/04_additional/01_positional_args.rst", "examples/04_additional/02_dictionaries.rst", "examples/04_additional/03_tuples.rst", "examples/04_additional/04_classes.rst", "examples/04_additional/05_generics.rst", "examples/04_additional/06_conf.rst", "examples/04_additional/07_flax.rst", "examples/04_additional/08_pydantic.rst", "examples/04_additional/09_attrs.rst", "goals_and_alternatives.md", "helptext_generation.md", "index.md", "installation.md", "tab_completion.md", "your_first_cli.md"], "titles": ["
tyro._argparse_formatter
", "tyro._arguments
", "tyro._calling
", "tyro._cli
", "tyro._deprecated
", "tyro._docstrings
", "tyro._fields
", "tyro._instantiators
", "tyro._parsers
", "tyro._resolver
", "tyro._singleton
", "tyro._strings
", "tyro._subcommand_matching
", "tyro._typing
", "tyro._unsafe_cache
", "tyro.conf._confstruct
", "tyro.conf._markers
", "tyro.conf
", "tyro.extras._base_configs
", "tyro.extras._choices_type
", "tyro.extras._serialization
", "tyro.extras
", "tyro
", "Building configuration systems", "Functions", "Dataclasses", "Containers", "Enums", "Booleans and Flags", "Choices", "Unions", "Hierarchical Configs", "Subcommands", "Sequenced Subcommands", "Nesting in Containers", "Base Configurations", "Overriding YAML Configs", "Positional Arguments", "Overriding Dictionaries", "Tuples", "Instantiating Classes", "Generic Types", "Configuration via typing.Annotated[]", "JAX/Flax Integration", "Pydantic Integration", "Attrs Integration", "Goals and alternatives", "Helptext generation", "tyro", "Installation", "Tab completion", "Your first CLI"], "terms": {"util": [0, 9, 11, 42], "function": [0, 2, 3, 7, 16, 17, 18, 19, 20, 21, 22, 37, 40, 46, 47, 50, 51], "helptext": [0, 3, 5, 6, 11, 15, 16, 17, 18, 21, 22, 25, 37, 39, 44, 45, 46, 48], "format": [0, 46, 47], "we": [0, 1, 3, 6, 9, 16, 17, 18, 19, 20, 21, 27, 29, 32, 34, 35, 40, 46, 48, 50, 51], "replac": 0, "argpars": [0, 1, 2, 3, 7, 8, 21, 22, 25, 46, 51], "s": [0, 1, 3, 7, 9, 21, 22, 23, 34, 45, 46, 49, 50, 51], "simpl": [0, 3, 22, 23, 46, 51], "help": [0, 1, 3, 15, 17, 18, 19, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "messag": [0, 2, 6, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "ones": [0, 9], "ar": [0, 2, 3, 14, 16, 17, 19, 20, 21, 22, 26, 27, 31, 32, 33, 35, 36, 37, 39, 42, 46, 47, 48, 50, 51], "more": [0, 9, 16, 17, 21, 27, 30, 37, 46, 47, 48, 51], "nice": 0, "support": [0, 3, 9, 16, 17, 21, 22, 23, 26, 34, 35, 42, 44, 45, 46, 47, 48, 49, 51], "multipl": [0, 6, 23, 26, 30, 33, 35], "column": 0, "when": [0, 2, 3, 7, 9, 14, 16, 17, 18, 19, 21, 22, 50], "mani": [0, 46], "field": [0, 1, 5, 6, 8, 9, 11, 16, 17, 22, 24, 25, 34, 36, 40, 42, 44, 45, 46, 47, 48], "defin": [0, 1, 8, 18, 21, 35, 37, 46, 47], "us": [0, 2, 3, 5, 6, 7, 9, 11, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 46, 47, 48, 50, 51], "rich": [0, 21], "can": [0, 3, 6, 9, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 38, 39, 40, 42, 43, 46, 47, 48, 50, 51], "theme": 0, "an": [0, 1, 3, 7, 9, 16, 17, 18, 19, 21, 22, 23, 25, 28, 31, 36, 44, 46, 47, 50, 51], "accent": [0, 21], "color": [0, 7, 19, 21, 29, 30, 34, 37, 39], "thi": [0, 2, 5, 9, 15, 16, 17, 18, 19, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 49, 50, 51], "larg": 0, "built": [0, 3, 21, 23, 46, 50], "fuss": 0, "around": [0, 9], "implement": [0, 16, 17, 23, 46], "detail": 0, "extrem": 0, "chaotic": 0, "result": [0, 16, 17, 46], "todo": [0, 6], "current": [0, 9, 34], "should": [0, 3, 6, 9, 16, 17, 18, 19, 20, 21, 22, 25, 39, 42, 44, 45, 46, 50], "robust": [0, 16, 17, 20, 21], "given": [0, 9, 12, 16, 17, 28, 46], "our": [0, 23, 31, 35, 36, 37, 43, 46, 47, 48, 50, 51], "test": [0, 36, 49], "coverag": 0, "unid": 0, "long": [0, 50], "term": [0, 46], "just": [0, 46, 48], "maintain": 0, "own": [0, 50], "fork": 0, "class": [0, 1, 3, 5, 6, 7, 8, 9, 10, 22, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 51], "tyrothem": 0, "sourc": [0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 26, 37, 47, 48, 50], "border": 0, "style": [0, 46, 47], "descript": [0, 3, 5, 8, 15, 17, 18, 21, 22, 25, 39, 44, 45], "invoc": 0, "metavar": [0, 1, 7, 15, 17, 42], "metavar_fix": 0, "helptext_requir": 0, "helptext_default": 0, "as_rich_them": 0, "self": [0, 1, 6, 7, 8, 10, 40, 43], "return": [0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 33, 43, 51], "type": [0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 43, 46, 47, 48, 49, 51], "set_accent_color": [0, 21], "accent_color": [0, 21], "option": [0, 1, 3, 5, 6, 7, 8, 9, 12, 15, 16, 17, 19, 21, 22, 28, 30, 31, 47, 50], "str": [0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 15, 17, 18, 19, 20, 21, 22, 24, 25, 30, 32, 34, 36, 38, 40, 41, 42, 44, 45, 47], "none": [0, 1, 3, 6, 7, 8, 9, 14, 15, 16, 17, 21, 22, 24, 28, 30, 31, 32, 33, 37, 38, 43, 47, 51], "set": [0, 1, 2, 3, 7, 8, 16, 17, 18, 19, 21, 22, 26, 28, 29, 31, 33, 38, 46, 50], "take": [0, 1, 9, 21, 46], "ani": [0, 1, 2, 6, 7, 8, 9, 12, 14, 15, 16, 17, 20, 21, 22, 46, 50], "see": [0, 21, 23, 28, 32, 37, 47], "python": [0, 1, 6, 16, 17, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51], "m": [0, 21, 49], "experiment": [0, 21], "paramet": [0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 35], "monkeypatch_len": 0, "obj": [0, 14], "int": [0, 1, 3, 7, 9, 14, 15, 16, 17, 22, 24, 25, 26, 30, 31, 34, 35, 36, 39, 40, 41, 42, 43, 44, 45, 46, 47, 51], "ansi_context": 0, "gener": [0, 1, 3, 5, 6, 7, 8, 9, 16, 17, 18, 19, 20, 21, 22, 27, 37, 40, 42, 46, 48, 50], "context": 0, "work": [0, 11, 29, 30, 46, 48, 51], "ansi": 0, "code": [0, 9, 20, 21, 47, 48, 50], "appli": [0, 1, 7, 8, 9, 16, 17, 18, 19, 21], "temporari": 0, "monkei": 0, "patch": 0, "make": [0, 6, 14, 16, 17, 31, 35, 48, 50, 51], "ignor": [0, 5, 9, 11, 43], "wrap": 0, "usag": [0, 15, 17, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], "text": [0, 3, 11, 22], "enabl": [0, 16, 17, 20, 21, 35], "window": 0, "via": [0, 3, 5, 16, 17, 20, 21, 22, 23, 34, 35, 46, 47, 49, 50], "colorama": 0, "str_from_rich": 0, "render": 0, "consol": 0, "renderabletyp": 0, "width": [0, 26], "soft_wrap": 0, "bool": [0, 1, 6, 7, 8, 9, 15, 16, 17, 18, 21, 28, 31, 32, 33, 37, 40, 42], "fals": [0, 1, 3, 16, 17, 22, 28, 31, 32, 33, 37, 38, 40, 42], "global_unrecognized_arg": 0, "list": [0, 1, 3, 6, 7, 8, 9, 16, 17, 22, 26, 46, 47], "tyroargumentpars": 0, "arg": [0, 2, 3, 7, 8, 10, 15, 16, 17, 22, 24, 25, 28, 29, 30, 31, 33, 34, 37, 40, 41, 42, 43, 44, 45, 47, 51], "kwarg": 0, "base": [0, 1, 2, 5, 6, 7, 22, 27, 31, 37, 46, 51], "argumentpars": [0, 1, 3, 8, 21, 22, 51], "object": [0, 3, 6, 14, 15, 17, 20, 21, 22, 23, 31, 37, 48, 51], "pars": [0, 3, 5, 7, 9, 16, 17, 22, 23, 33, 34, 37, 41, 42, 46, 47, 48, 51], "command": [0, 16, 17, 23, 32, 37, 42, 46, 48, 50, 51], "line": [0, 11, 23, 37, 42, 46, 47, 48, 50, 51], "string": [0, 3, 7, 9, 11, 20, 21, 22, 24, 25, 29, 30, 40, 42, 45, 46, 47], "keyword": [0, 16, 17], "argument": [0, 1, 2, 3, 6, 8, 9, 14, 15, 16, 17, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "default": [0, 1, 3, 6, 9, 12, 15, 16, 17, 18, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 50, 51], "A": [0, 6, 7, 9, 16, 17, 18, 19, 21, 24, 25, 40, 42, 45, 46, 47, 50, 51], "os": 0, "path": [0, 3, 22, 26, 31, 37, 50], "basenam": 0, "sy": [0, 23, 51], "argv": [0, 23, 51], "0": [0, 7, 16, 17, 27, 30, 31, 33, 34, 35, 36, 37, 38, 39], "auto": [0, 27, 29, 30, 31, 37, 46], "from": [0, 1, 2, 3, 6, 7, 8, 9, 16, 17, 18, 19, 20, 21, 22, 24, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 50, 51], "doe": 0, "what": [0, 8, 32, 37, 42], "program": [0, 3, 22], "epilog": 0, "follow": [0, 33], "one": [0, 9, 23, 35, 46, 48, 50], "parent": [0, 11], "parser": [0, 1, 3, 8, 22, 27, 46, 51], "whose": [0, 24, 47], "copi": [0, 34], "formatter_class": 0, "helpformatt": 0, "print": [0, 3, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 47, 50, 51], "argument_default": 0, "The": [0, 3, 6, 7, 16, 17, 18, 19, 21, 22, 25, 33, 42, 46, 50, 51], "valu": [0, 1, 2, 3, 6, 9, 16, 17, 19, 21, 22, 24, 25, 28, 34, 35, 36, 39, 46, 47, 48], "all": [0, 1, 16, 17, 26, 31, 32, 35, 38, 46, 47, 49], "contain": [0, 1, 8, 9, 17, 21, 39, 42, 46], "fromfile_prefix_char": 0, "charact": 0, "prefix": [0, 8, 11, 15, 16, 17, 18, 21, 50], "file": [0, 3, 22, 23, 35, 36, 46, 48, 50], "addit": [0, 40, 44, 45, 47], "conflict": 0, "conflict_handl": 0, "indic": 0, "how": [0, 47], "handl": [0, 9, 27], "add_help": 0, "add": [0, 1, 50, 51], "h": [0, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "unambigu": [0, 46], "allow_abbrev": 0, "allow": [0, 15, 17, 29, 30, 46], "abbrevi": 0, "exit_on_error": 0, "determin": [0, 6, 8], "whether": [0, 6, 15, 17, 18, 21], "exit": [0, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "error": [0, 9, 33], "info": 0, "occur": 0, "noreturn": 0, "improv": 0, "incorpor": [0, 51], "stderr": 0, "If": [0, 1, 3, 9, 16, 17, 22, 23, 36, 43, 47, 49], "you": [0, 23, 36, 43, 46, 48, 49], "overrid": [0, 15, 17, 23, 35, 46], "subclass": [0, 38], "either": [0, 16, 17, 28, 34, 35, 38, 50], "rais": [0, 2, 7, 9, 22], "except": [0, 2, 7, 22], "tyroargparsehelpformatt": 0, "prog": [0, 3, 21, 22], "rawdescriptionhelpformatt": 0, "formatt": 0, "which": [0, 3, 6, 7, 9, 12, 18, 20, 21, 22, 46, 48, 50], "retain": 0, "onli": [0, 9, 14, 37, 46], "name": [0, 3, 6, 8, 11, 15, 17, 18, 21, 22, 36, 39, 42, 50], "consid": [0, 15, 17, 51], "public": [0, 3, 46], "api": [0, 3, 21, 46], "method": [0, 1], "provid": [0, 3, 16, 17, 22, 34, 51], "py": [0, 1, 2, 6, 8, 16, 17, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 50], "add_argu": [0, 1, 51], "action": [0, 1, 7, 16, 17], "format_help": 0, "rule": 1, "high": 1, "level": [1, 46], "definit": [1, 6, 8, 46, 48, 51], "lower": 1, "them": [1, 16, 17, 29, 36, 46, 50], "input": [1, 3, 6, 9, 18, 19, 21, 22, 29, 30, 38, 51], "cached_properti": 1, "booleanoptionalact": 1, "option_str": 1, "sequenc": [1, 3, 7, 11, 16, 17, 22, 26], "dest": [1, 37], "_t": 1, "callabl": [1, 2, 3, 5, 6, 7, 8, 9, 14, 16, 17, 21, 22, 35, 46, 48], "filetyp": 1, "choic": [1, 7, 19, 21, 46], "iter": [1, 19, 21, 43], "requir": [1, 6, 8, 9, 22, 24, 25, 26, 28, 31, 32, 33, 34, 37, 40, 41, 42, 43, 44, 45, 46, 49, 50, 51], "tupl": [1, 2, 3, 6, 7, 8, 9, 16, 17, 22, 26, 30, 33, 34, 35, 37, 38, 46], "adapt": 1, "http": [1, 9], "github": [1, 9, 49], "com": [1, 9, 49], "cpython": 1, "pull": [1, 6], "27672": 1, "__call__": [1, 43], "namespac": [1, 2, 25, 46, 48], "format_usag": 1, "argumentdefinit": [1, 2, 8], "structur": [1, 3, 7, 8, 9, 16, 17, 22, 31, 34, 39, 46, 48, 51], "everyth": 1, "need": [1, 23, 34, 38, 50], "attribut": [1, 2, 6, 8, 43, 47], "dest_prefix": 1, "annot": [1, 2, 3, 6, 7, 8, 9, 15, 16, 17, 18, 19, 21, 22, 26, 27, 32, 33, 34, 37, 38, 46, 47, 48, 51], "name_prefix": 1, "subcommand_prefix": [1, 8], "_field": [1, 2, 8], "fielddefinit": [1, 6, 8], "type_from_typevar": [1, 6, 7, 8, 9], "dict": [1, 2, 3, 6, 7, 8, 9, 12, 22, 26, 34, 36, 38], "typevar": [1, 6, 7, 8, 9, 41], "_type": [1, 3, 6, 7, 8, 9, 18, 19, 21, 22], "typeform": [1, 3, 6, 7, 8, 9, 18, 19, 21, 22], "union": [1, 2, 3, 6, 7, 8, 9, 15, 16, 17, 18, 20, 21, 22, 32, 33, 46, 51], "_argumentgroup": 1, "properti": [1, 42], "loweredargumentdefinit": 1, "meant": [1, 46], "pass": [1, 3, 6, 9, 18, 19, 21, 22, 23, 28, 32, 34, 50], "directli": [1, 16, 17, 19, 21, 32, 34, 43, 50, 51], "instanti": [1, 2, 3, 7, 9, 20, 21, 22, 25, 39, 43, 51], "_instanti": 1, "name_or_flag": 1, "narg": [1, 7], "is_fix": 1, "even": 1, "after": [1, 16, 17], "transform": 1, "mean": [1, 2, 16, 17, 46], "don": [1, 9, 14, 34, 46], "t": [1, 2, 3, 5, 7, 8, 9, 14, 16, 17, 18, 19, 21, 22, 26, 30, 34, 42, 46, 50], "have": [1, 3, 16, 17, 22, 23, 36, 46, 50], "valid": 1, "mark": [1, 6, 16, 17, 22, 37], "fix": [1, 16, 17, 26, 29, 34, 35, 42], "alwai": [1, 9], "equal": 1, "use_rich": 1, "true": [1, 3, 6, 15, 16, 17, 18, 21, 22, 26, 27, 28, 29, 30, 31, 32, 33, 35, 37, 41, 42, 47, 51], "core": [2, 3, 21, 22, 46, 48], "call": [2, 3, 6, 22, 51], "specifi": [2, 3, 5, 6, 7, 9, 22, 30, 34, 35, 38, 46, 51], "instantiationerror": 2, "fail": [2, 9], "typic": [2, 23, 31, 46, 49, 50], "cli": [2, 3, 6, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50], "invalid": 2, "_argument": [2, 8], "call_from_arg": 2, "f": [2, 3, 5, 6, 8, 21, 22, 31, 37, 43], "ellipsi": [2, 3, 6, 8, 9, 21, 22], "parser_definit": 2, "_parser": 2, "parserspecif": [2, 8], "default_inst": [2, 6, 8, 9, 22], "nonpropagatingmissingtyp": [2, 6, 8], "value_from_prefixed_field_nam": 2, "field_name_prefix": 2, "dictionari": [2, 3, 16, 17, 18, 21, 22, 36, 46, 48], "output": [2, 3, 22, 25, 43, 51], "outt": [3, 21, 22], "return_unknown_arg": [3, 22], "typing_extens": [3, 7, 22, 42], "liter": [3, 7, 19, 21, 22, 29, 30, 33, 35, 46], "popul": [3, 5, 22, 24, 32, 33, 47, 48, 51], "automat": [3, 5, 16, 17, 22, 28, 47, 48, 50], "interfac": [3, 8, 16, 17, 21, 22, 23, 24, 37, 42, 46, 47, 48, 50, 51], "note": [3, 5, 16, 17, 22, 32, 34, 35, 36, 37, 50], "instanc": [3, 9, 18, 20, 21, 22, 23, 25, 51], "docstr": [3, 5, 22, 37, 46, 47, 48, 51], "broad": [3, 22, 51], "rang": [3, 22, 43, 48, 51], "nativ": [3, 22], "accept": [3, 22], "float": [3, 7, 22, 27, 31, 33, 35, 36, 37, 38, 41], "pathlib": [3, 22, 26, 31, 37], "etc": [3, 16, 17, 18, 19, 20, 21, 22, 26, 33], "boolean": [3, 16, 17, 22, 40, 42], "convert": [3, 7, 9, 22, 28, 36, 37], "flag": [3, 16, 17, 21, 22, 40, 42, 50], "enum": [3, 7, 20, 22, 29, 30, 31, 37], "variou": [3, 22, 31], "standard": [3, 15, 17, 22, 26, 34, 38, 40, 44, 45, 46, 48, 51], "librari": [3, 22, 23, 35, 36, 46, 48], "some": [3, 6, 7, 8, 22, 26], "exampl": [3, 7, 9, 16, 17, 18, 21, 22, 23, 26, 29, 33, 34, 39, 41, 46, 47, 48, 50, 51], "classvar": [3, 22], "k": [3, 22, 38], "v": [3, 22, 38], "t1": [3, 22, 26], "t2": [3, 22, 26], "t3": [3, 22], "final": [3, 22], "nest": [3, 6, 9, 11, 15, 16, 17, 22, 30, 31, 32, 33, 36, 39, 46, 51], "combin": [3, 22], "abov": [3, 22, 28, 51], "hierarch": [3, 22, 48], "dataclass": [3, 5, 6, 9, 16, 17, 20, 21, 22, 23, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 40, 41, 42, 44, 45, 46, 48, 51], "typeddict": [3, 22, 38], "namedtupl": [3, 22, 39], "over": [3, 9, 16, 17, 22, 29, 30, 32, 33, 46, 51], "subpars": [3, 8, 22], "includ": [3, 9, 16, 17, 22, 46, 48], "complet": [3, 21, 22, 23, 46, 48, 51], "script": [3, 22, 33, 48, 50, 51], "interact": [3, 22, 50], "shell": [3, 22, 50], "also": [3, 9, 16, 17, 20, 21, 22, 26, 29, 30, 32, 35, 36, 40, 44, 45, 46, 47], "To": [3, 16, 17, 22, 28, 48, 50], "write": [3, 21, 22, 46, 50, 51], "tab": [3, 21, 22, 23, 48, 51], "bash": [3, 22, 48], "zsh": [3, 22, 48], "tcsh": [3, 22, 48, 50], "mirror": [3, 22], "displai": [3, 22], "instead": [3, 16, 17, 22], "commandlin": [3, 6, 22, 34, 35], "parse_arg": [3, 22, 51], "like": [3, 9, 16, 17, 21, 22, 23, 27, 46, 48], "merg": [3, 22], "load": [3, 20, 21, 22, 23, 26, 33, 36, 50], "elsewher": [3, 22], "config": [3, 18, 21, 22, 23, 26, 27, 35, 46, 51], "yaml": [3, 20, 21, 22, 23, 35, 46, 48], "unknown": [3, 22], "parse_known_arg": [3, 22], "two": [3, 7, 9, 15, 16, 17, 22, 39, 46, 47, 51], "equival": [3, 22, 30], "get_pars": [3, 21], "get": [3, 5, 9, 21, 48, 51], "under": [3, 21, 47], "hood": [3, 21, 47], "tool": [3, 21, 48, 51], "sphinx": [3, 21], "argcomplet": [3, 21], "For": [3, 9, 18, 21, 23, 32, 37, 46, 47, 50, 51], "recommend": [3, 18, 19, 21, 48, 49], "helper": [5, 7, 9, 17, 20, 21], "get_class_tokenization_with_field": 5, "cl": [5, 9, 11, 20, 21], "field_nam": 5, "_classtoken": 5, "get_field_docstr": 5, "get_callable_descript": 5, "associ": 5, "doc": 5, "abstract": 6, "out": [6, 9, 14, 31, 46, 51], "typ": [6, 7, 9], "marker": [6, 7, 16, 17], "frozenset": [6, 7], "conf": [6, 7, 12, 18, 21, 22, 28, 32, 33, 37, 42], "_marker": [6, 7], "argconf": 6, "_confstruct": [6, 12], "_argconfigur": 6, "call_argnam": 6, "__post_init__": 6, "static": [6, 8, 18, 19, 21, 42, 46, 48, 51], "call_argname_overrid": 6, "add_mark": 6, "is_posit": 6, "posit": [6, 16, 17, 23, 42, 46], "is_positional_cal": 6, "underli": 6, "propagatingmissingtyp": [6, 8], "_singleton": 6, "singleton": [6, 10], "excludefromcalltyp": 6, "missing_prop": 6, "missing_nonprop": [6, 15, 17], "exclude_from_cal": 6, "miss": [6, 20, 22, 35], "sentinel": [6, 22], "missing_singleton": 6, "unsupportednestedtypemessag": 6, "reason": 6, "why": 6, "cannot": 6, "treat": [6, 51], "is_nested_typ": 6, "defaultinst": 6, "where": [6, 7, 16, 17, 31, 50], "singl": [6, 8, 11], "broken": [6, 46], "down": 6, "eg": [6, 9, 46], "come": 6, "up": [6, 16, 17, 25, 39, 44, 45, 47, 50], "better": 6, "than": [6, 46, 47, 51], "littl": 6, "bit": 6, "mislead": 6, "field_list_from_cal": 6, "correspond": [6, 12, 47], "resolv": [6, 9], "pydant": [6, 48], "attr": [6, 48], "recurs": [7, 16, 17], "map": [7, 9, 12, 18, 21, 34], "desir": 7, "lambda": [7, 45], "x": [7, 11, 15, 16, 17, 39, 41, 43, 50], "zip": 7, "literalaltern": 7, "nonetyp": 7, "instantiatormetadata": 7, "append": [7, 16, 17], "check_choic": 7, "unsupportedtypeannotationerror": [7, 22], "unsupport": [7, 9, 22], "detect": [7, 22], "is_type_string_convert": 7, "check": [7, 35, 46, 48, 49, 51], "i": [7, 43, 50], "e": [7, 49], "instantiator_from_typ": 7, "thing": [7, 46], "latter": 7, "metadata": [7, 15, 17, 46], "each": [8, 15, 16, 17, 31, 35, 47], "helptext_from_nested_class_field_nam": 8, "subparsersspecif": 8, "subparsers_from_prefix": 8, "has_required_arg": 8, "consolidate_subcommand_arg": 8, "from_callable_or_typ": 8, "parent_class": 8, "creat": [8, 15, 16, 17, 35, 46], "apply_arg": 8, "handle_field": 8, "do": [8, 9, 37], "parser_from_nam": 8, "from_field": 8, "parent_pars": 8, "add_subparsers_to_leav": 8, "root": [8, 16, 17], "leaf": 8, "none_proxi": 8, "forward": 9, "refer": [9, 20, 21, 51], "typeorcal": 9, "unwrap_origin_strip_extra": 9, "origin": 9, "exist": [9, 31, 35, 36, 38, 46], "otherwis": [9, 16, 17], "is_dataclass": 9, "same": [9, 11, 28, 51], "alias": 9, "resolve_generic_typ": 9, "op": 9, "alia": 9, "concret": [9, 23, 46], "resolved_field": 9, "similar": [9, 35, 46], "initvar": 9, "is_namedtupl": 9, "type_from_typevar_constraint": 9, "try": 9, "bound": 9, "constraint": 9, "ident": 9, "unsuccess": 9, "narrow_typ": 9, "narrow": 9, "anim": 9, "cat": 9, "individu": 9, "want": [9, 16, 17, 36], "narrow_container_typ": 9, "infer": [9, 34], "metadatatyp": 9, "unwrap_annot": 9, "search_typ": 9, "1": [9, 11, 16, 17, 27, 30, 31, 34, 37, 39, 43, 46, 47, 50, 51], "apply_type_from_typevar": 9, "narrow_union_typ": 9, "shim": 9, "gracefulli": 9, "re": [9, 20, 21, 48, 49], "doesn": [9, 50], "match": [9, 50], "b": [9, 15, 17, 28, 34, 37, 39, 41, 51], "mix": [9, 29, 46], "non": 9, "warn": 9, "loos": 9, "motiv": 9, "brentyi": [9, 49], "issu": [9, 51], "20": 9, "nesteda": 9, "nestedb": 9, "subcommand": [9, 12, 15, 16, 17, 18, 21, 35, 46, 51], "strip": [9, 36], "5": [9, 25, 37, 42, 44, 45, 46], "hack": 9, "fact": 9, "somedataclass": 9, "futur": [9, 20, 21], "big": [9, 18, 21, 35], "refactor": [9, 20, 21, 51], "init": 10, "kwd": 10, "constant": 11, "dummy_field_nam": 11, "__tyro_dummy_field__": 11, "make_field_nam": 11, "part": [11, 46], "join": 11, "togeth": 11, "parent_1": 11, "child": 11, "_child_nod": 11, "_child": 11, "node": 11, "make_subparser_dest": 11, "dedent": 11, "textwrap": 11, "first": [11, 50], "hyphen_separated_from_camel_cas": 11, "subparser_name_from_typ": 11, "strip_ansi_sequ": 11, "multi_metavar_from_singl": 11, "remove_single_line_break": 11, "match_subcommand": 12, "subcommand_config_from_nam": 12, "_subcommandconfigur": 12, "subcommand_type_from_nam": 12, "callabletyp": [14, 16, 17], "clear_cach": 14, "unsafe_cach": 14, "maxsiz": 14, "cach": 14, "decor": [14, 16, 17, 46], "reli": 14, "id": [14, 35, 41, 48, 51], "unhash": 14, "veri": 14, "strong": [14, 48], "assumpt": 14, "immut": 14, "go": [14, 50], "scope": 14, "unsafe_hash": 14, "prefix_nam": [15, 17, 18, 21], "configur": [15, 16, 17, 20, 21, 31, 32, 33, 36, 37, 48, 51], "aesthet": [15, 17], "approach": [15, 17, 46, 51], "nestedtypea": [15, 16, 17], "nestedtypeb": [15, 16, 17], "c": [15, 17, 41], "d": [15, 17], "positionalrequiredarg": [16, 17], "without": [16, 17, 23, 46, 50], "prevent": [16, 17], "suppress": [16, 17], "show": [16, 17, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "suppressfix": [16, 17], "hide": [16, 17], "manual": [16, 17, 23, 42, 51], "flagconversionoff": [16, 17, 28, 42], "turn": [16, 17, 28, 42], "off": [16, 17, 28, 42], "convers": [16, 17, 28, 42], "expect": [16, 17, 28], "explicit": [16, 17, 20, 21, 28, 51], "avoidsubcommand": [16, 17], "avoid": [16, 17, 46], "simplifi": [16, 17], "less": [16, 17], "express": [16, 17, 32, 42], "consolidatesubcommandarg": [16, 17, 33], "consolid": [16, 17], "sensit": [16, 17], "order": [16, 17], "cost": [16, 17], "By": [16, 17, 48, 51], "tradit": [16, 17], "preced": [16, 17, 47], "s1": [16, 17], "s2": [16, 17], "frustrat": [16, 17], "becaus": [16, 17], "exact": [16, 17], "push": [16, 17], "end": [16, 17, 37, 46, 47], "reorder": [16, 17], "ensur": [16, 17], "new": [16, 17], "simpli": [16, 17, 50], "place": [16, 17], "omitsubcommandprefix": [16, 17], "shorter": [16, 17], "omit": [16, 17, 28], "specif": [16, 17, 46, 51], "portion": [16, 17], "cmd": [16, 17, 32], "mai": [16, 17, 20, 21], "would": [16, 17], "omitargprefix": [16, 17], "nestedtyp": [16, 17], "useappendact": [16, 17], "variabl": [16, 17, 23, 26, 34, 36, 46, 51], "length": [16, 17, 26, 34, 46, 51], "2": [16, 17, 27, 30, 31, 37, 46, 47, 50, 51], "syntax": [16, 17, 46], "user": [16, 17, 46], "friendli": [16, 17], "ambigu": [16, 17], "straightforward": [16, 17, 46], "applic": [16, 17, 46], "well": [16, 17, 26, 47, 48], "main": [16, 17, 24, 32, 37, 38, 47], "def": [16, 17, 24, 31, 32, 33, 37, 38, 40, 43, 47, 48, 51], "submodul": [17, 21], "attach": 17, "pep": [17, 47], "593": 17, "runtim": [17, 18, 19, 21], "subscript": 17, "featur": [17, 20, 21, 42, 46, 51], "here": [17, 21, 35, 42, 50], "unnecessari": [17, 42], "sparingli": [17, 42], "subcommand_type_from_default": [18, 21, 35], "construct": [18, 20, 21], "choos": [18, 19, 21, 33, 46], "between": [18, 20, 21, 31, 33, 36, 46], "small": [18, 21, 35], "direct": [18, 21, 46], "prefer": [18, 19, 21, 46], "succinct": [18, 21, 47], "safe": [18, 19, 20, 21], "analysi": [18, 19, 21, 51], "type_check": [18, 19, 21], "guard": [18, 19, 21], "import": [18, 19, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 51], "seen": [18, 19, 21], "languag": [18, 19, 21, 48], "server": [18, 19, 21, 48], "checker": [18, 19, 21], "selectableconfig": [18, 21], "els": [18, 19, 21], "conttain": [18, 21], "literal_type_from_choic": [19, 21], "constrain": [19, 21], "dynam": [19, 21, 23, 34, 46, 48], "red": [19, 21, 29, 30, 34, 37], "green": [19, 21, 29, 30, 34], "blue": [19, 21, 29, 30, 34], "human": [20, 21], "readabl": [20, 21], "serial": [20, 21, 46], "enum_yaml_tag_prefix": 20, "dataclass_yaml_tag_prefix": 20, "missing_yaml_tag_prefix": 20, "dataclasstyp": [20, 21], "from_yaml": [20, 21], "stream": [20, 21], "io": [20, 21], "byte": [20, 21], "compat": [20, 21, 51], "to_yaml": [20, 21], "As": [20, 21, 47], "secondari": [20, 21], "aim": [20, 21, 46], "case": [20, 21, 24, 46], "introduc": [20, 21], "attempt": [20, 21], "strike": [20, 21], "balanc": [20, 21], "flexibl": [20, 21], "contrast": [20, 21, 46, 50], "naiv": [20, 21], "dump": [20, 21], "pickl": [20, 21], "pyyaml": [20, 21], "custom": [20, 21, 46], "tag": [20, 21], "against": [20, 21], "reorgan": [20, 21], "while": [20, 21], "backend": [20, 21], "arbitrari": [20, 21], "stabl": [20, 21], "deprec": [20, 21], "It": [20, 21], "remov": [20, 21, 48], "version": [20, 21, 33], "reconstruct": [20, 21], "read": [20, 21], "deseri": [20, 21], "complement": 21, "compar": [21, 46], "chang": [21, 32, 42], "extra": [22, 35], "beyond": [23, 32, 42], "tyro": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51], "design": 23, "scale": 23, "larger": [23, 31, 51], "those": 23, "hydra": [23, 35, 46], "live": 23, "nerfstudio": 23, "notabl": 23, "entir": 23, "ha": [23, 51], "full": [23, 46], "your": [23, 50], "termin": 23, "select": [23, 35, 36, 51], "might": [23, 46], "environ": [23, 36], "manag": [23, 51], "document": [23, 48, 50], "In": [24, 26, 40, 44, 45, 46, 47, 50], "simplest": 24, "run": [24, 35, 49, 50], "field1": [24, 25, 40, 44, 45, 47], "field2": [24, 25, 40, 44, 45, 47], "3": [24, 25, 26, 30, 33, 35, 44, 46, 47, 49, 50, 51], "numer": [24, 25, 40, 42, 47], "__name__": [24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "__main__": [24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "01_basic": [24, 25, 26, 27, 28, 29, 30], "01_function": [24, 50], "hello": [24, 25, 32, 40, 42, 44, 45], "10": [24, 43], "common": [25, 35], "pattern": [25, 35, 50, 51], "altern": 25, "02_dataclass": 25, "both": [26, 51], "9": [26, 33, 35, 38, 46], "frozen": [26, 27, 29, 30, 32, 35, 37, 41], "trainconfig": [26, 27], "dataset_sourc": 26, "train": [26, 31, 33, 35, 36, 43], "data": [26, 40], "okai": 26, "image_dimens": 26, "32": [26, 31, 35, 36, 43], "height": 26, "imag": [26, 33], "03_contain": 26, "dataset": [26, 33, 35], "dimens": 26, "16": 26, "posixpath": [26, 31, 37], "advanc": [27, 51], "optimizertyp": [27, 31, 37], "adam": [27, 31, 33, 36, 37], "sgd": [27, 31, 33, 37], "seamlessli": [27, 48], "optimizer_typ": 27, "gradient": [27, 31, 37], "optim": [27, 31, 33, 35, 36, 37], "learning_r": [27, 31, 33, 35, 36, 37, 38], "1e": [27, 31, 33, 35, 37], "4": [27, 31, 33, 35, 37, 38, 43, 46], "learn": [27, 31, 33, 35, 36, 37, 38, 46], "rate": [27, 31, 33, 35, 36, 37, 38], "04_enum": 27, "0001": [27, 36], "3e": [27, 31, 33, 37, 38], "0003": [27, 31, 33, 37, 38], "explicitli": 28, "optional_boolean": 28, "flag_a": 28, "flag_b": 28, "05_flag": 28, "restrict": 29, "Or": [29, 51], "other": [29, 30, 46, 48], "06_liter": 29, "expand": 30, "union_over_typ": 30, "string_or_enum": 30, "complex": 30, "union_over_tupl": 30, "And": [30, 50, 51], "tuple_of_string_or_enum": 30, "integ": [30, 44, 45, 47], "07_union": 30, "build": [31, 46, 48], "modular": [31, 48], "group": [31, 47], "project": [31, 46, 51], "optimizerconfig": [31, 37], "algorithm": [31, 37], "coeffici": [31, 37], "l2": [31, 37], "regular": [31, 37], "weight_decai": [31, 37], "experimentconfig": [31, 35], "batch": [31, 35, 36], "size": [31, 35, 36], "batch_siz": [31, 35, 36], "total": [31, 35, 38, 51], "number": [31, 35, 43, 51], "step": [31, 35, 36], "train_step": [31, 35], "100_000": [31, 35], "random": [31, 35], "seed": [31, 35], "sure": [31, 35], "experi": [31, 35, 46], "reproduc": [31, 35], "out_dir": 31, "restore_checkpoint": 31, "checkpoint_interv": 31, "1000": [31, 33, 36, 43], "model": [31, 35, 43, 44], "save": [31, 46], "log": 31, "checkpoint": [31, 36], "restor": 31, "02_nest": [31, 32, 33, 34], "01_nest": 31, "dir": 31, "weight": [31, 37], "decai": [31, 37], "interv": 31, "01": [31, 37], "100000": [31, 35], "__future__": [32, 33, 37], "checkout": 32, "branch": 32, "commit": 32, "understood": 32, "pyright": [32, 48], "unfortun": 32, "mypi": [32, 48, 49], "02_subcommand": 32, "seri": 33, "possibl": [33, 35], "mnist": [33, 35], "binari": 33, "imagenet": [33, 35], "subset": 33, "50": [33, 35], "100": 33, "beta": [33, 35, 38], "999": [33, 35, 38], "03_multiple_subcommand": 33, "net": 33, "001": [33, 35], "insid": 34, "must": [34, 50], "rgb": [34, 37], "r": [34, 36, 39], "g": [34, 39], "hsl": 34, "l": 34, "color_tupl": 34, "These": [34, 46, 47], "color_tuple_alt": 34, "255": [34, 39], "color_map": 34, "mutabl": 34, "default_factori": 34, "04_nesting_in_contain": 34, "alt": 34, "integr": [35, 46], "fill": 35, "torch": 35, "nn": [35, 43], "adamoptim": 35, "num_lay": 35, "unit": [35, 43], "activ": 35, "Not": [35, 46], "modul": [35, 42, 43, 48], "could": [35, 36], "separ": 35, "config_path": 35, "config_nam": 35, "stai": 35, "seamless": 35, "2048": 35, "64": 35, "30_000": 35, "relu": [35, 43], "8": [35, 46], "256": 35, "gelu": 35, "03_config_system": [35, 36], "01_base_config": 35, "num": [35, 36, 43], "layer": [35, 43], "30000": 35, "94720": 35, "easi": [36, 48, 51], "wai": [36, 46, 49], "differ": [36, 46], "default_yaml": 36, "exp_nam": 36, "num_step": 36, "10000": 36, "checkpoint_step": 36, "500": 36, "1500": 36, "default_config": 36, "safe_load": 36, "overridden_config": 36, "overridden": [36, 42], "overridden_yaml": 36, "safe_dump": 36, "02_overriding_yaml": 36, "exp": 36, "300": 36, "9000": 36, "forc": 37, "verbos": 37, "background_rgb": 37, "signatur": 37, "destin": 37, "prompt": 37, "befor": 37, "overwrit": 37, "explain": 37, "being": [37, 47, 50], "done": 37, "background": 37, "n": 37, "04_addit": [37, 38, 39, 40, 41, 42, 43, 44, 45], "01_positional_arg": 37, "05": 37, "dictionaryschema": 38, "kei": 38, "typed_dict": 38, "standard_dict": 38, "beta1": 38, "beta2": 38, "assert": [38, 39], "isinst": [38, 39], "02_dictionari": 38, "unset": 38, "interpret": 39, "tupletyp": 39, "raw": 39, "two_color": 39, "03_tupl": 39, "127": 39, "constructor": 40, "__init__": 40, "04_class": 40, "7": [40, 46, 49], "scalartyp": 41, "shapetyp": 41, "point3": 41, "y": 41, "z": 41, "frame_id": 41, "triangl": 41, "shape": 41, "05_gener": 41, "frame": 41, "renam": [42, 48, 51], "06_conf": 42, "linen": [43, 48], "numpi": 43, "jnp": 43, "classifi": 43, "network": 43, "hidden": 43, "count": 43, "output_dim": 43, "compact": 43, "ndarrai": 43, "dens": 43, "kernel_init": 43, "initi": [43, 50], "kaiming_norm": 43, "xavier_norm": 43, "sigmoid": 43, "num_iter": 43, "07_flax": 43, "dim": 43, "basemodel": 44, "08_pydant": 44, "ib": 45, "factori": 45, "09_attr": 45, "overlap": 46, "significantli": 46, "offer": 46, "distinct": 46, "One": 46, "uninvas": 46, "reduc": 46, "expans": 46, "behavior": [46, 51], "strict": 46, "box": [46, 51], "isn": 46, "analyz": 46, "depend": [46, 48], "accessor": 46, "noncomprehens": 46, "primit": 46, "datarg": 46, "tap": 46, "clout": 46, "hf_argpars": 46, "typer": 46, "6": 46, "pyral": 46, "yahp": 46, "omegaconf": 46, "rather": 46, "find": [46, 50, 51], "critic": 46, "registr": 46, "opportun": 46, "comput": 46, "written": [46, 50], "intention": 46, "tri": 46, "framework": 46, "three": 46, "compon": 46, "vari": 46, "logic": 46, "advantag": 46, "modern": 46, "focu": 46, "agnost": 46, "left": [46, 48], "exercis": 46, "tend": 46, "most": 46, "open": 46, "person": 46, "popular": 46, "orient": 46, "toward": 46, "often": 46, "strive": 46, "batteri": 46, "conveni": 46, "prescrib": 46, "process": 46, "directori": [46, 50], "move": 46, "limit": 46, "insuffici": 46, "particular": 46, "five": 46, "per": [46, 47], "accomplish": 46, "hp": 46, "extern": 46, "avail": 46, "registri": 46, "comment": 47, "extract": 47, "googl": 47, "rest": 47, "numpydoc": 47, "epydoc": 47, "docstring_pars": 47, "enumer": 47, "cumbersom": 47, "thei": 47, "unavail": 47, "inspect": 47, "257": 47, "inlin": 47, "handi": 47, "semant": 47, "below": 47, "multi": 47, "field3": 47, "scalabl": 48, "start": [48, 51], "brows": 48, "unlik": [48, 51], "benefit": 48, "oper": 48, "think": 48, "jump": [48, 51], "hover": 48, "minim": 48, "overhead": 48, "inform": 48, "alreadi": [48, 50], "flax": 48, "hate": 48, "beauti": 48, "vanilla": 48, "distribut": 48, "across": 48, "extend": 48, "shtab": [48, 50], "pip": 49, "interest": 49, "clone": 49, "repositori": 49, "git": 49, "cd": 49, "dev": 49, "pytest": 49, "modif": 50, "stdout": 50, "somewher": 50, "emul": 50, "poetri": 50, "autocomplet": 50, "locat": 50, "local": 50, "mkdir": 50, "p": 50, "zfunc": 50, "_01_functions_pi": 50, "matter": 50, "underscor": 50, "zshrc": 50, "search": 50, "ideal": 50, "fpath": 50, "autoload": 50, "uz": 50, "compinit": 50, "describ": 50, "q": 50, "instal": 50, "my": 50, "put": 50, "subdir": 50, "bash_completion_user_dir": 50, "xdg_data_hom": 50, "share": 50, "demand": 50, "respect": 50, "borrow": 50, "completion_dir": 50, "home": 50, "entri": 50, "point": 50, "oppos": 50, "execut": 50, "permiss": 50, "updat": 50, "chmod": 50, "shebang": 50, "usr": 50, "bin": 50, "env": 50, "queri": 50, "sum": 51, "dramat": 51, "cleaner": 51, "sever": 51, "lack": 51, "signific": 51, "amount": 51, "boilerpl": 51, "becom": 51, "difficult": 51, "basic": 51, "goal": 51, "wrapper": 51, "solv": 51, "succinctli": 51, "walk": 51, "through": 51}, "objects": {"": [[22, 0, 0, "-", "tyro"]], "tyro": [[22, 1, 1, "", "MISSING"], [22, 2, 1, "", "UnsupportedTypeAnnotationError"], [0, 0, 0, "-", "_argparse_formatter"], [1, 0, 0, "-", "_arguments"], [2, 0, 0, "-", "_calling"], [3, 0, 0, "-", "_cli"], [4, 0, 0, "-", "_deprecated"], [5, 0, 0, "-", "_docstrings"], [6, 0, 0, "-", "_fields"], [7, 0, 0, "-", "_instantiators"], [8, 0, 0, "-", "_parsers"], [9, 0, 0, "-", "_resolver"], [10, 0, 0, "-", "_singleton"], [11, 0, 0, "-", "_strings"], [12, 0, 0, "-", "_subcommand_matching"], [13, 0, 0, "-", "_typing"], [14, 0, 0, "-", "_unsafe_cache"], [22, 6, 1, "", "cli"], [17, 0, 0, "-", "conf"], [21, 0, 0, "-", "extras"]], "tyro._argparse_formatter": [[0, 1, 1, "", "THEME"], [0, 3, 1, "", "TyroArgparseHelpFormatter"], [0, 3, 1, "", "TyroArgumentParser"], [0, 3, 1, "", "TyroTheme"], [0, 6, 1, "", "ansi_context"], [0, 1, 1, "", "global_unrecognized_args"], [0, 6, 1, "", "monkeypatch_len"], [0, 6, 1, "", "set_accent_color"], [0, 6, 1, "", "str_from_rich"]], "tyro._argparse_formatter.TyroArgparseHelpFormatter": [[0, 4, 1, "", "format_help"]], "tyro._argparse_formatter.TyroArgumentParser": [[0, 4, 1, "", "error"]], "tyro._argparse_formatter.TyroTheme": [[0, 4, 1, "", "as_rich_theme"], [0, 5, 1, "", "border"], [0, 5, 1, "", "description"], [0, 5, 1, "", "helptext"], [0, 5, 1, "", "helptext_default"], [0, 5, 1, "", "helptext_required"], [0, 5, 1, "", "invocation"], [0, 5, 1, "", "metavar"], [0, 5, 1, "", "metavar_fixed"]], "tyro._arguments": [[1, 3, 1, "", "ArgumentDefinition"], [1, 3, 1, "", "BooleanOptionalAction"], [1, 3, 1, "", "LoweredArgumentDefinition"], [1, 1, 1, "", "USE_RICH"], [1, 1, 1, "", "cached_property"]], "tyro._arguments.ArgumentDefinition": [[1, 4, 1, "", "add_argument"], [1, 5, 1, "", "field"], [1, 4, 1, "", "lowered"], [1, 5, 1, "", "name_prefix"], [1, 5, 1, "", "subcommand_prefix"], [1, 5, 1, "", "type_from_typevar"]], "tyro._arguments.BooleanOptionalAction": [[1, 4, 1, "", "format_usage"]], "tyro._arguments.LoweredArgumentDefinition": [[1, 5, 1, "", "action"], [1, 5, 1, "", "choices"], [1, 5, 1, "", "default"], [1, 5, 1, "", "dest"], [1, 5, 1, "", "help"], [1, 4, 1, "", "is_fixed"], [1, 5, 1, "", "metavar"], [1, 5, 1, "", "name_or_flag"], [1, 5, 1, "", "nargs"], [1, 5, 1, "", "required"]], "tyro._calling": [[2, 2, 1, "", "InstantiationError"], [2, 1, 1, "", "T"], [2, 6, 1, "", "call_from_args"]], "tyro._calling.InstantiationError": [[2, 5, 1, "", "arg"]], "tyro._cli": [[3, 1, 1, "", "OutT"], [3, 6, 1, "", "cli"], [3, 6, 1, "", "get_parser"]], "tyro._docstrings": [[5, 1, 1, "", "T"], [5, 6, 1, "", "get_callable_description"], [5, 6, 1, "", "get_class_tokenization_with_field"], [5, 6, 1, "", "get_field_docstring"]], "tyro._fields": [[6, 1, 1, "", "DefaultInstance"], [6, 1, 1, "", "EXCLUDE_FROM_CALL"], [6, 3, 1, "", "ExcludeFromCallType"], [6, 3, 1, "", "FieldDefinition"], [6, 1, 1, "", "MISSING"], [6, 1, 1, "", "MISSING_NONPROP"], [6, 1, 1, "", "MISSING_PROP"], [6, 1, 1, "", "MISSING_SINGLETONS"], [6, 3, 1, "", "NonpropagatingMissingType"], [6, 3, 1, "", "PropagatingMissingType"], [6, 3, 1, "", "UnsupportedNestedTypeMessage"], [6, 1, 1, "", "attr"], [6, 6, 1, "", "field_list_from_callable"], [6, 6, 1, "", "is_nested_type"], [6, 1, 1, "", "pydantic"]], "tyro._fields.FieldDefinition": [[6, 4, 1, "", "__post_init__"], [6, 4, 1, "", "add_markers"], [6, 5, 1, "", "argconf"], [6, 5, 1, "", "call_argname"], [6, 5, 1, "", "default"], [6, 5, 1, "", "helptext"], [6, 4, 1, "", "is_positional"], [6, 4, 1, "", "is_positional_call"], [6, 4, 1, "", "make"], [6, 5, 1, "", "markers"], [6, 5, 1, "", "name"], [6, 5, 1, "", "typ"]], "tyro._instantiators": [[7, 1, 1, "", "Instantiator"], [7, 3, 1, "", "InstantiatorMetadata"], [7, 1, 1, "", "LiteralAlternate"], [7, 1, 1, "", "NoneType"], [7, 2, 1, "", "UnsupportedTypeAnnotationError"], [7, 6, 1, "", "instantiator_from_type"], [7, 6, 1, "", "is_type_string_converter"]], "tyro._instantiators.InstantiatorMetadata": [[7, 5, 1, "", "action"], [7, 4, 1, "", "check_choices"], [7, 5, 1, "", "choices"], [7, 5, 1, "", "metavar"], [7, 5, 1, "", "nargs"]], "tyro._parsers": [[8, 3, 1, "", "ParserSpecification"], [8, 3, 1, "", "SubparsersSpecification"], [8, 1, 1, "", "T"], [8, 6, 1, "", "add_subparsers_to_leaves"], [8, 6, 1, "", "handle_field"], [8, 6, 1, "", "none_proxy"]], "tyro._parsers.ParserSpecification": [[8, 4, 1, "", "apply"], [8, 4, 1, "", "apply_args"], [8, 5, 1, "", "args"], [8, 5, 1, "", "consolidate_subcommand_args"], [8, 5, 1, "", "description"], [8, 4, 1, "", "from_callable_or_type"], [8, 5, 1, "", "has_required_args"], [8, 5, 1, "", "helptext_from_nested_class_field_name"], [8, 5, 1, "", "prefix"], [8, 5, 1, "", "subparsers"], [8, 5, 1, "", "subparsers_from_prefix"]], "tyro._parsers.SubparsersSpecification": [[8, 4, 1, "", "apply"], [8, 5, 1, "", "default_instance"], [8, 5, 1, "", "description"], [8, 4, 1, "", "from_field"], [8, 5, 1, "", "parser_from_name"], [8, 5, 1, "", "prefix"], [8, 5, 1, "", "required"]], "tyro._resolver": [[9, 1, 1, "", "MetadataType"], [9, 1, 1, "", "TypeOrCallable"], [9, 6, 1, "", "apply_type_from_typevar"], [9, 6, 1, "", "is_dataclass"], [9, 6, 1, "", "is_namedtuple"], [9, 6, 1, "", "narrow_container_types"], [9, 6, 1, "", "narrow_type"], [9, 6, 1, "", "narrow_union_type"], [9, 6, 1, "", "resolve_generic_types"], [9, 6, 1, "", "resolved_fields"], [9, 6, 1, "", "type_from_typevar_constraints"], [9, 6, 1, "", "unwrap_annotated"], [9, 6, 1, "", "unwrap_origin_strip_extras"]], "tyro._singleton": [[10, 3, 1, "", "Singleton"]], "tyro._singleton.Singleton": [[10, 4, 1, "", "init"]], "tyro._strings": [[11, 6, 1, "", "dedent"], [11, 1, 1, "", "dummy_field_name"], [11, 6, 1, "", "hyphen_separated_from_camel_case"], [11, 6, 1, "", "make_field_name"], [11, 6, 1, "", "make_subparser_dest"], [11, 6, 1, "", "multi_metavar_from_single"], [11, 6, 1, "", "remove_single_line_breaks"], [11, 6, 1, "", "strip_ansi_sequences"], [11, 6, 1, "", "subparser_name_from_type"]], "tyro._subcommand_matching": [[12, 6, 1, "", "match_subcommand"]], "tyro._unsafe_cache": [[14, 1, 1, "", "CallableType"], [14, 6, 1, "", "clear_cache"], [14, 6, 1, "", "unsafe_cache"], [14, 6, 1, "", "unsafe_hash"]], "tyro.conf": [[17, 1, 1, "", "AvoidSubcommands"], [17, 1, 1, "", "ConsolidateSubcommandArgs"], [17, 1, 1, "", "Fixed"], [17, 1, 1, "", "FlagConversionOff"], [17, 1, 1, "", "OmitArgPrefixes"], [17, 1, 1, "", "OmitSubcommandPrefixes"], [17, 1, 1, "", "Positional"], [17, 1, 1, "", "PositionalRequiredArgs"], [17, 1, 1, "", "Suppress"], [17, 1, 1, "", "SuppressFixed"], [17, 1, 1, "", "UseAppendAction"], [15, 0, 0, "-", "_confstruct"], [16, 0, 0, "-", "_markers"], [17, 6, 1, "", "arg"], [17, 6, 1, "", "configure"], [17, 6, 1, "", "subcommand"]], "tyro.conf._confstruct": [[15, 6, 1, "", "arg"], [15, 6, 1, "", "subcommand"]], "tyro.conf._markers": [[16, 1, 1, "", "AvoidSubcommands"], [16, 1, 1, "", "CallableType"], [16, 1, 1, "", "ConsolidateSubcommandArgs"], [16, 1, 1, "", "Fixed"], [16, 1, 1, "", "FlagConversionOff"], [16, 1, 1, "", "Marker"], [16, 1, 1, "", "OmitArgPrefixes"], [16, 1, 1, "", "OmitSubcommandPrefixes"], [16, 1, 1, "", "Positional"], [16, 1, 1, "", "PositionalRequiredArgs"], [16, 1, 1, "", "Suppress"], [16, 1, 1, "", "SuppressFixed"], [16, 1, 1, "", "T"], [16, 1, 1, "", "UseAppendAction"], [16, 6, 1, "", "configure"]], "tyro.extras": [[18, 0, 0, "-", "_base_configs"], [19, 0, 0, "-", "_choices_type"], [20, 0, 0, "-", "_serialization"], [21, 6, 1, "", "from_yaml"], [21, 6, 1, "", "get_parser"], [21, 6, 1, "", "literal_type_from_choices"], [21, 6, 1, "", "set_accent_color"], [21, 6, 1, "", "subcommand_type_from_defaults"], [21, 6, 1, "", "to_yaml"]], "tyro.extras._base_configs": [[18, 1, 1, "", "T"], [18, 6, 1, "", "subcommand_type_from_defaults"]], "tyro.extras._choices_type": [[19, 1, 1, "", "T"], [19, 6, 1, "", "literal_type_from_choices"]], "tyro.extras._serialization": [[20, 1, 1, "", "DATACLASS_YAML_TAG_PREFIX"], [20, 1, 1, "", "DataclassType"], [20, 1, 1, "", "ENUM_YAML_TAG_PREFIX"], [20, 1, 1, "", "MISSING_YAML_TAG_PREFIX"], [20, 6, 1, "", "from_yaml"], [20, 6, 1, "", "to_yaml"]]}, "objtypes": {"0": "py:module", "1": "py:data", "2": "py:exception", "3": "py:class", "4": "py:method", "5": "py:attribute", "6": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "data", "Python data"], "2": ["py", "exception", "Python exception"], "3": ["py", "class", "Python class"], "4": ["py", "method", "Python method"], "5": ["py", "attribute", "Python attribute"], "6": ["py", "function", "Python function"]}, "titleterms": {"tyro": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 48], "_argparse_formatt": 0, "modul": [0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 18, 19, 20], "content": [0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22], "_argument": 1, "_call": 2, "_cli": 3, "_deprec": 4, "_docstr": 5, "_field": 6, "_instanti": 7, "_parser": 8, "_resolv": 9, "_singleton": 10, "_string": 11, "_subcommand_match": 12, "_type": 13, "_unsafe_cach": 14, "conf": [15, 16, 17], "_confstruct": 15, "_marker": 16, "packag": [17, 21, 22], "extra": [18, 19, 20, 21], "_base_config": 18, "_choices_typ": 19, "_serial": 20, "subpackag": 22, "build": 23, "configur": [23, 35, 42, 46], "system": [23, 46], "function": 24, "dataclass": [25, 47], "contain": [26, 34], "enum": 27, "boolean": 28, "flag": 28, "choic": 29, "union": 30, "hierarch": 31, "config": [31, 36], "subcommand": [32, 33], "sequenc": 33, "nest": 34, "base": 35, "overrid": [36, 38], "yaml": 36, "posit": 37, "argument": 37, "dictionari": 38, "tupl": 39, "instanti": 40, "class": 40, "gener": [41, 47], "type": [41, 42], "via": 42, "annot": 42, "jax": 43, "flax": 43, "integr": [43, 44, 45], "pydant": 44, "attr": 45, "goal": 46, "altern": 46, "design": 46, "note": 46, "helptext": 47, "callabl": 47, "typeddict": 47, "namedtupl": 47, "why": 48, "instal": 49, "standard": 49, "develop": 49, "tab": 50, "complet": 50, "zsh": 50, "bash": 50, "your": 51, "first": 51, "cli": 51}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.todo": 2, "sphinx.ext.viewcode": 1, "sphinx": 56}})
\ No newline at end of file
+Search.setIndex({"docnames": ["api/tyro/_argparse_formatter/index", "api/tyro/_arguments/index", "api/tyro/_calling/index", "api/tyro/_cli/index", "api/tyro/_deprecated/index", "api/tyro/_docstrings/index", "api/tyro/_fields/index", "api/tyro/_instantiators/index", "api/tyro/_parsers/index", "api/tyro/_resolver/index", "api/tyro/_singleton/index", "api/tyro/_strings/index", "api/tyro/_subcommand_matching/index", "api/tyro/_typing/index", "api/tyro/_unsafe_cache/index", "api/tyro/conf/_confstruct/index", "api/tyro/conf/_markers/index", "api/tyro/conf/index", "api/tyro/extras/_base_configs/index", "api/tyro/extras/_choices_type/index", "api/tyro/extras/_serialization/index", "api/tyro/extras/index", "api/tyro/index", "building_configuration_systems", "examples/01_basics/01_functions", "examples/01_basics/02_dataclasses", "examples/01_basics/03_containers", "examples/01_basics/04_enums", "examples/01_basics/05_flags", "examples/01_basics/06_literals", "examples/01_basics/07_unions", "examples/02_nesting/01_nesting", "examples/02_nesting/02_subcommands", "examples/02_nesting/03_multiple_subcommands", "examples/02_nesting/04_nesting_in_containers", "examples/03_config_systems/01_base_configs", "examples/03_config_systems/02_overriding_yaml", "examples/04_additional/01_positional_args", "examples/04_additional/02_dictionaries", "examples/04_additional/03_tuples", "examples/04_additional/04_classes", "examples/04_additional/05_generics", "examples/04_additional/06_conf", "examples/04_additional/07_flax", "examples/04_additional/08_pydantic", "examples/04_additional/09_attrs", "goals_and_alternatives", "helptext_generation", "index", "installation", "tab_completion", "your_first_cli"], "filenames": ["api/tyro/_argparse_formatter/index.rst", "api/tyro/_arguments/index.rst", "api/tyro/_calling/index.rst", "api/tyro/_cli/index.rst", "api/tyro/_deprecated/index.rst", "api/tyro/_docstrings/index.rst", "api/tyro/_fields/index.rst", "api/tyro/_instantiators/index.rst", "api/tyro/_parsers/index.rst", "api/tyro/_resolver/index.rst", "api/tyro/_singleton/index.rst", "api/tyro/_strings/index.rst", "api/tyro/_subcommand_matching/index.rst", "api/tyro/_typing/index.rst", "api/tyro/_unsafe_cache/index.rst", "api/tyro/conf/_confstruct/index.rst", "api/tyro/conf/_markers/index.rst", "api/tyro/conf/index.rst", "api/tyro/extras/_base_configs/index.rst", "api/tyro/extras/_choices_type/index.rst", "api/tyro/extras/_serialization/index.rst", "api/tyro/extras/index.rst", "api/tyro/index.rst", "building_configuration_systems.md", "examples/01_basics/01_functions.rst", "examples/01_basics/02_dataclasses.rst", "examples/01_basics/03_containers.rst", "examples/01_basics/04_enums.rst", "examples/01_basics/05_flags.rst", "examples/01_basics/06_literals.rst", "examples/01_basics/07_unions.rst", "examples/02_nesting/01_nesting.rst", "examples/02_nesting/02_subcommands.rst", "examples/02_nesting/03_multiple_subcommands.rst", "examples/02_nesting/04_nesting_in_containers.rst", "examples/03_config_systems/01_base_configs.rst", "examples/03_config_systems/02_overriding_yaml.rst", "examples/04_additional/01_positional_args.rst", "examples/04_additional/02_dictionaries.rst", "examples/04_additional/03_tuples.rst", "examples/04_additional/04_classes.rst", "examples/04_additional/05_generics.rst", "examples/04_additional/06_conf.rst", "examples/04_additional/07_flax.rst", "examples/04_additional/08_pydantic.rst", "examples/04_additional/09_attrs.rst", "goals_and_alternatives.md", "helptext_generation.md", "index.md", "installation.md", "tab_completion.md", "your_first_cli.md"], "titles": ["tyro._argparse_formatter
", "tyro._arguments
", "tyro._calling
", "tyro._cli
", "tyro._deprecated
", "tyro._docstrings
", "tyro._fields
", "tyro._instantiators
", "tyro._parsers
", "tyro._resolver
", "tyro._singleton
", "tyro._strings
", "tyro._subcommand_matching
", "tyro._typing
", "tyro._unsafe_cache
", "tyro.conf._confstruct
", "tyro.conf._markers
", "tyro.conf
", "tyro.extras._base_configs
", "tyro.extras._choices_type
", "tyro.extras._serialization
", "tyro.extras
", "tyro
", "Building configuration systems", "Functions", "Dataclasses", "Containers", "Enums", "Booleans and Flags", "Choices", "Unions", "Hierarchical Configs", "Subcommands", "Sequenced Subcommands", "Nesting in Containers", "Base Configurations", "Overriding YAML Configs", "Positional Arguments", "Overriding Dictionaries", "Tuples", "Instantiating Classes", "Generic Types", "Configuration via typing.Annotated[]", "JAX/Flax Integration", "Pydantic Integration", "Attrs Integration", "Goals and alternatives", "Helptext generation", "tyro", "Installation", "Tab completion", "Your first CLI"], "terms": {"util": [0, 9, 11, 42], "function": [0, 2, 3, 7, 16, 17, 18, 19, 20, 21, 22, 37, 40, 46, 47, 50, 51], "helptext": [0, 3, 5, 6, 11, 15, 16, 17, 18, 21, 22, 25, 33, 37, 39, 44, 45, 46, 48], "format": [0, 46, 47], "we": [0, 1, 3, 6, 9, 16, 17, 18, 19, 20, 21, 27, 29, 32, 34, 35, 40, 46, 48, 50, 51], "replac": 0, "argpars": [0, 1, 2, 3, 7, 8, 21, 22, 25, 46, 51], "s": [0, 1, 3, 7, 9, 21, 22, 23, 34, 45, 46, 49, 50, 51], "simpl": [0, 3, 22, 23, 46, 51], "help": [0, 1, 3, 15, 17, 18, 19, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "messag": [0, 2, 6, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "ones": [0, 9], "ar": [0, 2, 3, 14, 16, 17, 19, 20, 21, 22, 26, 27, 31, 32, 33, 35, 36, 37, 39, 42, 46, 47, 48, 50, 51], "more": [0, 9, 16, 17, 21, 27, 30, 37, 46, 47, 48, 51], "nice": 0, "support": [0, 3, 9, 16, 17, 21, 22, 23, 26, 34, 35, 42, 44, 45, 46, 47, 48, 49, 51], "multipl": [0, 6, 23, 26, 30, 33, 35], "column": 0, "when": [0, 2, 3, 7, 9, 14, 16, 17, 18, 19, 21, 22, 50], "mani": [0, 46], "field": [0, 1, 5, 6, 8, 9, 11, 16, 17, 22, 24, 25, 34, 36, 40, 42, 44, 45, 46, 47, 48], "defin": [0, 1, 8, 18, 21, 35, 37, 46, 47], "us": [0, 2, 3, 5, 6, 7, 9, 11, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 42, 43, 46, 47, 48, 50, 51], "rich": [0, 21], "can": [0, 3, 6, 9, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 38, 39, 40, 42, 43, 46, 47, 48, 50, 51], "theme": 0, "an": [0, 1, 3, 7, 9, 16, 17, 18, 19, 21, 22, 23, 25, 28, 31, 36, 44, 46, 47, 50, 51], "accent": [0, 21], "color": [0, 7, 19, 21, 29, 30, 34, 37, 39], "thi": [0, 2, 5, 9, 15, 16, 17, 18, 19, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 49, 50, 51], "larg": 0, "built": [0, 3, 21, 23, 46, 50], "fuss": 0, "around": [0, 9], "implement": [0, 16, 17, 23, 46], "detail": 0, "extrem": 0, "chaotic": 0, "result": [0, 16, 17, 46], "todo": [0, 6], "current": [0, 9, 34], "should": [0, 3, 6, 9, 16, 17, 18, 19, 20, 21, 22, 25, 39, 42, 44, 45, 46, 50], "robust": [0, 16, 17, 20, 21], "given": [0, 9, 12, 16, 17, 28, 46], "our": [0, 23, 31, 35, 36, 37, 43, 46, 47, 48, 50, 51], "test": [0, 36, 49], "coverag": 0, "unid": 0, "long": [0, 50], "term": [0, 46], "just": [0, 46, 48], "maintain": 0, "own": [0, 50], "fork": 0, "class": [0, 1, 3, 5, 6, 7, 8, 9, 10, 22, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 51], "tyrothem": 0, "sourc": [0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 26, 37, 47, 48, 50], "border": 0, "style": [0, 46, 47], "descript": [0, 3, 5, 8, 15, 17, 18, 21, 22, 25, 39, 44, 45], "invoc": 0, "metavar": [0, 1, 7, 15, 17, 42], "metavar_fix": 0, "helptext_requir": 0, "helptext_default": 0, "as_rich_them": 0, "self": [0, 1, 6, 7, 8, 10, 40, 43], "return": [0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 33, 43, 51], "type": [0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 43, 46, 47, 48, 49, 51], "set_accent_color": [0, 21], "accent_color": [0, 21], "option": [0, 1, 3, 5, 6, 7, 8, 9, 12, 15, 16, 17, 19, 21, 22, 28, 30, 31, 47, 50], "str": [0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 15, 17, 18, 19, 20, 21, 22, 24, 25, 30, 32, 34, 36, 38, 40, 41, 42, 44, 45, 47], "none": [0, 1, 3, 6, 7, 8, 9, 14, 15, 16, 17, 21, 22, 24, 28, 30, 31, 32, 33, 37, 38, 43, 47, 51], "set": [0, 1, 2, 3, 7, 8, 16, 17, 18, 19, 21, 22, 26, 28, 29, 31, 33, 38, 46, 50], "take": [0, 1, 9, 21, 46], "ani": [0, 1, 2, 6, 7, 8, 9, 12, 14, 15, 16, 17, 20, 21, 22, 46, 50], "see": [0, 21, 23, 28, 32, 37, 47], "python": [0, 1, 6, 16, 17, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51], "m": [0, 21, 49], "experiment": [0, 21], "paramet": [0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 35], "recursive_arg_search": 0, "arg": [0, 2, 3, 7, 8, 10, 15, 16, 17, 22, 24, 25, 28, 29, 30, 31, 33, 34, 37, 40, 41, 42, 43, 44, 45, 47, 51], "list": [0, 1, 3, 6, 7, 8, 9, 16, 17, 22, 26, 46, 47], "parser_spec": 0, "_parser": [0, 2], "parserspecif": [0, 2, 8], "prog": [0, 3, 21, 22], "unrecognized_argu": 0, "tupl": [0, 1, 2, 3, 6, 7, 8, 9, 16, 17, 22, 26, 30, 33, 34, 35, 37, 38, 46], "_argumentinfo": 0, "bool": [0, 1, 6, 7, 8, 9, 15, 16, 17, 18, 21, 28, 31, 32, 33, 37, 40, 42], "recurs": [0, 7, 16, 17], "search": [0, 50], "argument": [0, 1, 2, 3, 6, 8, 9, 14, 15, 16, 17, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "error": [0, 9], "print": [0, 3, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 47, 50, 51], "whether": [0, 6, 15, 17, 18, 21], "parser": [0, 1, 3, 8, 22, 27, 46, 51], "ha": [0, 23, 51], "subcommand": [0, 9, 12, 15, 16, 17, 18, 21, 35, 46, 51], "pass": [0, 1, 3, 6, 9, 18, 19, 21, 22, 23, 28, 32, 34, 50], "unrecogn": 0, "exist": [0, 9, 31, 35, 36, 38, 46], "under": [0, 3, 21, 47], "differ": [0, 36, 46], "subpars": [0, 3, 8, 22], "being": [0, 37, 47, 50], "pars": [0, 3, 5, 7, 9, 16, 17, 22, 23, 34, 37, 41, 42, 46, 47, 48, 51], "heurist": 0, "specif": [0, 16, 17, 46, 51], "correspond": [0, 6, 12, 47], "same_exist": 0, "valu": [0, 1, 2, 3, 6, 9, 16, 17, 19, 21, 22, 24, 25, 28, 34, 35, 36, 39, 46, 47, 48], "monkeypatch_len": 0, "obj": [0, 14], "int": [0, 1, 3, 7, 9, 14, 15, 16, 17, 22, 24, 25, 26, 30, 31, 34, 35, 36, 39, 40, 41, 42, 43, 44, 45, 46, 47, 51], "ansi_context": 0, "gener": [0, 1, 3, 5, 6, 7, 8, 9, 16, 17, 18, 19, 20, 21, 22, 27, 37, 40, 42, 46, 48, 50], "context": 0, "work": [0, 11, 29, 30, 46, 48, 51], "ansi": 0, "code": [0, 9, 20, 21, 47, 48, 50], "appli": [0, 1, 7, 8, 9, 16, 17, 18, 19, 21], "temporari": 0, "monkei": 0, "patch": 0, "make": [0, 6, 14, 16, 17, 31, 35, 48, 50, 51], "ignor": [0, 5, 9, 11, 43], "wrap": 0, "usag": [0, 15, 17, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46], "text": [0, 3, 11, 22], "enabl": [0, 16, 17, 20, 21, 35], "window": 0, "via": [0, 3, 5, 16, 17, 20, 21, 22, 23, 34, 35, 46, 47, 49, 50], "colorama": 0, "str_from_rich": 0, "render": 0, "consol": 0, "renderabletyp": 0, "width": [0, 26], "soft_wrap": 0, "fals": [0, 1, 3, 16, 17, 22, 28, 31, 32, 33, 37, 38, 40, 42], "global_unrecognized_arg": 0, "tyroargumentpars": 0, "kwarg": 0, "base": [0, 1, 2, 5, 6, 7, 22, 27, 31, 37, 46, 51], "argumentpars": [0, 1, 3, 8, 21, 22, 51], "object": [0, 3, 6, 14, 15, 17, 20, 21, 22, 23, 31, 37, 48, 51], "command": [0, 16, 17, 23, 32, 37, 42, 46, 48, 50, 51], "line": [0, 11, 23, 37, 42, 46, 47, 48, 50, 51], "string": [0, 3, 7, 9, 11, 20, 21, 22, 24, 25, 29, 30, 40, 42, 45, 46, 47], "keyword": [0, 16, 17], "default": [0, 1, 3, 6, 9, 12, 15, 16, 17, 18, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 50, 51], "A": [0, 6, 7, 9, 16, 17, 18, 19, 21, 24, 25, 40, 42, 45, 46, 47, 50, 51], "os": 0, "path": [0, 3, 22, 26, 31, 37, 50], "basenam": 0, "sy": [0, 23, 51], "argv": [0, 23, 51], "0": [0, 7, 16, 17, 27, 30, 31, 33, 34, 35, 36, 37, 38, 39], "auto": [0, 27, 29, 30, 31, 37, 46], "from": [0, 1, 2, 3, 6, 7, 8, 9, 16, 17, 18, 19, 20, 21, 22, 24, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 50, 51], "doe": 0, "what": [0, 8, 32, 37, 42], "program": [0, 3, 22], "epilog": 0, "follow": [0, 33], "one": [0, 9, 23, 35, 46, 48, 50], "parent": [0, 11], "whose": [0, 24, 47], "copi": [0, 34], "formatter_class": 0, "helpformatt": 0, "argument_default": 0, "The": [0, 3, 6, 7, 16, 17, 18, 19, 21, 22, 25, 33, 42, 46, 50, 51], "all": [0, 1, 16, 17, 26, 31, 32, 35, 38, 46, 47, 49], "contain": [0, 1, 8, 9, 17, 21, 39, 42, 46], "fromfile_prefix_char": 0, "charact": 0, "prefix": [0, 8, 11, 15, 16, 17, 18, 21, 50], "file": [0, 3, 22, 23, 35, 36, 46, 48, 50], "addit": [0, 40, 44, 45, 47], "conflict": 0, "conflict_handl": 0, "indic": 0, "how": [0, 47], "handl": [0, 9, 27], "add_help": 0, "add": [0, 1, 50, 51], "h": [0, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "unambigu": [0, 46], "allow_abbrev": 0, "allow": [0, 15, 17, 29, 30, 46], "abbrevi": 0, "exit_on_error": 0, "determin": [0, 6, 8], "exit": [0, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "info": 0, "occur": 0, "noreturn": 0, "improv": 0, "incorpor": [0, 51], "stderr": 0, "If": [0, 1, 3, 9, 16, 17, 22, 23, 36, 43, 47, 49], "you": [0, 23, 36, 43, 46, 48, 49], "overrid": [0, 15, 17, 23, 35, 46], "subclass": [0, 38], "either": [0, 16, 17, 28, 34, 35, 38, 50], "rais": [0, 2, 7, 9, 22], "except": [0, 2, 7, 22], "tyroargparsehelpformatt": 0, "rawdescriptionhelpformatt": 0, "formatt": 0, "which": [0, 3, 6, 7, 9, 12, 18, 20, 21, 22, 46, 48, 50], "retain": 0, "onli": [0, 9, 14, 37, 46], "name": [0, 3, 6, 8, 11, 15, 17, 18, 21, 22, 36, 39, 42, 50], "consid": [0, 15, 17, 51], "public": [0, 3, 46], "api": [0, 3, 21, 46], "method": [0, 1], "provid": [0, 3, 16, 17, 22, 34, 51], "py": [0, 1, 2, 6, 8, 16, 17, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 50], "add_argu": [0, 1, 51], "action": [0, 1, 7, 16, 17], "format_help": 0, "rule": 1, "high": 1, "level": [1, 46], "definit": [1, 6, 8, 46, 48, 51], "lower": 1, "them": [1, 16, 17, 29, 36, 46, 50], "input": [1, 3, 6, 9, 18, 19, 21, 22, 29, 30, 38, 51], "cached_properti": 1, "booleanoptionalact": 1, "option_str": 1, "sequenc": [1, 3, 7, 11, 16, 17, 22, 26], "dest": [1, 37], "_t": 1, "callabl": [1, 2, 3, 5, 6, 7, 8, 9, 14, 16, 17, 21, 22, 35, 46, 48], "filetyp": 1, "choic": [1, 7, 19, 21, 46], "iter": [1, 19, 21, 43], "requir": [1, 6, 8, 9, 22, 24, 25, 26, 28, 31, 32, 33, 34, 37, 40, 41, 42, 43, 44, 45, 46, 49, 50, 51], "adapt": 1, "http": [1, 9], "github": [1, 9, 49], "com": [1, 9, 49], "cpython": 1, "pull": [1, 6], "27672": 1, "__call__": [1, 43], "namespac": [1, 2, 25, 46, 48], "format_usag": 1, "argumentdefinit": [1, 2, 8], "structur": [1, 3, 7, 8, 9, 16, 17, 22, 31, 34, 39, 46, 48, 51], "everyth": 1, "need": [1, 23, 34, 38, 50], "attribut": [1, 2, 6, 8, 43, 47], "dest_prefix": 1, "annot": [1, 2, 3, 6, 7, 8, 9, 15, 16, 17, 18, 19, 21, 22, 26, 27, 32, 33, 34, 37, 38, 46, 47, 48, 51], "name_prefix": 1, "subcommand_prefix": [1, 8], "_field": [1, 2, 8], "fielddefinit": [1, 6, 8], "type_from_typevar": [1, 6, 7, 8, 9], "dict": [1, 2, 3, 6, 7, 8, 9, 12, 22, 26, 34, 36, 38], "typevar": [1, 6, 7, 8, 9, 41], "_type": [1, 3, 6, 7, 8, 9, 18, 19, 21, 22], "typeform": [1, 3, 6, 7, 8, 9, 18, 19, 21, 22], "union": [1, 2, 3, 6, 7, 8, 9, 15, 16, 17, 18, 20, 21, 22, 32, 33, 46, 51], "_argumentgroup": 1, "properti": [1, 42], "loweredargumentdefinit": 1, "meant": [1, 46], "directli": [1, 16, 17, 19, 21, 32, 34, 43, 50, 51], "instanti": [1, 2, 3, 7, 9, 20, 21, 22, 25, 39, 43, 51], "_instanti": 1, "name_or_flag": 1, "narg": [1, 7], "is_fix": 1, "even": 1, "after": [1, 16, 17], "transform": 1, "mean": [1, 2, 16, 17, 46], "don": [1, 9, 14, 34, 46], "t": [1, 2, 3, 5, 7, 8, 9, 14, 16, 17, 18, 19, 21, 22, 26, 30, 34, 42, 46, 50], "have": [1, 3, 16, 17, 22, 23, 36, 46, 50], "valid": 1, "mark": [1, 6, 16, 17, 22, 37], "fix": [1, 16, 17, 26, 29, 34, 35, 42], "alwai": [1, 9], "equal": 1, "use_rich": 1, "true": [1, 3, 6, 15, 16, 17, 18, 21, 22, 26, 27, 28, 29, 30, 31, 32, 33, 35, 37, 41, 42, 47, 51], "core": [2, 3, 21, 22, 46, 48], "call": [2, 3, 6, 22, 51], "specifi": [2, 3, 5, 6, 7, 9, 22, 30, 34, 35, 38, 46, 51], "instantiationerror": 2, "fail": [2, 9], "typic": [2, 23, 31, 46, 49, 50], "cli": [2, 3, 6, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50], "invalid": 2, "_argument": [2, 8], "call_from_arg": 2, "f": [2, 3, 5, 6, 8, 21, 22, 31, 37, 43], "ellipsi": [2, 3, 6, 8, 9, 21, 22], "parser_definit": 2, "default_inst": [2, 6, 8, 9, 22], "nonpropagatingmissingtyp": [2, 6, 8], "value_from_prefixed_field_nam": 2, "field_name_prefix": 2, "dictionari": [2, 3, 16, 17, 18, 21, 22, 36, 46, 48], "output": [2, 3, 22, 25, 43, 51], "outt": [3, 21, 22], "return_unknown_arg": [3, 22], "typing_extens": [3, 7, 22, 42], "liter": [3, 7, 19, 21, 22, 29, 30, 33, 35, 46], "popul": [3, 5, 22, 24, 32, 33, 47, 48, 51], "automat": [3, 5, 16, 17, 22, 28, 47, 48, 50], "interfac": [3, 8, 16, 17, 21, 22, 23, 24, 37, 42, 46, 47, 48, 50, 51], "note": [3, 5, 16, 17, 22, 32, 34, 35, 36, 37, 50], "instanc": [3, 9, 18, 20, 21, 22, 23, 25, 51], "docstr": [3, 5, 22, 37, 46, 47, 48, 51], "broad": [3, 22, 51], "rang": [3, 22, 43, 48, 51], "nativ": [3, 22], "accept": [3, 22], "float": [3, 7, 22, 27, 31, 33, 35, 36, 37, 38, 41], "pathlib": [3, 22, 26, 31, 37], "etc": [3, 16, 17, 18, 19, 20, 21, 22, 26, 33], "boolean": [3, 16, 17, 22, 40, 42], "convert": [3, 7, 9, 22, 28, 36, 37], "flag": [3, 16, 17, 21, 22, 40, 42, 50], "enum": [3, 7, 20, 22, 29, 30, 31, 37], "variou": [3, 22, 31], "standard": [3, 15, 17, 22, 26, 34, 38, 40, 44, 45, 46, 48, 51], "librari": [3, 22, 23, 35, 36, 46, 48], "some": [3, 6, 7, 8, 22, 26], "exampl": [3, 7, 9, 16, 17, 18, 21, 22, 23, 26, 29, 33, 34, 39, 41, 46, 47, 48, 50, 51], "classvar": [3, 22], "k": [3, 22, 38], "v": [3, 22, 38], "t1": [3, 22, 26], "t2": [3, 22, 26], "t3": [3, 22], "final": [3, 22], "nest": [3, 6, 9, 11, 15, 16, 17, 22, 30, 31, 32, 33, 36, 39, 46, 51], "combin": [3, 22], "abov": [3, 22, 28, 51], "hierarch": [3, 22, 48], "dataclass": [3, 5, 6, 9, 16, 17, 20, 21, 22, 23, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 40, 41, 42, 44, 45, 46, 48, 51], "typeddict": [3, 22, 38], "namedtupl": [3, 22, 39], "over": [3, 9, 16, 17, 22, 29, 30, 32, 33, 46, 51], "includ": [3, 9, 16, 17, 22, 46, 48], "complet": [3, 21, 22, 23, 46, 48, 51], "script": [3, 22, 33, 48, 50, 51], "interact": [3, 22, 50], "shell": [3, 22, 50], "also": [3, 9, 16, 17, 20, 21, 22, 26, 29, 30, 32, 35, 36, 40, 44, 45, 46, 47], "To": [3, 16, 17, 22, 28, 48, 50], "write": [3, 21, 22, 46, 50, 51], "tab": [3, 21, 22, 23, 48, 51], "bash": [3, 22, 48], "zsh": [3, 22, 48], "tcsh": [3, 22, 48, 50], "mirror": [3, 22], "displai": [3, 22], "instead": [3, 16, 17, 22], "commandlin": [3, 6, 22, 34, 35], "parse_arg": [3, 22, 51], "like": [3, 9, 16, 17, 21, 22, 23, 27, 46, 48], "merg": [3, 22], "load": [3, 20, 21, 22, 23, 26, 33, 36, 50], "elsewher": [3, 22], "config": [3, 18, 21, 22, 23, 26, 27, 35, 46, 51], "yaml": [3, 20, 21, 22, 23, 35, 46, 48], "unknown": [3, 22], "parse_known_arg": [3, 22], "two": [3, 7, 9, 15, 16, 17, 22, 39, 46, 47, 51], "equival": [3, 22, 30], "get_pars": [3, 21], "get": [3, 5, 9, 21, 48, 51], "hood": [3, 21, 47], "tool": [3, 21, 48, 51], "sphinx": [3, 21], "argcomplet": [3, 21], "For": [3, 9, 18, 21, 23, 32, 33, 37, 46, 47, 50, 51], "recommend": [3, 18, 19, 21, 48, 49], "helper": [5, 7, 9, 17, 20, 21], "get_class_tokenization_with_field": 5, "cl": [5, 9, 11, 20, 21], "field_nam": 5, "_classtoken": 5, "get_field_docstr": 5, "get_callable_descript": 5, "associ": 5, "doc": 5, "abstract": 6, "out": [6, 9, 14, 31, 46, 51], "typ": [6, 7, 9], "marker": [6, 7, 16, 17], "frozenset": [6, 7], "conf": [6, 7, 12, 18, 21, 22, 28, 32, 33, 37, 42], "_marker": [6, 7], "argconf": 6, "_confstruct": [6, 12], "_argconfigur": 6, "call_argnam": 6, "__post_init__": 6, "static": [6, 8, 18, 19, 21, 42, 46, 48, 51], "call_argname_overrid": 6, "add_mark": 6, "is_posit": 6, "posit": [6, 16, 17, 23, 42, 46], "is_positional_cal": 6, "underli": 6, "propagatingmissingtyp": [6, 8], "_singleton": 6, "singleton": [6, 10], "excludefromcalltyp": 6, "missing_prop": 6, "missing_nonprop": [6, 15, 17], "exclude_from_cal": 6, "miss": [6, 20, 22, 35], "sentinel": [6, 22], "missing_singleton": 6, "unsupportednestedtypemessag": 6, "reason": 6, "why": 6, "cannot": 6, "treat": [6, 51], "is_nested_typ": 6, "defaultinst": 6, "where": [6, 7, 16, 17, 31, 50], "singl": [6, 8, 11], "broken": [6, 46], "down": 6, "eg": [6, 9, 46], "come": 6, "up": [6, 16, 17, 25, 39, 44, 45, 47, 50], "better": 6, "than": [6, 46, 47, 51], "littl": 6, "bit": 6, "mislead": 6, "field_list_from_cal": 6, "resolv": [6, 9], "pydant": [6, 48], "attr": [6, 48], "map": [7, 9, 12, 18, 21, 34], "desir": 7, "lambda": [7, 45], "x": [7, 11, 15, 16, 17, 39, 41, 43, 50], "zip": 7, "literalaltern": 7, "nonetyp": 7, "instantiatormetadata": 7, "append": [7, 16, 17], "check_choic": 7, "unsupportedtypeannotationerror": [7, 22], "unsupport": [7, 9, 22], "detect": [7, 22], "is_type_string_convert": 7, "check": [7, 35, 46, 48, 49, 51], "i": [7, 43, 50], "e": [7, 49], "instantiator_from_typ": 7, "thing": [7, 46], "latter": 7, "metadata": [7, 15, 17, 46], "each": [8, 15, 16, 17, 31, 35, 47], "helptext_from_nested_class_field_nam": 8, "subparsersspecif": 8, "subparsers_from_prefix": 8, "has_required_arg": 8, "consolidate_subcommand_arg": 8, "from_callable_or_typ": 8, "parent_class": 8, "creat": [8, 15, 16, 17, 35, 46], "apply_arg": 8, "handle_field": 8, "do": [8, 9, 37], "parser_from_nam": 8, "from_field": 8, "parent_pars": 8, "add_subparsers_to_leav": 8, "root": [8, 16, 17], "leaf": 8, "none_proxi": 8, "forward": 9, "refer": [9, 20, 21, 51], "typeorcal": 9, "unwrap_origin_strip_extra": 9, "origin": 9, "otherwis": [9, 16, 17], "is_dataclass": 9, "same": [9, 11, 28, 51], "alias": 9, "resolve_generic_typ": 9, "op": 9, "alia": 9, "concret": [9, 23, 46], "resolved_field": 9, "similar": [9, 35, 46], "initvar": 9, "is_namedtupl": 9, "type_from_typevar_constraint": 9, "try": 9, "bound": 9, "constraint": 9, "ident": 9, "unsuccess": 9, "narrow_typ": 9, "narrow": 9, "anim": 9, "cat": 9, "individu": 9, "want": [9, 16, 17, 36], "narrow_container_typ": 9, "infer": [9, 34], "metadatatyp": 9, "unwrap_annot": 9, "search_typ": 9, "1": [9, 11, 16, 17, 27, 30, 31, 34, 37, 39, 43, 46, 47, 50, 51], "apply_type_from_typevar": 9, "narrow_union_typ": 9, "shim": 9, "gracefulli": 9, "re": [9, 20, 21, 48, 49], "doesn": [9, 50], "match": [9, 50], "b": [9, 15, 17, 28, 34, 37, 39, 41, 51], "mix": [9, 29, 46], "non": 9, "warn": 9, "loos": 9, "motiv": 9, "brentyi": [9, 49], "issu": [9, 51], "20": 9, "nesteda": 9, "nestedb": 9, "strip": [9, 36], "5": [9, 25, 37, 42, 44, 45, 46], "hack": 9, "fact": 9, "somedataclass": 9, "futur": [9, 20, 21], "big": [9, 18, 21, 35], "refactor": [9, 20, 21, 51], "init": 10, "kwd": 10, "constant": 11, "dummy_field_nam": 11, "__tyro_dummy_field__": 11, "make_field_nam": 11, "part": [11, 46], "join": 11, "togeth": 11, "parent_1": 11, "child": 11, "_child_nod": 11, "_child": 11, "node": 11, "make_subparser_dest": 11, "dedent": 11, "textwrap": 11, "first": [11, 50], "hyphen_separated_from_camel_cas": 11, "subparser_name_from_typ": 11, "strip_ansi_sequ": 11, "multi_metavar_from_singl": 11, "remove_single_line_break": 11, "match_subcommand": 12, "subcommand_config_from_nam": 12, "_subcommandconfigur": 12, "subcommand_type_from_nam": 12, "callabletyp": [14, 16, 17], "clear_cach": 14, "unsafe_cach": 14, "maxsiz": 14, "cach": 14, "decor": [14, 16, 17, 46], "reli": 14, "id": [14, 35, 41, 48, 51], "unhash": 14, "veri": 14, "strong": [14, 48], "assumpt": 14, "immut": 14, "go": [14, 50], "scope": 14, "unsafe_hash": 14, "prefix_nam": [15, 17, 18, 21], "configur": [15, 16, 17, 20, 21, 31, 32, 33, 36, 37, 48, 51], "aesthet": [15, 17], "approach": [15, 17, 46, 51], "nestedtypea": [15, 16, 17], "nestedtypeb": [15, 16, 17], "c": [15, 17, 41], "d": [15, 17], "positionalrequiredarg": [16, 17], "without": [16, 17, 23, 46, 50], "prevent": [16, 17], "suppress": [16, 17], "show": [16, 17, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "suppressfix": [16, 17], "hide": [16, 17], "manual": [16, 17, 23, 42, 51], "flagconversionoff": [16, 17, 28, 42], "turn": [16, 17, 28, 42], "off": [16, 17, 28, 42], "convers": [16, 17, 28, 42], "expect": [16, 17, 28], "explicit": [16, 17, 20, 21, 28, 51], "avoidsubcommand": [16, 17], "avoid": [16, 17, 46], "simplifi": [16, 17], "less": [16, 17], "express": [16, 17, 32, 42], "consolidatesubcommandarg": [16, 17, 33], "consolid": [16, 17], "sensit": [16, 17], "order": [16, 17], "cost": [16, 17], "By": [16, 17, 48, 51], "tradit": [16, 17], "preced": [16, 17, 47], "s1": [16, 17], "s2": [16, 17], "frustrat": [16, 17], "becaus": [16, 17], "exact": [16, 17], "push": [16, 17], "end": [16, 17, 37, 46, 47], "reorder": [16, 17], "ensur": [16, 17], "new": [16, 17], "simpli": [16, 17, 50], "place": [16, 17], "omitsubcommandprefix": [16, 17], "shorter": [16, 17], "omit": [16, 17, 28], "portion": [16, 17], "cmd": [16, 17, 32], "mai": [16, 17, 20, 21], "would": [16, 17], "omitargprefix": [16, 17], "nestedtyp": [16, 17], "useappendact": [16, 17], "variabl": [16, 17, 23, 26, 34, 36, 46, 51], "length": [16, 17, 26, 34, 46, 51], "2": [16, 17, 27, 30, 31, 37, 46, 47, 50, 51], "syntax": [16, 17, 46], "user": [16, 17, 46], "friendli": [16, 17], "ambigu": [16, 17], "straightforward": [16, 17, 46], "applic": [16, 17, 46], "well": [16, 17, 26, 47, 48], "main": [16, 17, 24, 32, 37, 38, 47], "def": [16, 17, 24, 31, 32, 33, 37, 38, 40, 43, 47, 48, 51], "submodul": [17, 21], "attach": 17, "pep": [17, 47], "593": 17, "runtim": [17, 18, 19, 21], "subscript": 17, "featur": [17, 20, 21, 42, 46, 51], "here": [17, 21, 35, 42, 50], "unnecessari": [17, 42], "sparingli": [17, 42], "subcommand_type_from_default": [18, 21, 35], "construct": [18, 20, 21], "choos": [18, 19, 21, 33, 46], "between": [18, 20, 21, 31, 33, 36, 46], "small": [18, 21, 35], "direct": [18, 21, 46], "prefer": [18, 19, 21, 46], "succinct": [18, 21, 47], "safe": [18, 19, 20, 21], "analysi": [18, 19, 21, 51], "type_check": [18, 19, 21], "guard": [18, 19, 21], "import": [18, 19, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 51], "seen": [18, 19, 21], "languag": [18, 19, 21, 48], "server": [18, 19, 21, 48], "checker": [18, 19, 21], "selectableconfig": [18, 21], "els": [18, 19, 21], "conttain": [18, 21], "literal_type_from_choic": [19, 21], "constrain": [19, 21], "dynam": [19, 21, 23, 34, 46, 48], "red": [19, 21, 29, 30, 34, 37], "green": [19, 21, 29, 30, 34], "blue": [19, 21, 29, 30, 34], "human": [20, 21], "readabl": [20, 21], "serial": [20, 21, 46], "enum_yaml_tag_prefix": 20, "dataclass_yaml_tag_prefix": 20, "missing_yaml_tag_prefix": 20, "dataclasstyp": [20, 21], "from_yaml": [20, 21], "stream": [20, 21], "io": [20, 21], "byte": [20, 21], "compat": [20, 21, 51], "to_yaml": [20, 21], "As": [20, 21, 47], "secondari": [20, 21], "aim": [20, 21, 46], "case": [20, 21, 24, 46], "introduc": [20, 21], "attempt": [20, 21], "strike": [20, 21], "balanc": [20, 21], "flexibl": [20, 21], "contrast": [20, 21, 46, 50], "naiv": [20, 21], "dump": [20, 21], "pickl": [20, 21], "pyyaml": [20, 21], "custom": [20, 21, 46], "tag": [20, 21], "against": [20, 21], "reorgan": [20, 21], "while": [20, 21], "backend": [20, 21], "arbitrari": [20, 21], "stabl": [20, 21], "deprec": [20, 21], "It": [20, 21], "remov": [20, 21, 48], "version": [20, 21, 33], "reconstruct": [20, 21], "read": [20, 21], "deseri": [20, 21], "complement": 21, "compar": [21, 46], "chang": [21, 32, 42], "extra": [22, 35], "beyond": [23, 32, 42], "tyro": [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51], "design": 23, "scale": 23, "larger": [23, 31, 51], "those": 23, "hydra": [23, 35, 46], "live": 23, "nerfstudio": 23, "notabl": 23, "entir": 23, "full": [23, 33, 46], "your": [23, 50], "termin": 23, "select": [23, 35, 36, 51], "might": [23, 46], "environ": [23, 36], "manag": [23, 51], "document": [23, 48, 50], "In": [24, 26, 40, 44, 45, 46, 47, 50], "simplest": 24, "run": [24, 33, 35, 49, 50], "field1": [24, 25, 40, 44, 45, 47], "field2": [24, 25, 40, 44, 45, 47], "3": [24, 25, 26, 30, 33, 35, 44, 46, 47, 49, 50, 51], "numer": [24, 25, 40, 42, 47], "__name__": [24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "__main__": [24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45], "01_basic": [24, 25, 26, 27, 28, 29, 30], "01_function": [24, 50], "hello": [24, 25, 32, 40, 42, 44, 45], "10": [24, 43], "common": [25, 35], "pattern": [25, 35, 50, 51], "altern": 25, "02_dataclass": 25, "both": [26, 51], "9": [26, 33, 35, 38, 46], "frozen": [26, 27, 29, 30, 32, 35, 37, 41], "trainconfig": [26, 27], "dataset_sourc": 26, "train": [26, 31, 33, 35, 36, 43], "data": [26, 40], "okai": 26, "image_dimens": 26, "32": [26, 31, 35, 36, 43], "height": 26, "imag": [26, 33], "03_contain": 26, "dataset": [26, 33, 35], "dimens": 26, "16": 26, "posixpath": [26, 31, 37], "advanc": [27, 51], "optimizertyp": [27, 31, 37], "adam": [27, 31, 33, 36, 37], "sgd": [27, 31, 33, 37], "seamlessli": [27, 48], "optimizer_typ": 27, "gradient": [27, 31, 37], "optim": [27, 31, 33, 35, 36, 37], "learning_r": [27, 31, 33, 35, 36, 37, 38], "1e": [27, 31, 33, 35, 37], "4": [27, 31, 33, 35, 37, 38, 43, 46], "learn": [27, 31, 33, 35, 36, 37, 38, 46], "rate": [27, 31, 33, 35, 36, 37, 38], "04_enum": 27, "0001": [27, 36], "3e": [27, 31, 33, 37, 38], "0003": [27, 31, 33, 37, 38], "explicitli": 28, "optional_boolean": 28, "flag_a": 28, "flag_b": 28, "05_flag": 28, "restrict": 29, "Or": [29, 51], "other": [29, 30, 46, 48], "06_liter": 29, "expand": 30, "union_over_typ": 30, "string_or_enum": 30, "complex": 30, "union_over_tupl": 30, "And": [30, 50, 51], "tuple_of_string_or_enum": 30, "integ": [30, 44, 45, 47], "07_union": 30, "build": [31, 46, 48], "modular": [31, 48], "group": [31, 47], "project": [31, 46, 51], "optimizerconfig": [31, 37], "algorithm": [31, 37], "coeffici": [31, 37], "l2": [31, 37], "regular": [31, 37], "weight_decai": [31, 37], "experimentconfig": [31, 35], "batch": [31, 35, 36], "size": [31, 35, 36], "batch_siz": [31, 35, 36], "total": [31, 35, 38, 51], "number": [31, 35, 43, 51], "step": [31, 35, 36], "train_step": [31, 35], "100_000": [31, 35], "random": [31, 35], "seed": [31, 35], "sure": [31, 35], "experi": [31, 35, 46], "reproduc": [31, 35], "out_dir": 31, "restore_checkpoint": 31, "checkpoint_interv": 31, "1000": [31, 33, 36, 43], "model": [31, 35, 43, 44], "save": [31, 46], "log": 31, "checkpoint": [31, 36], "restor": 31, "02_nest": [31, 32, 33, 34], "01_nest": 31, "dir": 31, "weight": [31, 37], "decai": [31, 37], "interv": 31, "01": [31, 37], "100000": [31, 35], "__future__": [32, 33, 37], "checkout": 32, "branch": 32, "commit": 32, "understood": 32, "pyright": [32, 48], "unfortun": 32, "mypi": [32, 48, 49], "02_subcommand": 32, "seri": 33, "possibl": [33, 35], "mnist": [33, 35], "binari": 33, "imagenet": [33, 35], "subset": 33, "50": [33, 35], "100": 33, "beta": [33, 35, 38], "999": [33, 35, 38], "03_multiple_subcommand": 33, "net": 33, "001": [33, 35], "insid": 34, "must": [34, 50], "rgb": [34, 37], "r": [34, 36, 39], "g": [34, 39], "hsl": 34, "l": 34, "color_tupl": 34, "These": [34, 46, 47], "color_tuple_alt": 34, "255": [34, 39], "color_map": 34, "mutabl": 34, "default_factori": 34, "04_nesting_in_contain": 34, "alt": 34, "integr": [35, 46], "fill": 35, "torch": 35, "nn": [35, 43], "adamoptim": 35, "num_lay": 35, "unit": [35, 43], "activ": 35, "Not": [35, 46], "modul": [35, 42, 43, 48], "could": [35, 36], "separ": 35, "config_path": 35, "config_nam": 35, "stai": 35, "seamless": 35, "2048": 35, "64": 35, "30_000": 35, "relu": [35, 43], "8": [35, 46], "256": 35, "gelu": 35, "03_config_system": [35, 36], "01_base_config": 35, "num": [35, 36, 43], "layer": [35, 43], "30000": 35, "94720": 35, "easi": [36, 48, 51], "wai": [36, 46, 49], "default_yaml": 36, "exp_nam": 36, "num_step": 36, "10000": 36, "checkpoint_step": 36, "500": 36, "1500": 36, "default_config": 36, "safe_load": 36, "overridden_config": 36, "overridden": [36, 42], "overridden_yaml": 36, "safe_dump": 36, "02_overriding_yaml": 36, "exp": 36, "300": 36, "9000": 36, "forc": 37, "verbos": 37, "background_rgb": 37, "signatur": 37, "destin": 37, "prompt": 37, "befor": 37, "overwrit": 37, "explain": 37, "done": 37, "background": 37, "n": 37, "04_addit": [37, 38, 39, 40, 41, 42, 43, 44, 45], "01_positional_arg": 37, "05": 37, "dictionaryschema": 38, "kei": 38, "typed_dict": 38, "standard_dict": 38, "beta1": 38, "beta2": 38, "assert": [38, 39], "isinst": [38, 39], "02_dictionari": 38, "unset": 38, "interpret": 39, "tupletyp": 39, "raw": 39, "two_color": 39, "03_tupl": 39, "127": 39, "constructor": 40, "__init__": 40, "04_class": 40, "7": [40, 46, 49], "scalartyp": 41, "shapetyp": 41, "point3": 41, "y": 41, "z": 41, "frame_id": 41, "triangl": 41, "shape": 41, "05_gener": 41, "frame": 41, "renam": [42, 48, 51], "06_conf": 42, "linen": [43, 48], "numpi": 43, "jnp": 43, "classifi": 43, "network": 43, "hidden": 43, "count": 43, "output_dim": 43, "compact": 43, "ndarrai": 43, "dens": 43, "kernel_init": 43, "initi": [43, 50], "kaiming_norm": 43, "xavier_norm": 43, "sigmoid": 43, "num_iter": 43, "07_flax": 43, "dim": 43, "basemodel": 44, "08_pydant": 44, "ib": 45, "factori": 45, "09_attr": 45, "overlap": 46, "significantli": 46, "offer": 46, "distinct": 46, "One": 46, "uninvas": 46, "reduc": 46, "expans": 46, "behavior": [46, 51], "strict": 46, "box": [46, 51], "isn": 46, "analyz": 46, "depend": [46, 48], "accessor": 46, "noncomprehens": 46, "primit": 46, "datarg": 46, "tap": 46, "clout": 46, "hf_argpars": 46, "typer": 46, "6": 46, "pyral": 46, "yahp": 46, "omegaconf": 46, "rather": 46, "find": [46, 50, 51], "critic": 46, "registr": 46, "opportun": 46, "comput": 46, "written": [46, 50], "intention": 46, "tri": 46, "framework": 46, "three": 46, "compon": 46, "vari": 46, "logic": 46, "advantag": 46, "modern": 46, "focu": 46, "agnost": 46, "left": [46, 48], "exercis": 46, "tend": 46, "most": 46, "open": 46, "person": 46, "popular": 46, "orient": 46, "toward": 46, "often": 46, "strive": 46, "batteri": 46, "conveni": 46, "prescrib": 46, "process": 46, "directori": [46, 50], "move": 46, "limit": 46, "insuffici": 46, "particular": 46, "five": 46, "per": [46, 47], "accomplish": 46, "hp": 46, "extern": 46, "avail": 46, "registri": 46, "comment": 47, "extract": 47, "googl": 47, "rest": 47, "numpydoc": 47, "epydoc": 47, "docstring_pars": 47, "enumer": 47, "cumbersom": 47, "thei": 47, "unavail": 47, "inspect": 47, "257": 47, "inlin": 47, "handi": 47, "semant": 47, "below": 47, "multi": 47, "field3": 47, "scalabl": 48, "start": [48, 51], "brows": 48, "unlik": [48, 51], "benefit": 48, "oper": 48, "think": 48, "jump": [48, 51], "hover": 48, "minim": 48, "overhead": 48, "inform": 48, "alreadi": [48, 50], "flax": 48, "hate": 48, "beauti": 48, "vanilla": 48, "distribut": 48, "across": 48, "extend": 48, "shtab": [48, 50], "pip": 49, "interest": 49, "clone": 49, "repositori": 49, "git": 49, "cd": 49, "dev": 49, "pytest": 49, "modif": 50, "stdout": 50, "somewher": 50, "emul": 50, "poetri": 50, "autocomplet": 50, "locat": 50, "local": 50, "mkdir": 50, "p": 50, "zfunc": 50, "_01_functions_pi": 50, "matter": 50, "underscor": 50, "zshrc": 50, "ideal": 50, "fpath": 50, "autoload": 50, "uz": 50, "compinit": 50, "describ": 50, "q": 50, "instal": 50, "my": 50, "put": 50, "subdir": 50, "bash_completion_user_dir": 50, "xdg_data_hom": 50, "share": 50, "demand": 50, "respect": 50, "borrow": 50, "completion_dir": 50, "home": 50, "entri": 50, "point": 50, "oppos": 50, "execut": 50, "permiss": 50, "updat": 50, "chmod": 50, "shebang": 50, "usr": 50, "bin": 50, "env": 50, "queri": 50, "sum": 51, "dramat": 51, "cleaner": 51, "sever": 51, "lack": 51, "signific": 51, "amount": 51, "boilerpl": 51, "becom": 51, "difficult": 51, "basic": 51, "goal": 51, "wrapper": 51, "solv": 51, "succinctli": 51, "walk": 51, "through": 51}, "objects": {"": [[22, 0, 0, "-", "tyro"]], "tyro": [[22, 1, 1, "", "MISSING"], [22, 2, 1, "", "UnsupportedTypeAnnotationError"], [0, 0, 0, "-", "_argparse_formatter"], [1, 0, 0, "-", "_arguments"], [2, 0, 0, "-", "_calling"], [3, 0, 0, "-", "_cli"], [4, 0, 0, "-", "_deprecated"], [5, 0, 0, "-", "_docstrings"], [6, 0, 0, "-", "_fields"], [7, 0, 0, "-", "_instantiators"], [8, 0, 0, "-", "_parsers"], [9, 0, 0, "-", "_resolver"], [10, 0, 0, "-", "_singleton"], [11, 0, 0, "-", "_strings"], [12, 0, 0, "-", "_subcommand_matching"], [13, 0, 0, "-", "_typing"], [14, 0, 0, "-", "_unsafe_cache"], [22, 6, 1, "", "cli"], [17, 0, 0, "-", "conf"], [21, 0, 0, "-", "extras"]], "tyro._argparse_formatter": [[0, 1, 1, "", "THEME"], [0, 3, 1, "", "TyroArgparseHelpFormatter"], [0, 3, 1, "", "TyroArgumentParser"], [0, 3, 1, "", "TyroTheme"], [0, 6, 1, "", "ansi_context"], [0, 1, 1, "", "global_unrecognized_args"], [0, 6, 1, "", "monkeypatch_len"], [0, 6, 1, "", "recursive_arg_search"], [0, 6, 1, "", "set_accent_color"], [0, 6, 1, "", "str_from_rich"]], "tyro._argparse_formatter.TyroArgparseHelpFormatter": [[0, 4, 1, "", "format_help"]], "tyro._argparse_formatter.TyroArgumentParser": [[0, 4, 1, "", "error"]], "tyro._argparse_formatter.TyroTheme": [[0, 4, 1, "", "as_rich_theme"], [0, 5, 1, "", "border"], [0, 5, 1, "", "description"], [0, 5, 1, "", "helptext"], [0, 5, 1, "", "helptext_default"], [0, 5, 1, "", "helptext_required"], [0, 5, 1, "", "invocation"], [0, 5, 1, "", "metavar"], [0, 5, 1, "", "metavar_fixed"]], "tyro._arguments": [[1, 3, 1, "", "ArgumentDefinition"], [1, 3, 1, "", "BooleanOptionalAction"], [1, 3, 1, "", "LoweredArgumentDefinition"], [1, 1, 1, "", "USE_RICH"], [1, 1, 1, "", "cached_property"]], "tyro._arguments.ArgumentDefinition": [[1, 4, 1, "", "add_argument"], [1, 5, 1, "", "field"], [1, 4, 1, "", "lowered"], [1, 5, 1, "", "name_prefix"], [1, 5, 1, "", "subcommand_prefix"], [1, 5, 1, "", "type_from_typevar"]], "tyro._arguments.BooleanOptionalAction": [[1, 4, 1, "", "format_usage"]], "tyro._arguments.LoweredArgumentDefinition": [[1, 5, 1, "", "action"], [1, 5, 1, "", "choices"], [1, 5, 1, "", "default"], [1, 5, 1, "", "dest"], [1, 5, 1, "", "help"], [1, 4, 1, "", "is_fixed"], [1, 5, 1, "", "metavar"], [1, 5, 1, "", "name_or_flag"], [1, 5, 1, "", "nargs"], [1, 5, 1, "", "required"]], "tyro._calling": [[2, 2, 1, "", "InstantiationError"], [2, 1, 1, "", "T"], [2, 6, 1, "", "call_from_args"]], "tyro._calling.InstantiationError": [[2, 5, 1, "", "arg"]], "tyro._cli": [[3, 1, 1, "", "OutT"], [3, 6, 1, "", "cli"], [3, 6, 1, "", "get_parser"]], "tyro._docstrings": [[5, 1, 1, "", "T"], [5, 6, 1, "", "get_callable_description"], [5, 6, 1, "", "get_class_tokenization_with_field"], [5, 6, 1, "", "get_field_docstring"]], "tyro._fields": [[6, 1, 1, "", "DefaultInstance"], [6, 1, 1, "", "EXCLUDE_FROM_CALL"], [6, 3, 1, "", "ExcludeFromCallType"], [6, 3, 1, "", "FieldDefinition"], [6, 1, 1, "", "MISSING"], [6, 1, 1, "", "MISSING_NONPROP"], [6, 1, 1, "", "MISSING_PROP"], [6, 1, 1, "", "MISSING_SINGLETONS"], [6, 3, 1, "", "NonpropagatingMissingType"], [6, 3, 1, "", "PropagatingMissingType"], [6, 3, 1, "", "UnsupportedNestedTypeMessage"], [6, 1, 1, "", "attr"], [6, 6, 1, "", "field_list_from_callable"], [6, 6, 1, "", "is_nested_type"], [6, 1, 1, "", "pydantic"]], "tyro._fields.FieldDefinition": [[6, 4, 1, "", "__post_init__"], [6, 4, 1, "", "add_markers"], [6, 5, 1, "", "argconf"], [6, 5, 1, "", "call_argname"], [6, 5, 1, "", "default"], [6, 5, 1, "", "helptext"], [6, 4, 1, "", "is_positional"], [6, 4, 1, "", "is_positional_call"], [6, 4, 1, "", "make"], [6, 5, 1, "", "markers"], [6, 5, 1, "", "name"], [6, 5, 1, "", "typ"]], "tyro._instantiators": [[7, 1, 1, "", "Instantiator"], [7, 3, 1, "", "InstantiatorMetadata"], [7, 1, 1, "", "LiteralAlternate"], [7, 1, 1, "", "NoneType"], [7, 2, 1, "", "UnsupportedTypeAnnotationError"], [7, 6, 1, "", "instantiator_from_type"], [7, 6, 1, "", "is_type_string_converter"]], "tyro._instantiators.InstantiatorMetadata": [[7, 5, 1, "", "action"], [7, 4, 1, "", "check_choices"], [7, 5, 1, "", "choices"], [7, 5, 1, "", "metavar"], [7, 5, 1, "", "nargs"]], "tyro._parsers": [[8, 3, 1, "", "ParserSpecification"], [8, 3, 1, "", "SubparsersSpecification"], [8, 1, 1, "", "T"], [8, 6, 1, "", "add_subparsers_to_leaves"], [8, 6, 1, "", "handle_field"], [8, 6, 1, "", "none_proxy"]], "tyro._parsers.ParserSpecification": [[8, 4, 1, "", "apply"], [8, 4, 1, "", "apply_args"], [8, 5, 1, "", "args"], [8, 5, 1, "", "consolidate_subcommand_args"], [8, 5, 1, "", "description"], [8, 4, 1, "", "from_callable_or_type"], [8, 5, 1, "", "has_required_args"], [8, 5, 1, "", "helptext_from_nested_class_field_name"], [8, 5, 1, "", "prefix"], [8, 5, 1, "", "subparsers"], [8, 5, 1, "", "subparsers_from_prefix"]], "tyro._parsers.SubparsersSpecification": [[8, 4, 1, "", "apply"], [8, 5, 1, "", "default_instance"], [8, 5, 1, "", "description"], [8, 4, 1, "", "from_field"], [8, 5, 1, "", "parser_from_name"], [8, 5, 1, "", "prefix"], [8, 5, 1, "", "required"]], "tyro._resolver": [[9, 1, 1, "", "MetadataType"], [9, 1, 1, "", "TypeOrCallable"], [9, 6, 1, "", "apply_type_from_typevar"], [9, 6, 1, "", "is_dataclass"], [9, 6, 1, "", "is_namedtuple"], [9, 6, 1, "", "narrow_container_types"], [9, 6, 1, "", "narrow_type"], [9, 6, 1, "", "narrow_union_type"], [9, 6, 1, "", "resolve_generic_types"], [9, 6, 1, "", "resolved_fields"], [9, 6, 1, "", "type_from_typevar_constraints"], [9, 6, 1, "", "unwrap_annotated"], [9, 6, 1, "", "unwrap_origin_strip_extras"]], "tyro._singleton": [[10, 3, 1, "", "Singleton"]], "tyro._singleton.Singleton": [[10, 4, 1, "", "init"]], "tyro._strings": [[11, 6, 1, "", "dedent"], [11, 1, 1, "", "dummy_field_name"], [11, 6, 1, "", "hyphen_separated_from_camel_case"], [11, 6, 1, "", "make_field_name"], [11, 6, 1, "", "make_subparser_dest"], [11, 6, 1, "", "multi_metavar_from_single"], [11, 6, 1, "", "remove_single_line_breaks"], [11, 6, 1, "", "strip_ansi_sequences"], [11, 6, 1, "", "subparser_name_from_type"]], "tyro._subcommand_matching": [[12, 6, 1, "", "match_subcommand"]], "tyro._unsafe_cache": [[14, 1, 1, "", "CallableType"], [14, 6, 1, "", "clear_cache"], [14, 6, 1, "", "unsafe_cache"], [14, 6, 1, "", "unsafe_hash"]], "tyro.conf": [[17, 1, 1, "", "AvoidSubcommands"], [17, 1, 1, "", "ConsolidateSubcommandArgs"], [17, 1, 1, "", "Fixed"], [17, 1, 1, "", "FlagConversionOff"], [17, 1, 1, "", "OmitArgPrefixes"], [17, 1, 1, "", "OmitSubcommandPrefixes"], [17, 1, 1, "", "Positional"], [17, 1, 1, "", "PositionalRequiredArgs"], [17, 1, 1, "", "Suppress"], [17, 1, 1, "", "SuppressFixed"], [17, 1, 1, "", "UseAppendAction"], [15, 0, 0, "-", "_confstruct"], [16, 0, 0, "-", "_markers"], [17, 6, 1, "", "arg"], [17, 6, 1, "", "configure"], [17, 6, 1, "", "subcommand"]], "tyro.conf._confstruct": [[15, 6, 1, "", "arg"], [15, 6, 1, "", "subcommand"]], "tyro.conf._markers": [[16, 1, 1, "", "AvoidSubcommands"], [16, 1, 1, "", "CallableType"], [16, 1, 1, "", "ConsolidateSubcommandArgs"], [16, 1, 1, "", "Fixed"], [16, 1, 1, "", "FlagConversionOff"], [16, 1, 1, "", "Marker"], [16, 1, 1, "", "OmitArgPrefixes"], [16, 1, 1, "", "OmitSubcommandPrefixes"], [16, 1, 1, "", "Positional"], [16, 1, 1, "", "PositionalRequiredArgs"], [16, 1, 1, "", "Suppress"], [16, 1, 1, "", "SuppressFixed"], [16, 1, 1, "", "T"], [16, 1, 1, "", "UseAppendAction"], [16, 6, 1, "", "configure"]], "tyro.extras": [[18, 0, 0, "-", "_base_configs"], [19, 0, 0, "-", "_choices_type"], [20, 0, 0, "-", "_serialization"], [21, 6, 1, "", "from_yaml"], [21, 6, 1, "", "get_parser"], [21, 6, 1, "", "literal_type_from_choices"], [21, 6, 1, "", "set_accent_color"], [21, 6, 1, "", "subcommand_type_from_defaults"], [21, 6, 1, "", "to_yaml"]], "tyro.extras._base_configs": [[18, 1, 1, "", "T"], [18, 6, 1, "", "subcommand_type_from_defaults"]], "tyro.extras._choices_type": [[19, 1, 1, "", "T"], [19, 6, 1, "", "literal_type_from_choices"]], "tyro.extras._serialization": [[20, 1, 1, "", "DATACLASS_YAML_TAG_PREFIX"], [20, 1, 1, "", "DataclassType"], [20, 1, 1, "", "ENUM_YAML_TAG_PREFIX"], [20, 1, 1, "", "MISSING_YAML_TAG_PREFIX"], [20, 6, 1, "", "from_yaml"], [20, 6, 1, "", "to_yaml"]]}, "objtypes": {"0": "py:module", "1": "py:data", "2": "py:exception", "3": "py:class", "4": "py:method", "5": "py:attribute", "6": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "data", "Python data"], "2": ["py", "exception", "Python exception"], "3": ["py", "class", "Python class"], "4": ["py", "method", "Python method"], "5": ["py", "attribute", "Python attribute"], "6": ["py", "function", "Python function"]}, "titleterms": {"tyro": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 48], "_argparse_formatt": 0, "modul": [0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 18, 19, 20], "content": [0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22], "_argument": 1, "_call": 2, "_cli": 3, "_deprec": 4, "_docstr": 5, "_field": 6, "_instanti": 7, "_parser": 8, "_resolv": 9, "_singleton": 10, "_string": 11, "_subcommand_match": 12, "_type": 13, "_unsafe_cach": 14, "conf": [15, 16, 17], "_confstruct": 15, "_marker": 16, "packag": [17, 21, 22], "extra": [18, 19, 20, 21], "_base_config": 18, "_choices_typ": 19, "_serial": 20, "subpackag": 22, "build": 23, "configur": [23, 35, 42, 46], "system": [23, 46], "function": 24, "dataclass": [25, 47], "contain": [26, 34], "enum": 27, "boolean": 28, "flag": 28, "choic": 29, "union": 30, "hierarch": 31, "config": [31, 36], "subcommand": [32, 33], "sequenc": 33, "nest": 34, "base": 35, "overrid": [36, 38], "yaml": 36, "posit": 37, "argument": 37, "dictionari": 38, "tupl": 39, "instanti": 40, "class": 40, "gener": [41, 47], "type": [41, 42], "via": 42, "annot": 42, "jax": 43, "flax": 43, "integr": [43, 44, 45], "pydant": 44, "attr": 45, "goal": 46, "altern": 46, "design": 46, "note": 46, "helptext": 47, "callabl": 47, "typeddict": 47, "namedtupl": 47, "why": 48, "instal": 49, "standard": 49, "develop": 49, "tab": 50, "complet": 50, "zsh": 50, "bash": 50, "your": 51, "first": 51, "cli": 51}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.todo": 2, "sphinx.ext.viewcode": 1, "sphinx": 56}})
\ No newline at end of file