From 5874d4bb2441058ea8f5e1890d9a4f2a82235354 Mon Sep 17 00:00:00 2001 From: Enrico Zelioli Date: Tue, 28 Mar 2023 01:19:17 +0200 Subject: [PATCH] Remove deprecated parameter in torch.onnx.utils._model_to_graph --- nemo/graph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nemo/graph.py b/nemo/graph.py index c29dcef..4a81c88 100644 --- a/nemo/graph.py +++ b/nemo/graph.py @@ -138,9 +138,9 @@ def __init__(self, module, dummy_input): else: with scope_name_workaround(module): try: - graph, _params_dict, _torch_out = torch.onnx.utils._model_to_graph(module, dummy_input, propagate=True, _retain_param_name=True) + graph, _params_dict, _torch_out = torch.onnx.utils._model_to_graph(module, dummy_input, propagate=True) except TypeError: - graph, _params_dict, _torch_out = torch.onnx.utils._model_to_graph(module, dummy_input, _retain_param_name=True) + graph, _params_dict, _torch_out = torch.onnx.utils._model_to_graph(module, dummy_input) input_dict = {} output_dict = {} self.non_unique_names_dict = {}