diff --git a/backends/arm/_passes/fold_qdq_with_annotated_qparams_pass.py b/backends/arm/_passes/fold_qdq_with_annotated_qparams_pass.py index 963759bfa6d..4d265534f97 100644 --- a/backends/arm/_passes/fold_qdq_with_annotated_qparams_pass.py +++ b/backends/arm/_passes/fold_qdq_with_annotated_qparams_pass.py @@ -136,8 +136,14 @@ def call(self, graph_module: GraphModule) -> PassResult: continue # Make sure we haven't already set qparams meta information on the node - assert "input_qparams" not in n.meta.keys() - assert "output_qparams" not in n.meta.keys() + assert "input_qparams" not in n.meta, ( + f'Unexpected key "input_qparams" found in meta for node {n}. ' + "input_qparams should not have been set at this point" + ) + assert "output_qparams" not in n.meta, ( + f'Unexpected key "output_qparams" found in meta for node {n}. ' + "output_qparams should not have been set at this point" + ) # for the inputs and outputs search the graph for quantization info and # store the information in a dict with order of the _tensor_ inputs as key,