gfn.utils.handlers¶
Attributes¶
Functions¶
|
Catches TypeError when calling a target with conditions and logs context. |
|
Catches exceptions when calling a target that may not be callable. |
|
Catches TypeError when calling a target without conditions and logs context. |
|
Warns the user if logprobs are being recalculated. |
Module Contents¶
- gfn.utils.handlers.has_conditions_exception_handler(target_name, target)¶
Catches TypeError when calling a target with conditions and logs context.
- Parameters:
target_name (str)
target (Any)
- gfn.utils.handlers.is_callable_exception_handler(target_name, target)¶
Catches exceptions when calling a target that may not be callable.
- Parameters:
target_name (str)
target (Any)
- gfn.utils.handlers.logger¶
- gfn.utils.handlers.no_conditions_exception_handler(target_name, target)¶
Catches TypeError when calling a target without conditions and logs context.
- Parameters:
target_name (str)
target (Any)
- gfn.utils.handlers.warn_about_recalculating_logprobs(obj, recalculate_all_logprobs)¶
Warns the user if logprobs are being recalculated.
- Parameters:
obj (gfn.containers.Container) – The container to check for logprobs.
recalculate_all_logprobs (bool) – Whether to recalculate all logprobs.