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 missing argument to OSSHandler's _format_prompt function #373

Merged
merged 9 commits into from
Apr 23, 2024

Conversation

eitanturok
Copy link
Contributor

Overview

In this PR, I added a missing argument to OSSHandler's _format_prompt function.

Also my code formatter sorted the imports alphabetically which accounts for all the other changes, including those in handler_map.py.

What Happened?

In every model handler, we define _format_prompt as taking in three arguments (prompt, function, test_category). This is the standard. But in OSSHandler, _format_prompt is defined as only taking in prompt and function and forgetting to take test_category as an input.

This caused an error. So I simply added test_category to the definition of _format_prompt.

Copy link
Collaborator

@HuanzhiMao HuanzhiMao left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for contributing @eitanturok
btw, which code formatter are you using? The import sorting feature seems handy :)

@eitanturok
Copy link
Contributor Author

It is a code formatter extension in VSCode: https://marketplace.visualstudio.com/items?itemName=ms-python.isort.

Copy link
Contributor

@Fanjia-Yan Fanjia-Yan left a comment

Choose a reason for hiding this comment

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

LGTM, will not influence any of model generation output.

@ShishirPatil ShishirPatil merged commit 1d8d51d into ShishirPatil:main Apr 23, 2024
@eitanturok eitanturok deleted the main-2 branch April 26, 2024 21:40
devanshamin pushed a commit to devanshamin/gorilla that referenced this pull request Jul 9, 2024
…shirPatil#373)

# Overview

In this PR, I added a missing argument to `OSSHandler`'s
`_format_prompt` function.

Also my code formatter sorted the imports alphabetically which accounts
for all the other changes, including those in `handler_map.py`.

# What Happened?

In every model handler, we define `_format_prompt` as taking in three
arguments (`prompt`, `function`, `test_category`). This is the standard.
But in `OSSHandler`, `_format_prompt` is defined as only taking in
`prompt` and `function` and forgetting to take `test_category` as an
input.

This caused an error. So I simply added `test_category` to the
definition of `_format_prompt`.
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.

None yet

4 participants