From a21348d76fd6d0d29e4aaa99ba1c4ed24c8291c4 Mon Sep 17 00:00:00 2001 From: Rahul Tuli Date: Mon, 6 May 2024 13:18:49 -0400 Subject: [PATCH 1/3] Use `dict.update(...)` over `|=` as it was added in py39 (#48) --- src/compressed_tensors/compressors/sparse_bitmask.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compressed_tensors/compressors/sparse_bitmask.py b/src/compressed_tensors/compressors/sparse_bitmask.py index b4a4e6f2..abf09fa3 100644 --- a/src/compressed_tensors/compressors/sparse_bitmask.py +++ b/src/compressed_tensors/compressors/sparse_bitmask.py @@ -67,7 +67,7 @@ def compress(self, model_state: Dict[str, Tensor]) -> Dict[str, Tensor]: f"found an existing entry for {key}. The existing entry will " "be replaced." ) - compressed_dict |= bitmask_dict + compressed_dict.update(bitmask_dict) return compressed_dict From 60c8e8ee456976645bfb3963371011f427200129 Mon Sep 17 00:00:00 2001 From: dbogunowicz <97082108+dbogunowicz@users.noreply.github.com> Date: Tue, 7 May 2024 16:18:04 +0200 Subject: [PATCH 2/3] initial commit (#49) --- .../observers/quantization => test_quantization}/__init__.py | 0 .../quantization => test_quantization}/lifecycle/__init__.py | 0 .../quantization => test_quantization}/lifecycle/conftest.py | 0 .../quantization => test_quantization}/lifecycle/test_apply.py | 0 .../lifecycle/test_dynamic_lifecycle.py | 0 .../quantization => test_quantization}/lifecycle/test_forward.py | 0 .../quantization => test_quantization}/lifecycle/test_frozen.py | 0 .../lifecycle/test_initialize.py | 0 .../lifecycle/test_lifecycle.py | 0 .../test_observers}/test_min_max.py | 0 .../quantization => test_quantization}/test_quant_args.py | 0 .../quantization => test_quantization}/test_quant_config.py | 0 .../quantization => test_quantization}/test_quant_scheme.py | 0 13 files changed, 0 insertions(+), 0 deletions(-) rename tests/{compressed_tensors/quantization/observers/quantization => test_quantization}/__init__.py (100%) rename tests/{compressed_tensors/quantization/observers/quantization => test_quantization}/lifecycle/__init__.py (100%) rename tests/{compressed_tensors/quantization/observers/quantization => test_quantization}/lifecycle/conftest.py (100%) rename tests/{compressed_tensors/quantization/observers/quantization => test_quantization}/lifecycle/test_apply.py (100%) rename tests/{compressed_tensors/quantization/observers/quantization => test_quantization}/lifecycle/test_dynamic_lifecycle.py (100%) rename tests/{compressed_tensors/quantization/observers/quantization => test_quantization}/lifecycle/test_forward.py (100%) rename tests/{compressed_tensors/quantization/observers/quantization => test_quantization}/lifecycle/test_frozen.py (100%) rename tests/{compressed_tensors/quantization/observers/quantization => test_quantization}/lifecycle/test_initialize.py (100%) rename tests/{compressed_tensors/quantization/observers/quantization => test_quantization}/lifecycle/test_lifecycle.py (100%) rename tests/{compressed_tensors/quantization/observers => test_quantization/test_observers}/test_min_max.py (100%) rename tests/{compressed_tensors/quantization/observers/quantization => test_quantization}/test_quant_args.py (100%) rename tests/{compressed_tensors/quantization/observers/quantization => test_quantization}/test_quant_config.py (100%) rename tests/{compressed_tensors/quantization/observers/quantization => test_quantization}/test_quant_scheme.py (100%) diff --git a/tests/compressed_tensors/quantization/observers/quantization/__init__.py b/tests/test_quantization/__init__.py similarity index 100% rename from tests/compressed_tensors/quantization/observers/quantization/__init__.py rename to tests/test_quantization/__init__.py diff --git a/tests/compressed_tensors/quantization/observers/quantization/lifecycle/__init__.py b/tests/test_quantization/lifecycle/__init__.py similarity index 100% rename from tests/compressed_tensors/quantization/observers/quantization/lifecycle/__init__.py rename to tests/test_quantization/lifecycle/__init__.py diff --git a/tests/compressed_tensors/quantization/observers/quantization/lifecycle/conftest.py b/tests/test_quantization/lifecycle/conftest.py similarity index 100% rename from tests/compressed_tensors/quantization/observers/quantization/lifecycle/conftest.py rename to tests/test_quantization/lifecycle/conftest.py diff --git a/tests/compressed_tensors/quantization/observers/quantization/lifecycle/test_apply.py b/tests/test_quantization/lifecycle/test_apply.py similarity index 100% rename from tests/compressed_tensors/quantization/observers/quantization/lifecycle/test_apply.py rename to tests/test_quantization/lifecycle/test_apply.py diff --git a/tests/compressed_tensors/quantization/observers/quantization/lifecycle/test_dynamic_lifecycle.py b/tests/test_quantization/lifecycle/test_dynamic_lifecycle.py similarity index 100% rename from tests/compressed_tensors/quantization/observers/quantization/lifecycle/test_dynamic_lifecycle.py rename to tests/test_quantization/lifecycle/test_dynamic_lifecycle.py diff --git a/tests/compressed_tensors/quantization/observers/quantization/lifecycle/test_forward.py b/tests/test_quantization/lifecycle/test_forward.py similarity index 100% rename from tests/compressed_tensors/quantization/observers/quantization/lifecycle/test_forward.py rename to tests/test_quantization/lifecycle/test_forward.py diff --git a/tests/compressed_tensors/quantization/observers/quantization/lifecycle/test_frozen.py b/tests/test_quantization/lifecycle/test_frozen.py similarity index 100% rename from tests/compressed_tensors/quantization/observers/quantization/lifecycle/test_frozen.py rename to tests/test_quantization/lifecycle/test_frozen.py diff --git a/tests/compressed_tensors/quantization/observers/quantization/lifecycle/test_initialize.py b/tests/test_quantization/lifecycle/test_initialize.py similarity index 100% rename from tests/compressed_tensors/quantization/observers/quantization/lifecycle/test_initialize.py rename to tests/test_quantization/lifecycle/test_initialize.py diff --git a/tests/compressed_tensors/quantization/observers/quantization/lifecycle/test_lifecycle.py b/tests/test_quantization/lifecycle/test_lifecycle.py similarity index 100% rename from tests/compressed_tensors/quantization/observers/quantization/lifecycle/test_lifecycle.py rename to tests/test_quantization/lifecycle/test_lifecycle.py diff --git a/tests/compressed_tensors/quantization/observers/test_min_max.py b/tests/test_quantization/test_observers/test_min_max.py similarity index 100% rename from tests/compressed_tensors/quantization/observers/test_min_max.py rename to tests/test_quantization/test_observers/test_min_max.py diff --git a/tests/compressed_tensors/quantization/observers/quantization/test_quant_args.py b/tests/test_quantization/test_quant_args.py similarity index 100% rename from tests/compressed_tensors/quantization/observers/quantization/test_quant_args.py rename to tests/test_quantization/test_quant_args.py diff --git a/tests/compressed_tensors/quantization/observers/quantization/test_quant_config.py b/tests/test_quantization/test_quant_config.py similarity index 100% rename from tests/compressed_tensors/quantization/observers/quantization/test_quant_config.py rename to tests/test_quantization/test_quant_config.py diff --git a/tests/compressed_tensors/quantization/observers/quantization/test_quant_scheme.py b/tests/test_quantization/test_quant_scheme.py similarity index 100% rename from tests/compressed_tensors/quantization/observers/quantization/test_quant_scheme.py rename to tests/test_quantization/test_quant_scheme.py From f7e928b8ceb4ddf15d4c4e7f2abf3824a63a5ce1 Mon Sep 17 00:00:00 2001 From: dbogunowicz <97082108+dbogunowicz@users.noreply.github.com> Date: Tue, 7 May 2024 17:24:54 +0200 Subject: [PATCH 3/3] Update setup.py (#50) --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3d280a2e..999677d1 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ def _setup_extras() -> Dict: setup( name="compressed-tensors", - version="0.3.2", + version="0.3.3", author="Neuralmagic, Inc.", author_email="support@neuralmagic.com", license="Apache 2.0",