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

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

Closed
wants to merge 1 commit into from

Conversation

iw4p
Copy link
Contributor

@iw4p iw4p commented Apr 23, 2024

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

@facebook-github-bot
Copy link
Contributor

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 cla@meta.com. Thanks!

@facebook-github-bot
Copy link
Contributor

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

Copy link
Contributor

@SimonWan SimonWan left a comment

Choose a reason for hiding this comment

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

This change does not serve exactly the same purpose because we check llms_under_test in addition to args.llm_under_test.
It would be appropriate to extend the if condition to check both.

If you decide to update the commit, please also skip the middle commit in this chain, as it appears mergeable with this one. Thank you for your proposal!

Copy link
Contributor

@SimonWan SimonWan left a comment

Choose a reason for hiding this comment

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

Actually I also just published the change for this format, so you can skip both base commits and then focus on the if condition udpate.

@iw4p
Copy link
Contributor Author

iw4p commented Apr 24, 2024

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

@iw4p
Copy link
Contributor Author

iw4p commented Apr 24, 2024

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 iw4p requested a review from SimonWan April 26, 2024 14:39
Copy link
Contributor

@SimonWan SimonWan left a comment

Choose a reason for hiding this comment

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

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

@iw4p
Copy link
Contributor Author

iw4p commented Apr 26, 2024

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.

Copy link
Contributor

@SimonWan SimonWan left a comment

Choose a reason for hiding this comment

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

Thanks for the update! LGTM

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

@SimonWan merged this pull request in c3afa15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants