diff --git a/pytensor/compile/builders.py b/pytensor/compile/builders.py index f9b9295ff5..ff0b742975 100644 --- a/pytensor/compile/builders.py +++ b/pytensor/compile/builders.py @@ -355,7 +355,7 @@ def __init__( var_counts = {var: inputs.count(var) for var in inputs} duplicated_inputs = [var for var, count in var_counts.items() if count > 1] raise ValueError( - f"There following variables were provided more than once as inputs to the OpFromGraph, resulting in an " + f"The following variables were provided more than once as inputs to the OpFromGraph, resulting in an " f"invalid graph: {duplicated_inputs}. Use dummy variables or var.copy() to distinguish " f"variables when creating the OpFromGraph graph." )