-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Error loading pipeline yaml with empty strings #3642
Comments
Suggestion: change the pattern to |
Hi @danielfleischer, Thanks for pointing out this issue. We are looking into it. Can you also share your exact use case? so that it can help us reproduce this issue? |
Sure. Simplest example is creating an elasticsearch component: components:
- name: Store
params:
host: localhost
index: text_1
password: ""
port: 80
username: ""
type: ElasticsearchDocumentStore
- name: Retriever
params:
document_store: Store
type: ElasticsearchRetriever
pipelines:
- name: my_pipeline
nodes:
- inputs:
- Query
name: Retriever
version: 1.11.0 Thanks for looking into it. |
Going to add this to the backlog. @danielfleischer your proposed solution seems the right one, feel free to go ahead and open a PR to speed up things. |
Empty strings are valid yaml/json/python objects and should be allowed in configurations. Examples (equivalent): ```yaml password: password: "" ``` Related to deepset-ai#3642.
@masci fyi about the origin of that regex: #2214 (comment) |
YAML supports empty strings as "" or ''. I need to provide an empty string as a parameter to one of the classes. When loading a pipeline from that YAML file using
haystack.Pipeline.load_from_yaml
I get an exception. This is due to the following code:haystack/haystack/pipelines/config.py
Line 136 in af06519
Error message
Expected behavior
Empty string have their uses and are valid JSON/YAML/Python objects and should be valid as values.
System:
Thanks!
The text was updated successfully, but these errors were encountered: