Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/marin-community/draccus
/ functions
Functions
407 in github.com/marin-community/draccus
⨍
Functions
407
◇
Types & classes
156
↓ 1 callers
Method
parse_args
(self, args=None, namespace=None)
draccus/argparsing.py:107
↓ 1 callers
Method
parse_known_args
( self, args: Optional[Sequence[Text]] = None, namespace: Optional[Namespace] = None,
draccus/argparsing.py:111
↓ 1 callers
Method
register_actions
(self, parser: argparse.ArgumentParser)
draccus/wrappers/wrapper.py:84
↓ 1 callers
Method
register_actions
(self, parser: argparse.ArgumentParser)
draccus/wrappers/choice_wrapper.py:203
↓ 1 callers
Function
save_config
Save a configuration dictionary to a stream or return as a string. Args: d: The configuration dictionary to save stream: Opt
draccus/cfgparsing.py:65
↓ 1 callers
Method
save_config
(d, stream=None, **kwargs)
draccus/parsers/config_parsers.py:22
↓ 1 callers
Method
strip_prefix
(self, prefix: Sequence[str])
draccus/utils.py:84
Function
HyperParameters
(TaskHyperParameters)
tests/conftest.py:144
Method
__call__
(self, raw_value: Any, path: Sequence[str])
draccus/parsers/decoding.py:60
Method
__init__
(self, key_path: Sequence[str], message: str)
draccus/utils.py:91
Method
__init__
Creates an ArgumentParser instance.
draccus/argparsing.py:39
Method
__init__
(self)
draccus/parsers/yaml_loader.py:19
Method
__init__
(self, *args, **kwargs)
draccus/parsers/yaml_loader.py:85
Method
__init__
(self, *args)
draccus/parsers/config_parsers.py:27
Method
__init__
( self, dataclass: Type[Dataclass], name: Optional[str] = None, # TODO(dlwh):
draccus/wrappers/dataclass_wrapper.py:25
Method
__init__
( self, field: dataclasses.Field, field_type: Type, parent: Optional[Wrapper]
draccus/wrappers/field_wrapper.py:40
Method
__init__
(self, container, *args, **kwargs)
draccus/wrappers/suppressing_argparse.py:32
Method
__init__
( self, choice_type: Type[ChoiceType], name: Optional[str] = None, # default:
draccus/wrappers/choice_wrapper.py:18
Method
__init__
( self, union: type, name: Optional[str] = None, parent: Optional[Wrapper] = N
draccus/wrappers/choice_wrapper.py:137
Method
__init_subclass__
(cls, discover_packages_path: Optional[str] = None, **kwargs)
draccus/choice_types.py:172
Method
__init_subclass__
(cls, discover_packages_path: Optional[str] = None, **kwargs)
draccus/choice_types.py:224
Method
__iter__
(cls)
draccus/utils.py:431
Method
__new__
(cls, name, bases, members)
draccus/utils.py:423
Method
__post_init__
(self)
tests/test_encoding.py:136
Method
__post_init__
(self)
tests/test_encoding.py:169
Method
__post_init__
(self)
tests/test_encoding.py:182
Method
__post_init__
(self)
tests/test_base.py:175
Method
__post_init__
(self)
examples/choice_class_demo.py:24
Method
__post_init__
(self)
examples/demo.py:24
Method
__str__
(self)
draccus/utils.py:96
Method
__str__
(self)
draccus/wrappers/field_wrapper.py:269
Method
_children
(self)
draccus/wrappers/choice_wrapper.py:91
Method
_children
(self)
draccus/wrappers/choice_wrapper.py:240
Function
_decode_dict
(raw_value: Union[Dict[Any, Any], List[Tuple[Any, Any]]], path)
draccus/parsers/decoding.py:475
Function
_decode_list
(raw_value: List[Any], path: Sequence[str])
draccus/parsers/decoding.py:415
Function
_decode_optional
(raw_value: Any, path: Sequence[str] = ())
draccus/parsers/decoding.py:351
Function
_decode_set
(raw_value: List[Any], path)
draccus/parsers/decoding.py:464
Function
_decode_tuple
(raw_value: typing.Sequence[Any], path)
draccus/parsers/decoding.py:443
Method
_format_args
(self, action: Action, default_metavar: str)
draccus/help_formatter.py:33
Method
_get_default_metavar_for_optional
(self, action: argparse.Action)
draccus/help_formatter.py:62
Method
_get_default_metavar_for_positional
(self, action: argparse.Action)
draccus/help_formatter.py:71
Method
_handle_conflict_ignore
(self, action, conflicting_actions)
draccus/wrappers/suppressing_argparse.py:25
Method
_handle_conflict_ignore
(self, action, conflicting_actions)
draccus/wrappers/suppressing_argparse.py:49
Function
_try_functions
(val: Any, path: Sequence[str] = ())
draccus/parsers/decoding.py:373
Method
_wrap_child
(child: Type)
draccus/wrappers/choice_wrapper.py:94
Method
_wrap_child
(child: Type)
draccus/wrappers/choice_wrapper.py:244
Method
action
The `action` argument to be passed to `add_argument(...)`.
draccus/wrappers/field_wrapper.py:151
Method
action_str
(self)
draccus/wrappers/field_wrapper.py:156
Method
add_argument_group
(self, *args, **kwargs)
draccus/wrappers/suppressing_argparse.py:39
Method
add_mutually_exclusive_group
(self, *args, **kwargs)
draccus/wrappers/suppressing_argparse.py:42
Method
arg_options
Dictionary of values to be passed to the `add_argument` method. The main feature of this package is to infer these arguments automati
draccus/wrappers/field_wrapper.py:68
Function
assert_equals_stdout
(capsys)
tests/conftest.py:47
Function
assert_help_output_equals
(actual: str, expected: str)
tests/testutils.py:69
Function
backwards_compat_call
(raw_value: Any, path: Sequence[str] = ())
draccus/parsers/decoding.py:255
Method
custom_arg_options
Custom argparse options that overwrite those in `arg_options`. Can be set by using the `field` function, passing in a keyword argument
draccus/wrappers/field_wrapper.py:162
Function
decode_bool
(raw_value: Any, path)
draccus/parsers/decoding.py:100
Function
decode_choice_class
Decodes a value into an subtype of a choice class following the ChoiceType protocol.
draccus/parsers/decoding.py:186
Function
decode_enum
Decodes a value into an enum.
draccus/parsers/decoding.py:334
Function
decode_from_init
Decodes a value into an atomic type (e.g. str, int, float, etc.).
draccus/parsers/decoding.py:69
Function
decode_int
(raw_value: Any, path)
draccus/parsers/decoding.py:111
Function
decode_literal
Decodes a value into a literal type.
draccus/parsers/decoding.py:505
Function
decode_optional
(t: Type[T])
draccus/parsers/decoding.py:348
Method
default
(self, o: Any)
draccus/parsers/encoding.py:35
Method
default
Either a single default value, when parsing a single argument, or the list of default values, when this argument is reused multiple times
draccus/wrappers/field_wrapper.py:206
Method
default_choice_name
(cls)
draccus/choice_types.py:92
Method
default_choice_name
(cls)
tests/draccus_choice_plugins/model_config.py:15
Function
default_factory
()
draccus/fields.py:26
Function
default_value
Returns the default value of a field in a dataclass, if available. When not available, returns `dataclasses.MISSING`. Args: field (da
draccus/utils.py:278
Method
description
(self)
draccus/wrappers/dataclass_wrapper.py:137
Method
description
(self)
draccus/wrappers/choice_wrapper.py:52
Method
description
(self)
draccus/wrappers/choice_wrapper.py:194
Method
dest
Where the attribute will be stored in the Namespace.
draccus/wrappers/wrapper.py:20
Function
dispatch
(cls)
draccus/parsers/registry_utils.py:28
Function
dump
Dump the config object to a stream or return as a string. Args: config: The dataclass instance to dump stream: Optional stre
draccus/cfgparsing.py:123
Function
encode_dict
( obj: Mapping, declared_type: Optional[Type] = None )
draccus/parsers/encoding.py:189
Function
encode_enum
(obj: Enum, declared_type: Optional[Type] = None)
draccus/parsers/encoding.py:219
Function
encode_list
(obj: list, declared_type: Optional[Type] = None)
draccus/parsers/encoding.py:229
Function
encode_set
(obj: set, declared_type: Optional[Type] = None)
draccus/parsers/encoding.py:251
Function
encode_tuple
(obj: tuple, declared_type: Optional[Type] = None)
draccus/parsers/encoding.py:239
Method
exp_dir
(self)
examples/choice_class_demo.py:57
Method
exp_dir
(self)
examples/demo.py:39
Function
fake_import_module
(name: str, package=None)
tests/test_choice_types.py:103
Method
field
(self)
draccus/wrappers/dataclass_wrapper.py:159
Method
field
(self)
draccus/wrappers/field_wrapper.py:37
Method
field
(self)
draccus/wrappers/choice_wrapper.py:128
Method
field
(self)
draccus/wrappers/choice_wrapper.py:169
Method
flatten_mapping
(self, node)
draccus/parsers/yaml_loader.py:24
Function
format_lists_using_brackets
(list_of_lists: List[List[Any]])
tests/testutils.py:159
Function
format_lists_using_double_quotes
(list_of_lists: List[List[Any]])
tests/testutils.py:163
Function
format_lists_using_single_quotes
(list_of_lists: List[List[Any]])
tests/testutils.py:167
Method
get_choice_class
(cls, name: str)
draccus/choice_types.py:77
Method
get_choice_class
(cls, name: str)
draccus/choice_types.py:183
Method
get_choice_class
(cls, name: str)
draccus/choice_types.py:230
Method
get_choice_name
(cls, subcls: Type)
draccus/choice_types.py:85
Method
get_choice_name
(cls, subcls: Type)
draccus/choice_types.py:239
Function
get_dataclass_type_arg
(t: Type)
draccus/utils.py:244
Function
get_defaults_dict
" Get defaults of a dataclass without generating the object
draccus/utils.py:297
Method
get_known_choices
(cls)
draccus/choice_types.py:81
Method
get_known_choices
(cls)
draccus/choice_types.py:188
Function
get_type_name
(some_type: Type)
draccus/utils.py:270
← previous
next →
101–200 of 407, ranked by callers