Skip to content

Conversation

@bejaeger
Copy link
Contributor

Motivation and Context

Provide a way to write out logits of individual estimators to perform analyses on the logit level afterwards.


Public API Changes

  • No Public API changes
  • Yes, Public API changes (Details below)

How Has This Been Tested?


Checklist

  • The changes have been tested locally.
  • Documentation has been updated (if the public API or usage changes).
  • A entry has been added to CHANGELOG.md (if relevant for users).
  • The code follows the project's style guidelines.
  • I have considered the impact of these changes on the public API.

)

* Record copied public PR 534

* introduce predict_raw_logits

* type hint fixes

* make ruff happy

---------

Co-authored-by: mirror-bot <mirror-bot@users.noreply.github.com>
@bejaeger bejaeger requested a review from a team as a code owner October 14, 2025 15:37
@bejaeger bejaeger requested review from Copilot and oscarkey and removed request for a team October 14, 2025 15:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new method predict_raw_logits that returns raw logits for individual estimators without averaging or temperature scaling, enabling logit-level analysis of ensemble components.

Key changes:

  • Added predict_raw_logits method to expose raw logits from individual estimators
  • Extended _raw_predict and forward methods with return_raw_logits parameter to support the new functionality
  • Added comprehensive test coverage for the new method

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/tabpfn/classifier.py Implements predict_raw_logits method and extends internal prediction pipeline to support raw logits output
tests/test_classifier_interface.py Adds test cases to validate the new predict_raw_logits method functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a useful feature to extract raw logits from individual estimators, which is valuable for deeper analysis. The changes are well-implemented, adding a new predict_raw_logits method and correctly propagating the necessary flags through the internal methods. The inclusion of a dedicated test case is also great.

My review includes a few suggestions to improve the clarity of the docstrings for the new boolean flags to avoid ambiguity, and a minor refactoring in the forward method to streamline the logic for building the post-processing pipeline. Overall, this is a solid contribution.

@bejaeger bejaeger enabled auto-merge (squash) October 14, 2025 15:48
@bejaeger bejaeger merged commit 6ca119a into main Oct 14, 2025
10 checks passed
@carterprince
Copy link

hi -- are there plans to add this to regressor.py as well?

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.

4 participants