gt4sd.cli.load_arguments_from_dataclass module

Functions to facilitate conversion from dataclasses to training descriptions.

Summary

Functions:

extract_fields_from_class

Extract arguments from dataclass.

find_type

Convert type class to string.

Reference

find_type(input_type)[source]

Convert type class to string.

Parameters

input_type (Type) – type to be converted to string.

Return type

Optional[str, None]

Returns

string of the type or None in case the given type is not supported.

extract_fields_from_class(dataclass)[source]

Extract arguments from dataclass.

Parameters

dataclass (Type) – Dataclass to contains the arguments.

Return type

Dict[str, Any]

Returns

Dictionary of the existing arguments including their type, description and default value.