Skip to content
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

Handling Component inputs with default values must be done explicitly #7392

Open
davidsbatista opened this issue Mar 20, 2024 · 0 comments
Open
Assignees
Labels
P2 Medium priority, add to the next sprint if no P1 available type:bug Something isn't working

Comments

@davidsbatista
Copy link
Contributor

davidsbatista commented Mar 20, 2024

The two data dicts passed to a pipeline have different behaviours

This makes some components run twice

pipe_from_file.run(
    {"prompt_builder": {"query": query}, 
      "retriever": {'query': 'What is the capital of France?'}
      }
  )

whereas if we explicitly pass the None values to some inputs makes the job of the Pipeline run() method easier

pipe_from_file.run(
    {"prompt_builder": {"query": query}, 
      "retriever": {
          'filters': None, 
          'query': 'What is the capital of France?', 
          'scale_score': None, 
          'top_k': None}
      }
  )

On way to solve this is to overwrite the datadict at the beginning of the run with all the parameters default/None parameters needed for a component.

@davidsbatista davidsbatista self-assigned this Mar 20, 2024
@davidsbatista davidsbatista added P1 High priority, add to the next sprint type:bug Something isn't working labels Mar 20, 2024
@davidsbatista davidsbatista added P2 Medium priority, add to the next sprint if no P1 available and removed P1 High priority, add to the next sprint labels Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Medium priority, add to the next sprint if no P1 available type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant