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

reset stats + cache before running #91

wants to merge 1 commit into from

Conversation

StanChan03
Copy link
Collaborator

resetting cache before the test is run

@StanChan03 StanChan03 linked an issue Jan 26, 2025 that may be closed by this pull request
@@ -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):

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.

failing cache test
2 participants