add validation for nans in y and number of classes > 10 #77
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 ofcheck_array(force_finite=True)
because the latter outputs a warning and behave less well withpd.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.