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(evaluate): fix evaluate dict merge for pydantic #1490

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

MSNP1381
Copy link

it had error when your module's output was a pydantic object rather that a dict

Copy link
Collaborator

@arnavsinghvi11 arnavsinghvi11 left a comment

Choose a reason for hiding this comment

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

Thanks @MSNP1381 ! left some minor comments to avoid extraneous changes togpt3.py but the changes to evaluate LGTM

from dsp.utils.settings import settings


def is_module_installed(module_name):
Copy link
Collaborator

Choose a reason for hiding this comment

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

just curious why this is needed. does the try/except block not take care of this check if langfuse is not supported?

@@ -111,6 +122,11 @@ def __init__(
def _openai_client(self):
return openai

# TODO: add test suite to me.
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove extra code

@MSNP1381
Copy link
Author

Thanks @MSNP1381 ! left some minor comments to avoid extraneous changes togpt3.py but the changes to evaluate LGTM

i just added the code comments but the merge function is unstable be cause there is varying type of output for modules. My opinion is either we just use pydantic Object or any inherited objects or user have to follow some basic interfaces (as simple as dict interface))

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