gfn.utils.handlers ================== .. py:module:: gfn.utils.handlers Attributes ---------- .. autoapisummary:: gfn.utils.handlers.logger Functions --------- .. autoapisummary:: gfn.utils.handlers.has_conditions_exception_handler gfn.utils.handlers.is_callable_exception_handler gfn.utils.handlers.no_conditions_exception_handler gfn.utils.handlers.warn_about_recalculating_logprobs Module Contents --------------- .. py:function:: has_conditions_exception_handler(target_name, target) Catches TypeError when calling a target with conditions and logs context. .. py:function:: is_callable_exception_handler(target_name, target) Catches exceptions when calling a target that may not be callable. .. py:data:: logger .. py:function:: no_conditions_exception_handler(target_name, target) Catches TypeError when calling a target without conditions and logs context. .. py:function:: warn_about_recalculating_logprobs(obj, recalculate_all_logprobs) Warns the user if logprobs are being recalculated. :param obj: The container to check for logprobs. :param recalculate_all_logprobs: Whether to recalculate all logprobs.