File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -611,9 +611,7 @@ def convert_string_keys_to_variables():
611
611
f"Found { length_of_nodes_with_matching_names } pytensor variables with name { i } "
612
612
)
613
613
process_input_to_values [
614
- nodes_with_matching_names [
615
- length_of_nodes_with_matching_names - 1
616
- ]
614
+ nodes_with_matching_names [0 ]
617
615
] = inputs_to_values [i ]
618
616
else :
619
617
process_input_to_values [i ] = inputs_to_values [i ]
Original file line number Diff line number Diff line change @@ -313,6 +313,13 @@ def test_eval_errors_having_mulitple_variables_same_name(self):
313
313
with pytest .raises (Exception , match = "Found 2 pytensor variables with name e" ):
314
314
t .eval ({"e" : 1 })
315
315
316
+ def test_eval_errors_with_no_name_exists (self ):
317
+ e = scalars ("e" )
318
+ t = e + 1
319
+ t .name = "p"
320
+ with pytest .raises (Exception , match = "o not found in graph" ):
321
+ t .eval ({"o" : 1 })
322
+
316
323
317
324
class TestAutoName :
318
325
def test_auto_name (self ):
You can’t perform that action at this time.
0 commit comments