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

fix: dont undo if not done #368

Merged
merged 1 commit into from
Aug 21, 2024
Merged

fix: dont undo if not done #368

merged 1 commit into from
Aug 21, 2024

Conversation

bboynton97
Copy link
Contributor

If stop_instrumenting() is called when instrumenting has not be set up, the code would replace all of the provider completion functions with None.

This fixes that and only undoes instrumentation if it has been set up already.

Not related, but #256 made me think about this and catch the bug before it came up!

@bboynton97 bboynton97 requested review from siyangqiu and HowieG August 21, 2024 00:32
@bboynton97 bboynton97 enabled auto-merge (squash) August 21, 2024 00:32
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

Attention: Patch coverage is 0% with 26 lines in your changes missing coverage. Please review.

Files Patch % Lines
agentops/llms/litellm.py 0.00% 7 Missing ⚠️
agentops/llms/cohere.py 0.00% 5 Missing ⚠️
agentops/llms/openai.py 0.00% 5 Missing ⚠️
agentops/llms/anthropic.py 0.00% 4 Missing ⚠️
agentops/llms/groq.py 0.00% 4 Missing ⚠️
agentops/llms/ollama.py 0.00% 1 Missing ⚠️
Flag Coverage Δ
unittests 43.45% <0.00%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
agentops/llms/ollama.py 25.31% <0.00%> (ø)
agentops/llms/anthropic.py 12.58% <0.00%> (-0.09%) ⬇️
agentops/llms/groq.py 16.51% <0.00%> (-0.16%) ⬇️
agentops/llms/cohere.py 14.00% <0.00%> (-0.10%) ⬇️
agentops/llms/openai.py 13.88% <0.00%> (-0.10%) ⬇️
agentops/llms/litellm.py 15.21% <0.00%> (-0.12%) ⬇️

@bboynton97 bboynton97 merged commit 84c8557 into main Aug 21, 2024
11 of 13 checks passed
@bboynton97 bboynton97 deleted the dont-stop-instrumenting branch August 21, 2024 20:37
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.

2 participants