Skip to content

Commit d1dca35

Browse files
Remove WA for optimum-intel (#3850)
### Changes Remove WA ``` # TODO(AlexanderDokuchaev): WA for huggingface/optimum-intel#1498 from optimum.exporters.tasks import TasksManager # noqa: E402 TasksManager._TRANSFORMERS_TASKS_TO_MODEL_LOADERS["image-text-to-text"] = "AutoModelForImageTextToText" ``` ### Reason for changes Fixed by optimum-intel ### Tests https://github.com/openvinotoolkit/nncf/actions/runs/21210731103 PTQ-787
1 parent 7a895dc commit d1dca35

3 files changed

Lines changed: 0 additions & 16 deletions

File tree

examples/llm_compression/onnx/tiny_llama/main.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@
2727
MODEL_ID = "TinyLlama/TinyLlama-1.1B-Chat-v1.0"
2828
OUTPUT_DIR = ROOT / "tinyllama_compressed"
2929

30-
# TODO(AlexanderDokuchaev): WA for https://github.com/huggingface/optimum-intel/issues/1498
31-
from optimum.exporters.tasks import TasksManager # noqa: E402
32-
33-
TasksManager._TRANSFORMERS_TASKS_TO_MODEL_LOADERS["image-text-to-text"] = "AutoModelForImageTextToText"
34-
3530

3631
def main():
3732
# Export the pretrained model in ONNX format. The OUTPUT_DIR directory

examples/llm_compression/onnx/tiny_llama_scale_estimation/main.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,6 @@
3434
warnings.filterwarnings("ignore", category=torch.jit.TracerWarning)
3535
warnings.filterwarnings("ignore", category=OnnxExporterWarning)
3636

37-
# TODO(AlexanderDokuchaev): WA for https://github.com/huggingface/optimum-intel/issues/1498
38-
from optimum.exporters.tasks import TasksManager # noqa: E402
39-
40-
TasksManager._TRANSFORMERS_TASKS_TO_MODEL_LOADERS["image-text-to-text"] = "AutoModelForImageTextToText"
41-
4237

4338
def tiny_llama_transform_func(
4439
item: dict[str, str], tokenizer: LlamaTokenizerFast, onnx_model: onnx.ModelProto

tests/post_training/test_quantize_conformance.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@
3636
DATA_ROOT = Path(__file__).parent / "data"
3737

3838

39-
# TODO(AlexanderDokuchaev): WA for https://github.com/huggingface/optimum-intel/issues/1498
40-
from optimum.exporters.tasks import TasksManager # noqa: E402
41-
42-
TasksManager._TRANSFORMERS_TASKS_TO_MODEL_LOADERS["image-text-to-text"] = "AutoModelForImageTextToText"
43-
44-
4539
@pytest.fixture(scope="function", name="use_avx2")
4640
def fixture_use_avx2():
4741
old_value = os.environ.get("ONEDNN_MAX_CPU_ISA")

0 commit comments

Comments
 (0)