PurpleLlama icon indicating copy to clipboard operation
PurpleLlama copied to clipboard

ref: replace if-else chain with dict lookup for response computation

Open iw4p opened this issue 1 year ago • 4 comments
trafficstars

The new code won't waste time creating LLMs if none were specified, and can raise a ValueError right away.

iw4p avatar Apr 23 '24 19:04 iw4p

Hi @iw4p!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

facebook-github-bot avatar Apr 23 '24 19:04 facebook-github-bot

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

facebook-github-bot avatar Apr 23 '24 20:04 facebook-github-bot

Hi SimonWan! Sure, I will ignore the black reformatting commits and just change the if statement. Thank you.

iw4p avatar Apr 24 '24 19:04 iw4p

Hey Simon! Both raise ValueErrors for materialized_llms_under_test and args.llm_under_test have been added. I ignored the black formatting commits too.

iw4p avatar Apr 24 '24 19:04 iw4p

Please address my comments as the current version may still raise unexpected errors. Thank you.

Hi Simon! Thank you. I skipped the old commits and handled the error checking/controlling as you asked.

iw4p avatar Apr 26 '24 16:04 iw4p

@SimonWan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Apr 26 '24 17:04 facebook-github-bot

@SimonWan merged this pull request in meta-llama/PurpleLlama@c3afa152c737bf7fd74939ed13a51bcca483a52d.

facebook-github-bot avatar Apr 26 '24 17:04 facebook-github-bot