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 data io for generic PandasTransformComponent #721

Merged
merged 3 commits into from
Dec 12, 2023

Conversation

RobbeSneyders
Copy link
Member

I ran into an issue when using the generic evaluate_ragas component.

component = RetrieverEval(
    module="langchain.llms",
    llm_name="OpenAI",
    llm_kwargs={"openai_api_key": os.environ["OPENAI_KEY"]},
    produces={
        "context_precision": pa.float32(),
        "context_relevancy": pa.float32(),
    },
)

Lead to the following error:

ValueError: Fields ['context_precision', 'context_relevancy'] defined in output dataset but not found in dataframe

Because we were not using the operation_spec yet for the PandasTransformComponent. I think we can reduce the chance of similar errors in the future by only passing the operation_spec to the component, but then we'll need to include the other information from the component spec in there as well.

Copy link
Contributor

@mrchtr mrchtr left a comment

Choose a reason for hiding this comment

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

Thanks @RobbeSneyders!

@RobbeSneyders RobbeSneyders merged commit 6780012 into main Dec 12, 2023
6 checks passed
@RobbeSneyders RobbeSneyders deleted the bugfix/generic-transform-component branch December 12, 2023 15:49
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