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

Exact caching for ChatGPT is not enabled #1195

Closed
2 tasks done
jiashenC opened this issue Sep 22, 2023 · 0 comments · Fixed by #1203
Closed
2 tasks done

Exact caching for ChatGPT is not enabled #1195

jiashenC opened this issue Sep 22, 2023 · 0 comments · Fixed by #1203
Assignees
Labels
Optimizations Features/Bugs related to optimizations
Milestone

Comments

@jiashenC
Copy link
Member

Search before asking

  • I have searched the EvaDB issues and found no similar bug report.

Bug

Steps that I did to enable it

  1. Add ChatGPT to evadb/constants.py
  2. Modify the cacheable parameter for the ChatGPT function.

Code to reproduce it (can be copied to a test file and run)

execute_query_fetch_all(self.evadb, f"CREATE TABLE fruitTable (data TEXT(100))")
data_list = [
    "The color of apple is red",
    "The color of banana is yellow",
]
for data in data_list:
    execute_query_fetch_all(self.evadb, f"INSERT INTO fruitTable (data) VALUES ('{data}')")

import os
os.environ["OPENAI_KEY"] = "sk-..."
select_query = """SELECT ChatGPT('What is the fruit described in this sentence', data)
    FROM fruitTable"""
batches, exec_times = self._reuse_experiment([select_query, select_query])
self._verify_reuse_correctness(select_query, batches[1])
print(exec_times[0], exec_times[1])
print(batches[0].frames)
self.assertTrue(exec_times[0] > exec_times[1])

I don't see the outputs being generated from the cache. Do I miss something here?

Environment

No response

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@jiashenC jiashenC added the Optimizations Features/Bugs related to optimizations label Sep 22, 2023
@jiashenC jiashenC modified the milestones: Long Term Goal, v0.3.7 Sep 22, 2023
@xzdandy xzdandy moved this to Ideation in EVA Public Roadmap ⚡🚀 Sep 22, 2023
@xzdandy xzdandy moved this from Ideation to In Progress in EVA Public Roadmap ⚡🚀 Sep 22, 2023
@xzdandy xzdandy linked a pull request Sep 24, 2023 that will close this issue
@xzdandy xzdandy moved this from In Progress to In Review in EVA Public Roadmap ⚡🚀 Sep 24, 2023
@github-project-automation github-project-automation bot moved this from In Review to Done in EVA Public Roadmap ⚡🚀 Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Optimizations Features/Bugs related to optimizations
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant