Fix DistilBERT prediction output shape and model loading configuration#495
Merged
cristian-tamblay merged 2 commits intodevelopfrom Mar 25, 2026
Merged
Fix DistilBERT prediction output shape and model loading configuration#495cristian-tamblay merged 2 commits intodevelopfrom
cristian-tamblay merged 2 commits intodevelopfrom
Conversation
Update probability aggregation by stacking arrays for consistent output shape, addressing issues with downstream processing. Add missing logging-related parameters to model loading.
cristian-tamblay
approved these changes
Mar 25, 2026
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.
Summary
Fixes issues in the DistilBERT transformer model affecting binary classification predictions and model loading. Ensures prediction probabilities have a consistent shape and restores missing logging parameters when loading a model, preventing misconfiguration.
Type of Change
Check all that apply like this [x]:
Changes (by file)
Briefly list the important modified files and what was done.
distilbert_transformer.py:predictby appending batch outputs and stacking withnp.vstackto ensure consistent shapes.loadmethod to properly restore logging-related parameters, preventing loss of configuration when reloading models.Testing (optional)