Skip to content

fix(interpretability): allow inf-masking SHAP on the remote backends - #391

Merged
safaricd merged 2 commits into
mainfrom
inf-explainer-self-hosted-support
Sep 1, 2026
Merged

fix(interpretability): allow inf-masking SHAP on the remote backends#391
safaricd merged 2 commits into
mainfrom
inf-explainer-self-hosted-support

Conversation

@safaricd

@safaricd safaricd commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Changes

  • The guard refused every remote backend. _model_has_inf_passthrough read only get_inference_config(), which no client estimator has, so get_tabpfn_inf_explainer rejected configurations that work. The premise that PASSTHROUGH_INF is local-only is wrong: inference_config is a field both the managed API and a self-hosted container accept, and each forwards it to the TabPFN it runs.
  • It now reads either place the flag can live — a local model's resolved config as before, or the raw inference_config argument otherwise. A local model's resolved config still wins, which a test pins.
  • Both backends were tested, not assumed. +inf without the flag is rejected either way (container 500, API 422 Input X contains infinity); with it both predict normally, and the API's output moves away from the finite baseline, so the masking reaches the model.
  • Docs and tests corrected — the path was documented as local-only.
  • Self-hosted JSON payloads additionally need the hosted estimator's non-finite serialization fix, without which +inf never leaves the client. The managed backend uploads Parquet and is unaffected.

Reviewer notes

  • Depends on feat(hosted): add use_kv_cache, fix estimator type and non-finite JSON tabpfn-client#372 for the self-hosted path; merge that first. The managed API path works against released tabpfn-client.
  • New tests use stubs, since tabpfn-client is not a test dependency here. They are currently the only tests in this file that run without local model weights.
  • Suite on this branch: 53 passed vs 49 on main, with the same 51 pre-existing failures (TabPFNLicenseError — no local weights in this environment).

🤖 Generated with Claude Code

https://claude.ai/code/session_01AsHuhQhqWz3EkVVtPbdBBa

safaricd and others added 2 commits September 1, 2026 11:24
## Changes

- **The guard refused every remote backend.**
  `_model_has_inf_passthrough` read only `get_inference_config()`, which no
  client estimator has, so `get_tabpfn_inf_explainer` rejected
  configurations that work. The premise that `PASSTHROUGH_INF` is
  local-only is wrong: `inference_config` is a field both the managed API
  and a self-hosted container accept, and each forwards it to the TabPFN it
  runs.
- **It now reads either place the flag can live** — a local model's
  resolved config as before, or the raw `inference_config` argument
  otherwise. A local model's resolved config still wins, which a test pins.
- **Both backends were tested, not assumed.** `+inf` without the flag is
  rejected either way (container 500, API `422 Input X contains infinity`);
  with it both predict normally, and the API's output moves away from the
  finite baseline, so the masking reaches the model.
- **Docs and tests corrected** — the path was documented as local-only.
- Self-hosted JSON payloads additionally need the hosted estimator's
  non-finite serialization fix, without which `+inf` never leaves the
  client. The managed backend uploads Parquet and is unaffected.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AsHuhQhqWz3EkVVtPbdBBa
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AsHuhQhqWz3EkVVtPbdBBa
@safaricd
safaricd merged commit 4205d27 into main Sep 1, 2026
17 checks passed
@safaricd
safaricd deleted the inf-explainer-self-hosted-support branch September 1, 2026 12:15
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