From cf7ce600554fd2adb5221b410cabddff5a063002 Mon Sep 17 00:00:00 2001 From: Paul Haase Date: Fri, 16 Dec 2022 09:50:15 +0100 Subject: [PATCH] Fix: - Remove LSA parameters from parameters dict when the sanity check for block_id_and_param_type fails and lsa is disabled --- README.md | 2 +- nnc/compression.py | 3 +++ setup.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 83f3e56..b804a16 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ source env/bin/activate **Note**: For further information on how to set up a virtual python environment (also on **Windows**) refer to https://docs.python.org/3/library/venv.html . -When successfully installed, the software outputs the line : "Successfully installed NNC-0.1.1" +When successfully installed, the software outputs the line : "Successfully installed NNC-0.1.2" ### Importing the main module diff --git a/nnc/compression.py b/nnc/compression.py index dcabe5e..05263aa 100644 --- a/nnc/compression.py +++ b/nnc/compression.py @@ -232,6 +232,9 @@ def compress_model( model_path_or_object, if model_executer: model_executer.model = model_executer.original_model del model_executer.original_model + for key in model_parameters.keys(): + if "weight_scaling" in key: + del model_parameters[key] bitstream = compress( model_parameters, diff --git a/setup.py b/setup.py index 978599c..1b05448 100644 --- a/setup.py +++ b/setup.py @@ -49,7 +49,7 @@ from setuptools.command.build_ext import build_ext import setuptools -__version__ = '0.1.1' +__version__ = '0.1.2' class get_pybind_include(object):