General Package Utility Functions
Utility functions useful for various package things like
getting the signature matching
-
boa.utils.get_callable_signature(callable: Callable) → Signature[source]
- Parameters:
callable (Callable) –
- Return type:
Signature
-
boa.utils.get_dictionary_matching_signature(signature: Signature, d: dict, match_private: bool = False, exclude_fields: Optional[list[str]] = None, accept_all_kwargs: bool = True) → dict[source]
- Parameters:
-
- Return type:
dict
-
boa.utils.get_dictionary_from_callable(callable: Callable, d: dict, **kwargs) → dict[source]
- Parameters:
-
- Return type:
dict
-
boa.utils.serialize_init_args(class_, *, parents: Optional[list[Type]] = None, match_private: bool = False, **kwargs)[source]
Given an object, return a dictionary of the arguments that are
needed by its constructor.
- Parameters:
-
Given a dictionary, extract the arguments required for the
given class’s constructor.
- Parameters:
-
- Return type:
dict[str, Any]
-
boa.utils.torch_device()[source]
-
boa.utils.convert_type(maybe_iterable, conversion: dict, new_dict: Optional[dict] = None)[source]
- Parameters:
-