File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -616,15 +616,15 @@ def eval(
616616 """
617617 from pytensor .compile .function import function
618618
619- on_unused_input = kwargs .get ("on_unused_input" , None )
619+ ignore_unused_input = kwargs .get ("on_unused_input" , None ) in ( "ignore" , "warn" )
620620
621621 def convert_string_keys_to_variables (inputs_to_values ) -> dict ["Variable" , Any ]:
622622 new_input_to_values = {}
623623 for key , value in inputs_to_values .items ():
624624 if isinstance (key , str ):
625625 matching_vars = get_var_by_name ([self ], key )
626626 if not matching_vars :
627- if on_unused_input in [ "raise" , None ] :
627+ if not ignore_unused_input :
628628 raise ValueError (f"{ key } not found in graph" )
629629 elif len (matching_vars ) > 1 :
630630 raise ValueError (f"Found multiple variables with name { key } " )
You can’t perform that action at this time.
0 commit comments