Skip to content

fix(finetune): fix variable shadowing that broke per-predictor trace filtering#11

Open
isaacbmiller wants to merge 1 commit intomainfrom
fix/bootstrap-finetune-variable-shadowing
Open

fix(finetune): fix variable shadowing that broke per-predictor trace filtering#11
isaacbmiller wants to merge 1 commit intomainfrom
fix/bootstrap-finetune-variable-shadowing

Conversation

@isaacbmiller
Copy link
Copy Markdown

The loop variable pred_ind in _prepare_finetune_data shadows the function
parameter of the same name. This causes the filter condition
pred_ind == pred_ind to always evaluate to True (self-comparison),
meaning all predictor traces are included regardless of the pred_ind
parameter.

When multitask=False, each predictor should only receive its own traces
for fine-tuning, but due to this shadowing bug, every predictor receives
all traces — effectively behaving the same as multitask=True.

Fix: rename the loop variable to trace_ind to avoid shadowing.

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.

1 participant