Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3182 +/- ##
==========================================
- Coverage 97.11% 97.04% -0.08%
==========================================
Files 167 167
Lines 18429 18477 +48
==========================================
+ Hits 17898 17931 +33
- Misses 531 546 +15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
Hi Dennis, just following up on this when you have a chance. It implements the callback approach we discussed in #3171, and all the current checks are passing. |
mahimn01
force-pushed
the
feature/tft-explainer-multi-batch
branch
from
September 5, 2026 00:58
7793091 to
6a725d1
Compare
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.
Checklist before merging this PR:
Fixes #3171.
Summary
TFTExplainer.explain()can now handle more series thanmodel.batch_sizewith onemodel.predict()call.A temporary prediction callback collects the raw attention and variable selection tensors from each batch. The explainer combines them in prediction order before building the existing six outputs. Existing callbacks are preserved, and the temporary collector is removed and cleared on both success and failure.
Distributed prediction is rejected clearly because callback state is process local and cannot safely reconstruct globally ordered results without explicit cross-rank gathering.
Tests cover single and multiple batches, exact batch boundaries, a final partial batch, aligned covariates, the no static covariates case, callback coexistence and failure cleanup, incomplete prediction output, input ordering, and distributed rejection.
Other Information
Validated with all 58 TFT explainer tests and the full 172-test explainability suite under Python 3.11. Pre-commit also passes.