Repository navigation
Conversation
Contributor
|
Thank you for the contribution @rminla, it might take us a few more days to properly review it. I'll follow up on this! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue
Fixes #1357
Motivation and Context
On MPS with torch <= 2.14.1,
F.pad(..., value=float("nan"))overwrites its input once the tensor reaches 2^16 rows, even with a zero pad width._prepare_targetsuses it on the train targets, so with >= 65,536 training rows every target came out NaN or another row's value, and predictions collapsed to near-constant with no error (details and repro in the issue).This builds the NaN test rows with
new_fulland appends them withtorch.cat, which gives the same result on every device._prepare_targetsis duplicated in each single-file architecture, so the change is in all five (v2, v2.5, v2.6, v3, v3.5). The comment can go once torch >= 2.15 is the minimum (fixed in nightly2.15.0.dev20261002).Public API Changes
How Has This Been Tested?
tests/test_architectures/test_prepare_targets.py: all five architectures, 65,535 / 65,536 / 70,000 train rows, with and without test rows, on CPU and (when available) MPS. On torch 2.14.1 / M4 Max: 25 MPS cases fail before the change and 60/60 pass after. CI has no MPS runner, so the MPS cases only run on Apple Silicon.TabPFNRegressor(v3.5 weights,device="mps", 1,000 held-out rows): MAE at 65,536 train rows 16.58 -> 7.57, at 70,000 rows 13.70 -> 7.55.Checklist
changelog/README.md), or "no changelog needed" label requested.ruff==0.15.12format and check show no new findings.