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

Adding a test function for OpenAI completion in flaml #951

Merged
merged 48 commits into from
Apr 2, 2023
Merged

Conversation

qingyun-wu
Copy link
Contributor

Why are these changes needed?

Adding a test function in the OpenAI completion such that we can directly evaluate the performance of an OpenAI model with a particular configuration.

Related issue number

Checks

@qingyun-wu qingyun-wu temporarily deployed to openai March 31, 2023 02:27 — with GitHub Actions Inactive
@qingyun-wu qingyun-wu requested review from sonichi and yiranwu0 March 31, 2023 23:29
flaml/integrations/oai/completion.py Outdated Show resolved Hide resolved
flaml/integrations/oai/completion.py Outdated Show resolved Hide resolved
flaml/integrations/oai/completion.py Show resolved Hide resolved
flaml/integrations/oai/completion.py Outdated Show resolved Hide resolved
flaml/integrations/oai/completion.py Outdated Show resolved Hide resolved
result_agg, responses_list, result_list = {}, [], []
metric_keys = None
with diskcache.Cache(cls.cache_path) as cls._cache:
for _, data_i in enumerate(data):
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is it resolved?

flaml/integrations/oai/completion.py Show resolved Hide resolved
flaml/integrations/oai/completion.py Outdated Show resolved Hide resolved
flaml/integrations/oai/completion.py Outdated Show resolved Hide resolved
Copy link
Contributor

@sonichi sonichi left a comment

Choose a reason for hiding this comment

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

Finished a round of review.

notebook/integrate_openai.ipynb Show resolved Hide resolved
Comment on lines 1310 to 1311
"result = oai.Completion.test(test_data, config, success_metrics)\n",
"print('performance on test data with the tuned config:', result)"
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment them?

Copy link
Contributor

Choose a reason for hiding this comment

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

Use " for consistency.

notebook/integrate_chatgpt.ipynb Outdated Show resolved Hide resolved
notebook/integrate_chatgpt.ipynb Outdated Show resolved Hide resolved
test/openai/test_completion.py Outdated Show resolved Hide resolved
website/docs/Examples/Integrate - OpenAI.md Outdated Show resolved Hide resolved
@qingyun-wu qingyun-wu temporarily deployed to openai April 2, 2023 03:35 — with GitHub Actions Inactive
flaml/integrations/oai/completion.py Outdated Show resolved Hide resolved
@sonichi sonichi enabled auto-merge April 2, 2023 04:07
@sonichi sonichi added this pull request to the merge queue Apr 2, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Apr 2, 2023
@sonichi sonichi added this pull request to the merge queue Apr 2, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 2, 2023
@sonichi sonichi added this pull request to the merge queue Apr 2, 2023
Merged via the queue into main with commit 4564100 Apr 2, 2023
@sonichi sonichi deleted the oai_eval branch April 2, 2023 17: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.

4 participants