-
Notifications
You must be signed in to change notification settings - Fork 230
Incorporated kilosort4's setup_logger() function to ensure generation of kilosort4.log file in sorter_output folder #3866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… of kilosort4.log file in sorter_output folder.
for more information, see https://pre-commit.ci
|
At least based on my reading of the errors it seems like they may have played with the arguments for this logging. Hopefully you don't end up needing to do too much logic. Also note we haven't updated for 4.0.31 yet so that test will fail even if you get the logging working on all other versions. |
…ng setup_logger().
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
@zm711 I think it works now up to v4.0.30, please confirm! |
|
yeah that seems to be working for all of them before 0.31. I think we review this now :) I'm a bit busy today and tomorrow, but I can look over this this weekend unless someone else has time before that. |
zm711
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only thing I'm not sure about is should we only do this logging if the user enters that they want spikeinterface in verbose mode? It seems like you removed the check for verbose @nikhilchandra but we try to require the user request verbose rather than have verbosity be the default. So I wonder if we should only have the logger if the user specifies verbose as a kwarg?
|
@zm711 In the original code, when verbose=True then the logging level for what gets printed to the console is INFO. Note that the default logging level is always WARNING. In the new code, the newly inserted setup_logger() function from kilosort creates a StreamHandler that manages console output. In newer versions of Kilosort, setup_logger() has an input argument called verbose_console. When True, the StreamHandler's logging level is set to DEBUG. When False, it is set to INFO. Thus, to replicate the original behavior of spike interface
Note: older versions of Kilosort4 (4.0.16-4.0.18) don't name the logger "kilosort", instead opting to use a blank string "". In other versions, setup_logger() does not accept a verbose_console argument. The rest of my changes are just geared towards ensuring that the above logic works across all supported versions of Kilosort. |
|
Sorry I actually missed line 197 where you do the switch to warning if not verbose. This looks fine to me then. :) |
zm711
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good by me now, @alejoe91 did you want to take a look?
|
Mmm, I don't see the output when verbose=True and I also see progress bars when it is false: In both cases though the log is correctly generated! @nikhilchandra can you take a look? |
|
Actually, I tested this again and it works. The problem is only that with |

Fixes #3782