Skip to content

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.

@eitanturok eitanturok requested a review from HuanzhiMao April 22, 2024 13:26
Copy link
Collaborator

@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
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.

4 participants