Skip to content
← Back to activity

Solution skill

Problem when using pipeline serialization

Version 2Sign in to save

Complete solution

Haystack: problem when using pipeline serialization. The verified fix is Workaround until the fix: disable telemetry with export HAYSTACK_TELEMETRY_ENABLED [False]. Use this when you hit the symptoms above in haystack; not for unrelated haystack errors or general setup questions.

TL;DR

Workaround until the fix: disable telemetry with export HAYSTACKTELEMETRYENABLED [False].

The error

Issue deepset-ai/haystack#7277 (closed, 12 comments): Hello, I woul like to use pipeline serialization. Below is my code for the llm ``` llm: init_parameters: huggingface_pipeline_kwargs: model: mistralai/Mixtral-8x7B-Instruct-v0.1 device_map: auto model_kwargs: bnb_4bit_compute_dtype: torch.bfloat16 bnb_4bit_quant_type: nf4 bnb_4bit_use_double_quant: true load_in_4bit: true #task: text-generation stop_words: null type: haystack.components.generators.hugging_face_local.HuggingFaceLocalGenerator ``` this code will generate the below error: ~/.local/lib/python3.9/site-packages/bitsandbytes/nn/modules.py in forward(self, x) 251 inp_dtype = x.dtype 2

Fix

  1. Workaround until the fix: disable telemetry with export HAYSTACKTELEMETRYENABLED [False].

Success check: the symptom above is gone and the original operation completes.

When to use

  • You hit this exact symptom in haystack.
  • You want the verified fix without digging through the thread.

When not to use

  • A different error in haystack, even a similar-looking one.
  • General haystack setup or credential questions.

Compatibility

  • Haystack (deepset-ai/haystack)

Variant phrasings

  • How to fix "problem when using pipeline serialization" in haystack
  • haystack: problem when using pipeline serialization

Root cause

Same root cause as issue #7255.

Source

  • https://github.com/deepset-ai/haystack/issues/7277

Evidence

In gh:deepset-ai/haystack#7277 (https://github.com/deepset-ai/haystack/issues/7277), someone reported: Issue deepset-ai/haystack#7277 (closed, 12 comments): Hello, I woul like to use pipeline serialization. Below is my code for the llm `` llm: init_parameters: huggingface_pipeline_kwargs: model: mistralai/Mixtral-8x7B-Instruct-v0.1 device_map: auto model_kwargs: bnb_4bit_compute_dtype: torch.bfloat16 bnb_4bit_quant_type: nf4 bnb_4bit_use_double_quant: true load_in_4bit: true #task: text-generation stop_words: null type: haystack.components.generators.hugging_face_local.HuggingFaceLocalGenerator `` this code will generate the below error: ~/.local/lib/python3.9/site-packages/bitsandbytes/nn/modules.py in forward(self, x) 251 inpdtype = x.dtype 2 The verified resolution from the thread: Maintainer anakin87 confirmed this is a real bug: incorrect serialization in telemetry breaks pipeline deserialization with HuggingFaceLocalGenerator kwargs (e.g. bnb4bitcomputedtype: torch.bfloat16 needs quotes). Workaround until the fix: disable telemetry with export HAYSTACKTELEMETRYENABLED [False]. Same root cause as issue #7255.

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_HxwZQIYAF2LcuGBoVTIbqw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Problem when using pipeline serialization <span>— Vectle</span></a>

Problem when using pipeline serialization | Vectle