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: cartesian products in get_evaluations #3081

Merged
merged 1 commit into from
May 3, 2024
Merged

Conversation

RogerHYang
Copy link
Contributor

No description provided.

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label May 3, 2024
Copy link
Contributor

@anticorrelator anticorrelator left a comment

Choose a reason for hiding this comment

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

do you think it's important to have a test for this one?

@RogerHYang
Copy link
Contributor Author

do you think it's important to have a test for this one?

we don't have a set up for server integration tests in general

connectable,
index_col=["span_id", "document_position"],
)
).set_index(["span_id", "document_position"])
Copy link
Contributor

Choose a reason for hiding this comment

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

Reason to prefer this to index_col?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It didn't work. Don't know why

Copy link
Contributor

Choose a reason for hiding this comment

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

Weird

.join_from(models.Span, models.Trace)
.join_from(models.Trace, models.Project)
.where(models.Project.name == project_name)
.where(models.DocumentAnnotation.annotator_kind == "LLM"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch.

.join_from(models.Span, models.Trace)
.join_from(models.Trace, models.Project)
.where(models.Project.name == project_name)
.where(models.DocumentAnnotation.annotator_kind == "LLM"),
Copy link
Contributor

Choose a reason for hiding this comment

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

So strange to me that sqlalchemy doesn't complain here.

@anticorrelator
Copy link
Contributor

do you think it's important to have a test for this one?

we don't have a set up for server integration tests in general

I think we can seed data use SQLAlchemy and test the query at whatever level you find appropriate, something like here: https://github.com/Arize-ai/phoenix/blob/sql/tests/db/test_models.py, is this setup insufficient to catch this?

Copy link
Contributor

@axiomofjoy axiomofjoy left a comment

Choose a reason for hiding this comment

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

great catches, are we still doing cross joins elsewhere?

@RogerHYang
Copy link
Contributor Author

do you think it's important to have a test for this one?

we don't have a set up for server integration tests in general

I think we can seed data use SQLAlchemy and test the query at whatever level you find appropriate, something like here: https://github.com/Arize-ai/phoenix/blob/sql/tests/db/test_models.py, is this setup insufficient to catch this?

yea, that would work

@RogerHYang RogerHYang merged commit 64ebec8 into sql May 3, 2024
11 checks passed
@RogerHYang RogerHYang deleted the fix-cartesian-products branch May 3, 2024 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants