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

feat(python): dspy lm instrumentation #126

Merged
merged 30 commits into from
Jan 24, 2024
Merged

feat(python): dspy lm instrumentation #126

merged 30 commits into from
Jan 24, 2024

Conversation

mikeldking
Copy link
Contributor

@mikeldking mikeldking commented Jan 20, 2024

resolves #124

Adds DSPy instrumentation for all LM sub-classes (language models) as well as anything that inherits a Signature so we can track LLM calls below the signatures.

Screenshot 2024-01-23 at 2 07 51 PM

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@mikeldking mikeldking marked this pull request as ready for review January 23, 2024 21:09
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jan 23, 2024
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Jan 23, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 24, 2024
mikeldking and others added 5 commits January 24, 2024 12:28
…ples/requirements.txt

Co-authored-by: Roger Yang <80478925+RogerHYang@users.noreply.github.com>
…openinference/instrumentation/dspy/__init__.py

Co-authored-by: Roger Yang <80478925+RogerHYang@users.noreply.github.com>
…openinference/instrumentation/dspy/__init__.py

Co-authored-by: Roger Yang <80478925+RogerHYang@users.noreply.github.com>
…openinference/instrumentation/dspy/__init__.py

Co-authored-by: Roger Yang <80478925+RogerHYang@users.noreply.github.com>
mikeldking and others added 4 commits January 24, 2024 12:36
…ples/requirements.txt

Co-authored-by: Roger Yang <80478925+RogerHYang@users.noreply.github.com>
…openinference/instrumentation/dspy/__init__.py

Co-authored-by: Roger Yang <80478925+RogerHYang@users.noreply.github.com>
…openinference/instrumentation/dspy/__init__.py

Co-authored-by: Roger Yang <80478925+RogerHYang@users.noreply.github.com>
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jan 24, 2024
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jan 24, 2024
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jan 24, 2024
Comment on lines +27 to +29

# DSPy produced files
assertion.log
Copy link
Contributor

@axiomofjoy axiomofjoy Jan 24, 2024

Choose a reason for hiding this comment

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

Nit: Might make sense to move to the .gitignore for dspy

Comment on lines +152 to +154
SpanAttributes.OUTPUT_VALUE: json.dumps(
self._prediction_to_output_dict(prediction, signature)
),
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

mikeldking and others added 2 commits January 24, 2024 16:03
…openinference/instrumentation/dspy/__init__.py

Co-authored-by: Xander Song <axiomofjoy@gmail.com>
@mikeldking mikeldking merged commit 92714bc into main Jan 24, 2024
3 checks passed
@mikeldking mikeldking deleted the 124-dspy-lm branch January 24, 2024 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Python][DSPy] trace LM Calls
4 participants