From bed83b6fc4a41fdfdaea06643950d29d468414f7 Mon Sep 17 00:00:00 2001 From: Kyle Sayers Date: Mon, 2 Dec 2024 23:42:30 +0000 Subject: [PATCH] import ModelCompressor for type checking Signed-off-by: Kyle Sayers --- src/compressed_tensors/utils/helpers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/compressed_tensors/utils/helpers.py b/src/compressed_tensors/utils/helpers.py index db77bccb..9ec522e0 100644 --- a/src/compressed_tensors/utils/helpers.py +++ b/src/compressed_tensors/utils/helpers.py @@ -12,12 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import Any, Dict, Optional +from typing import TYPE_CHECKING, Any, Dict, Optional import torch from transformers import AutoConfig +if TYPE_CHECKING: + from compressed_tensors.compressors import ModelCompressor + + __all__ = [ "infer_compressor_from_model_config", "fix_fsdp_module_name",