Closed hoechenberger closed 6 months ago
This is by design, it's much more helpful than it is harmful. It fixed a ton of cases where we didn't include information we should have
@larsoner Yep I can see that!
So what should we do about the incorrect logging this causes in some places, like the one I pointed out above? Shall we add some "cleanup" lines that del subject, session, run
if necessary?
Yes just del run
or use a different name like this_run
, either way works
Let's please keep this open as a reminder. There are still several places where this incorrect kind of logging is happening. I will look into this when I have time.
I'm seeing the following output during
preprocessing/run_ica
:As you can see, the messages are grouped under
run-08
.The logs are generated here: https://github.com/mne-tools/mne-bids-pipeline/blob/4f5e4654f508982092432effbd85eaee2a72a12d/mne_bids_pipeline/steps/preprocessing/_06a_run_ica.py#L406-L418
No
run
parameter is passed togen_log_kwargs()
But there's still an old
run
variable loitering around by the time we callgen_log_kwargs(),
and it seems the function then pulls it from the stack and uses it: https://github.com/mne-tools/mne-bids-pipeline/blob/4f5e4654f508982092432effbd85eaee2a72a12d/mne_bids_pipeline/_logging.py#L113-L124Only solution for me for now was to add
del run
before the call togen_log_kwargs()
; then I get the correct output: