From 51c0b928c1972a0f7bb2f7c2a17d56bab7a17fa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20Dupr=C3=A9?= Date: Sat, 7 Feb 2026 12:24:34 +0100 Subject: [PATCH 1/3] improves modelbuilder wrapper --- .github/workflows/documentation.yml | 4 ++-- onnx_diagnostic/helpers/model_builder_helper.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index c6de0b91..6a87645d 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -109,9 +109,9 @@ jobs: grep ERROR doc.txt | grep -v 'l-plot-tiny-llm-export' | grep -v 'Unexpected section title or transition.' exit 1 fi - if [[ $(grep WARNING doc.txt | grep -v 'l-plot-tiny-llm-export' | grep -v 'Inline emphasis start-string' | grep -v 'Definition list ends without a blank line' | grep -v 'Unexpected section title or transition' | grep -v 'Inline strong start-string' | grep -v 'MambaCache' ) ]]; then + if [[ $(grep WARNING doc.txt | grep -v 'l-plot-tiny-llm-export' | grep -v 'Inline emphasis start-string' | grep -v 'Definition list ends without a blank line' | grep -v 'Unexpected section title or transition' | grep -v 'Inline strong start-string' | grep -v 'MambaCache' | grep -v 'duplicate label patch-_patched_patch_transformers-common' ) ]]; then echo "Documentation produces warnings." - grep WARNING doc.txt | grep -v 'l-plot-tiny-llm-export' | grep -v 'Inline emphasis start-string' | grep -v 'Definition list ends without a blank line' | grep -v 'Unexpected section title or transition' | grep -v 'Inline strong start-string' | grep -v 'MambaCache' + grep WARNING doc.txt | grep -v 'l-plot-tiny-llm-export' | grep -v 'Inline emphasis start-string' | grep -v 'Definition list ends without a blank line' | grep -v 'Unexpected section title or transition' | grep -v 'Inline strong start-string' | grep -v 'MambaCache' | grep -v 'duplicate label patch-_patched_patch_transformers-common' exit 1 fi diff --git a/onnx_diagnostic/helpers/model_builder_helper.py b/onnx_diagnostic/helpers/model_builder_helper.py index fa34e4d4..fa6f4186 100644 --- a/onnx_diagnostic/helpers/model_builder_helper.py +++ b/onnx_diagnostic/helpers/model_builder_helper.py @@ -310,7 +310,8 @@ def _post(onnx_model): if not hasattr(config, key): setattr(config, key, getattr(text_config, key)) elif config.architectures[0] == "GptOssForCausalLM": - delattr(config, "quantization_config") + if hasattr(config, "quantization_config"): + delattr(config, "quantization_config") elif ( config.architectures[0] == "PhiMoEForCausalLM" and config.max_position_embeddings != config.original_max_position_embeddings From cdf519876870dd8c40b5185e8c8c50b6e872a0a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20Dupr=C3=A9?= Date: Sat, 7 Feb 2026 12:26:02 +0100 Subject: [PATCH 2/3] fix --- CHANGELOGS.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOGS.rst b/CHANGELOGS.rst index 09ecf385..f3b1086f 100644 --- a/CHANGELOGS.rst +++ b/CHANGELOGS.rst @@ -4,6 +4,7 @@ Change Logs 0.9.1 +++++ +* :pr:`409`: remove one assert in ModelBuilder wrapper * :pr:`408`: fix torch_deepcopy for empty DynamicCache and transformers==5.1.0, 5.2.0 (see https://github.com/huggingface/transformers/pull/43765/) 0.9.0 From be8cf9efcd9c1ed1e877921e549aa0da54e5220a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xavier=20Dupr=C3=A9?= Date: Sat, 7 Feb 2026 12:26:47 +0100 Subject: [PATCH 3/3] doc --- CHANGELOGS.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOGS.rst b/CHANGELOGS.rst index f3b1086f..789673d2 100644 --- a/CHANGELOGS.rst +++ b/CHANGELOGS.rst @@ -4,7 +4,7 @@ Change Logs 0.9.1 +++++ -* :pr:`409`: remove one assert in ModelBuilder wrapper +* :pr:`409`: improves ModelBuilder wrapper * :pr:`408`: fix torch_deepcopy for empty DynamicCache and transformers==5.1.0, 5.2.0 (see https://github.com/huggingface/transformers/pull/43765/) 0.9.0