Describe the bug
A clear and concise description of what the bug is.
I am using a pipeline that uses a PromptModel with an invocation_layer_class specified, to deploy Haystack API via docker.
On executing docker-compose up this will result in the error described below.
yml file:
name: PromptModel
params:
api_key: EMPTY
invocation_layer_class: !!python/name:haystack.nodes.prompt.invocation_layer.open_ai.OpenAIInvocationLayer ''
max_length: 1024
model_kwargs:
api_base: http://localhost:8100/v1
maximum_context_length: 2048
type: PromptModel
Error message
Error that was thrown (if available)
yaml.constructor.ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python/name:haystack.nodes.prompt.invocation_layer.open_ai.OpenAIInvocationLayer'
Expected behavior
A clear and concise description of what you expected to happen.
I expected the pipleline to load correctly.
Additional context
Add any other context about the problem here, like document types / preprocessing steps / settings of reader etc.
The issue has been replicated by @anakin87
To Reproduce
Steps to reproduce the behavior
- Serialize a pipeline with a
PromptModel with invocation_layer_class param, to yaml
- Load the pipeline in the haystack api docker container
FAQ Check
System:
- OS: Windows11 + WSL2
- GPU/CPU: GPU
- Haystack version (commit or version number): 1.22.1
- DocumentStore: WeaviateDocumentStore
- Reader: -
- Retriever: EmbeddingRetriever
Describe the bug
A clear and concise description of what the bug is.
I am using a pipeline that uses a
PromptModelwith aninvocation_layer_classspecified, to deploy Haystack API via docker.On executing docker-compose up this will result in the error described below.
yml file:
name: PromptModel
params:
api_key: EMPTY
invocation_layer_class: !!python/name:haystack.nodes.prompt.invocation_layer.open_ai.OpenAIInvocationLayer ''
max_length: 1024
model_kwargs:
api_base: http://localhost:8100/v1
maximum_context_length: 2048
type: PromptModel
Error message
Error that was thrown (if available)
yaml.constructor.ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python/name:haystack.nodes.prompt.invocation_layer.open_ai.OpenAIInvocationLayer'Expected behavior
A clear and concise description of what you expected to happen.
I expected the pipleline to load correctly.
Additional context
Add any other context about the problem here, like document types / preprocessing steps / settings of reader etc.
The issue has been replicated by @anakin87
To Reproduce
Steps to reproduce the behavior
PromptModelwithinvocation_layer_classparam, to yamlFAQ Check
System: