v2 · Helpers
Legacy v2 partial application, dependency dictionaries, and formatting helpers.
These compatibility APIs ship with the selected source version. See the compatibility overview for other v1/v2 APIs, or migration when upgrading.
API index
| Name | Kind | Defined in |
|---|---|---|
proto_partial | function | params_proto.v2.partial |
clean_ansi | function | params_proto.v2.utils |
dot_to_deps | function | params_proto.v2.utils |
read_deps | function | params_proto.v2.utils |
flatten | function | params_proto.v2.utils |
params_proto.v2.partial
proto_partial
proto_partial(proto: ParamsProto, method = False)Overrides the function with values from the Proto Object.
Parameters
| Parameter | Type / default | Description |
|---|---|---|
proto | ParamsProtorequired | — |
method | —= False | — |
Public imports
These symbols are available from this module. Their definitions are documented in the linked modules.
ParamsProto—params_proto.v2.proto.ParamsProto
params_proto.v2.utils
clean_ansi
clean_ansi(string: str)Parameters
| Parameter | Type / default | Description |
|---|---|---|
string | strrequired | — |
dot_to_deps
dot_to_deps(dot_dict, *prefixes)Parameters
| Parameter | Type / default | Description |
|---|---|---|
dot_dict | —required | — |
*prefixes | —variadic | — |
read_deps
read_deps(*path: str, should_flatten: bool = True) → dictRead YAML configuration file with additional functionality for Fast NeRF.
Parameters
path: path to the config file should_flatten: whether to flatten dicts within the config file
Returns
Dict where the config is flattened and base configuration loaded, if applicable.
Parameters
| Parameter | Type / default | Description |
|---|---|---|
*path | strvariadic | — |
should_flatten | bool= True | Keyword-only parameter. |
Returns
dict
flatten
flatten(nested_dict: dict, parent_key: str = '', sep: str = '.', generic_key: str = '_flatten') → dictFlatten configuration dict. Use the "_flatten: False" key and value to flatten the dict in the YAML configuration files.
Parameters
| Parameter | Type / default | Description |
|---|---|---|
nested_dict | dictrequired | — |
parent_key | str= '' | — |
sep | str= '.' | — |
generic_key | str= '_flatten' | — |
Returns
dict