From c3af0b6964b750d85e41f8aad6083c6688e1ae48 Mon Sep 17 00:00:00 2001 From: Lucas Lopez <lucas.lopezmape@cea.fr> Date: Fri, 21 Feb 2025 10:59:34 +0000 Subject: [PATCH] Apply 2 suggestion(s) to 2 file(s) Co-authored-by: Cyril Moineau <cyril.moineau@cea.fr> --- aidge_quantization/freezeProducers.py | 2 +- python_binding/recipes/pybind_ONNXRecipes.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aidge_quantization/freezeProducers.py b/aidge_quantization/freezeProducers.py index a6ee484..8783971 100644 --- a/aidge_quantization/freezeProducers.py +++ b/aidge_quantization/freezeProducers.py @@ -34,5 +34,5 @@ def freeze_weights(graphview: aidge_core.GraphView, all_producers: bool = False) while(parent_node.type() != "Producer"): parent_node = parent_node.get_parent(0) if parent_node is None: - raise ValueError ("error, producer not found") + raise RuntimeError(f"Could not find a parent producer for node {node.name()}") parent_node.get_operator().attr.set_attr("constant",True) diff --git a/python_binding/recipes/pybind_ONNXRecipes.cpp b/python_binding/recipes/pybind_ONNXRecipes.cpp index d1ea339..9664f76 100644 --- a/python_binding/recipes/pybind_ONNXRecipes.cpp +++ b/python_binding/recipes/pybind_ONNXRecipes.cpp @@ -21,7 +21,7 @@ namespace Aidge { void init_ONNXRecipes(py::module &m) { - m.def("quantize_matching_to_export", &quantizeMatchingtoExport, py::arg("graphView"), py::arg("qop")=true,py::arg("fold_weights")=true); + m.def("quantize_matching_to_export", &quantizeMatchingtoExport, py::arg("graph_view"), py::arg("qop")=true, py::arg("fold_weights")=true); } -- GitLab