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

Add Prompt Driver extra params field #1291

Merged
merged 3 commits into from
Oct 28, 2024
Merged

Add Prompt Driver extra params field #1291

merged 3 commits into from
Oct 28, 2024

Conversation

collindutter
Copy link
Member

@collindutter collindutter commented Oct 25, 2024

Describe your changes

Added

  • BasePromptDriver.extra_params for passing extra parameters not explicitly declared by the Driver.

Changed

  • BREAKING: Removed HuggingFaceHubPromptDriver.params, use HuggingFaceHubPromptDriver.extra_params instead.
  • BREAKING: Removed HuggingFacePipelinePromptDriver.params, use HuggingFacePipelinePromptDriver.extra_params instead.

Issue ticket number and link

Closes #236
Closes #293

Copy link

codecov bot commented Oct 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

@@ -128,6 +128,7 @@ def _base_params(self, prompt_stack: PromptStack) -> dict:
else {}
),
**({"preamble": preamble} if preamble else {}),
**self.extra_params,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question for all, should extra_params be able to overwrite all other parameters?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my suspicion is yes, but it could lead to weird behavior

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While it could allow users to shoot themselves in the foot, I don't think we should block behavior.

@collindutter collindutter merged commit 70a7647 into dev Oct 28, 2024
14 checks passed
@collindutter collindutter deleted the feature/extra-params branch October 28, 2024 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Evaluate which other configuration variables are missing (e.g. Top K) Support for topP in BasePromptDriver
2 participants