-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues serializing a model #65
Comments
We'll look into it. |
Please try now, and serialize the pipeline before running it, which initializes the model. |
Yes, that change makes it work. I tried fastrag built from source at d9097e5, and installed with pip. The one built from source produces a yaml file. One note: v3.0.1 is still present in init.py at Line 4 in d9097e5
So, for this input (with changed models to Phi3.5 instead of Phi3):
I get this Pipeline YAML:
The YAML file doesn't have
I think the deployment error is unrelated to the serialization problem. Because hayhooks fails before actually parsing the file. There is a reported issue related to this problem at deepset-ai/hayhooks#36, This comment deepset-ai/hayhooks#36 (comment) says you have to decorate it with So in summary:
|
Related to #65. Co-authored-by: Nicolas Oliver <dario.n.oliver@intel.com>
Please, check out the latest code and see if the issues are resolved. |
Yes, latest commit produces the following yaml components:
generator:
init_parameters:
compressed_model_dir: OpenVINO/Phi-3-mini-4k-instruct-int4-ov
device_openvino: GPU
generation_kwargs:
max_new_tokens: 100
return_full_text: false
huggingface_pipeline_kwargs:
device: cpu
model: microsoft/Phi-3-mini-4k-instruct
task: text-generation
model: microsoft/Phi-3-mini-4k-instruct
ov_config:
CACHE_DIR: ''
NUM_STREAMS: '1'
PERFORMANCE_HINT: LATENCY
stop_words: null
streaming_callback: null
token:
env_vars:
- HF_API_TOKEN
strict: false
type: env_var
type: fastrag.generators.openvino.OpenVINOGenerator
connections: []
max_loops_allowed: 100
metadata: {} Deployment on hayhooks==0.0.17 works, and exercising the pipeline also works fine! The only thing I wanted to double check was about streaming callbacks. I did a quick test, with So, all good now! Closing this issue as fixed. |
Great! if you have some insights regarding serialization of callbacks, please feel free to open an issue or even a PR. |
Hi,
I am having the following issue serializing the pipeline when I use the OpenVINOGenerator.
The following code reproduce the issue:
The model runs fine, but the serialization part fails (
pipeline.dump(file)
). This is the error message:The intention of serializing the pipeline is to get it deployed with HayHooks. Any hints why this might be happening? is it an issue with this library or with the HayStack framework?
Thanks!
The text was updated successfully, but these errors were encountered: