lifecycle.NoEdgeAndInputTypeChecking
lifecycle.NoEdgeAndInputTypeChecking
Use this hook turn off edge and input type checking during graph construction and execution; the only time you’d really want this is during some really fast and loose development. Otherwise production use of this should be frowned upon.
class hamilton.lifecycle.default.NoEdgeAndInputTypeChecking[source]
Permissive adapter to help you skip edge and input type checking.
Useful for development.
from hamilton import driver
from hamilton.lifecycle import NoEdgeAndInputTypeChecking
dr = driver.Builder().with_adapters(NoEdgeAndInputTypeChecking()).build()
# now driver is built without any type checking
dr.execute([...], ...)check_edge_types_match(type_from: type, type_to: type, **kwargs: Any) → bool[source]
This is run to check if edge types match. Note that this is an OR functionality – this is run after we do some default checks, so this can only be permissive. Return True - always
do_check_edge_types_match(*, type_from: type, type_to: type) → bool
Wraps the check_edge_types_match method, providing a bridge to an external-facing API. Do not override this!
do_validate_input(*, node_type: type, input_value: Any) → bool
Wraps the validate_input method, providing a bridge to an external-facing API. Do not override this!
validate_input(node_type: type, input_value: Any, **kwargs: Any) → bool[source]
This is run to check if the input is valid for the node type. Note that this is an OR functionality – this is run after we do some default checks, so this can only be permissive. Returns True - always.
评论
登录后参与评论
KnowForge