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

reset stats + cache before running #91

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/tests/lm_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,9 @@ def test_disable_operator_cache(setup_models, model):
lm = LM(model="gpt-4o-mini", cache=cache)
lotus.settings.configure(lm=lm, enable_cache=False)

lm.reset_cache()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason why this does not clear the cache properly?

Copy link
Collaborator Author

@StanChan03 StanChan03 Jan 26, 2025

Choose a reason for hiding this comment

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

Oh I think its because when we initialize our model in the tests, I am defining it as lm=LM(model='gpt-40-mini', cache=cache) rather than lm = setup_models[model] since we needed to include the cache arg. So the lm instance may not be using the def print_usage_after_each_test(setup_models):

lm.reset_stats()

data = {
"Course Name": [
"Dynamics and Control of Chemical Processes",
Expand Down
Loading