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

add validation for nans in y and number of classes > 10 #77

Merged
merged 1 commit into from
Jan 23, 2025
Merged

Conversation

LeoGrin
Copy link
Collaborator

@LeoGrin LeoGrin commented Jan 16, 2025

Change Description

Add validation for nans in y, and for number of classes > 10 for classification. This is already checked in the TabPFN local package, but right now be don't pass the error back to the client so the user doesn't see it + it's quite wasteful to send a request when this would fail anyway. In the future it would be good to share more of these function between the client and the local package but I think this is fine for now.
Contrary to the local package we use pd.isnull instead of check_array(force_finite=True) because the latter outputs a warning and behave less well with pd.NA or None values.

If you used new dependencies: Did you add them to requirements.txt?

Who did you ping on Mattermost to review your PR? Please ping that person again whenever you are ready for another review.

Breaking changes

If you made any breaking changes, please update the version number.
Breaking changes are totally fine, we just need to make sure to keep the users informed and the server in sync.

Does this PR break the API? If so, what is the corresponding server commit?

Does this PR break the user interface? If so, why?


Please do not mark comments/conversations as resolved unless you are the assigned reviewer. This helps maintain clarity during the review process.

@LeoGrin LeoGrin requested a review from noahho January 16, 2025 15:21
Copy link
Collaborator

@noahho noahho left a comment

Choose a reason for hiding this comment

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

Is this consistent with the client? Here, again we have some duplications and a shared interface could help?

@LeoGrin
Copy link
Collaborator Author

LeoGrin commented Jan 23, 2025

Mostly consistent, except for this part: "Contrary to the local package we use pd.isnull instead of check_array(force_finite=True) because the latter outputs a warning and behave less well with pd.NA or None values."
Agree once we refactor this should be in a shared package. We could also remove this once errors flow nicely from vertex.

@LeoGrin LeoGrin merged commit a57d3d4 into main Jan 23, 2025
5 checks passed
@LeoGrin LeoGrin deleted the validate_y branch January 23, 2025 09:11
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