Closed vferat closed 7 months ago
Hi @vferat. Before start answering to your comments, may I ask you if it is ok for you to convert the bullet list in a checklist? Just to not miss any of your concerns. Of course if this is not a problem.
Got and error while working with freq of type float: Unknown format code 'd' for object of type 'float' I can also recommend using logging instead of print for verbose.
I believe you are working with the selfEEG version uploaded on PyPI or anaconda, which is a few commits behind the main branch. In fact, few days after my submission to JOSS, I've experienced two little bugs in the dataloading module, caused by the window length or the sampling rate not being integer values:
d
instead of f
in the formatting option of the GetEEGPartitionNumber
, which is causing the issue you have reported.__getitem__
method of the EEGDataset
class, simply because the starting and ending index are not integers as expected.Both issues have been solved in the following commit 811356f83f03ad70a511c48467e4812e2c1b6c6a. ('ve also changed the formatting option from 5.0f to 5.2f 88156f55b3f6e059d023c2e05118e690a5e14007)
Why are you still experiencing this issue? Simply because I'm waiting the JOSS review to be done before uploading a post edit version (ideally v0.1.1) on both PyPI and anaconda with all the revision. Really sorry for not having told you about the corrections on the dataloading module.
Hey @fedepup,
No problem, I was indeed using the PIP version, I'll switch to main
to avoid outdated comments. Thanks for the quick reply !
BTW, if you are interested, you can find a GitHub workflow to automatically push a Github release to PYPI here (just make sure to change package the version)
No problem, I was indeed using the PIP version, I'll switch to main to avoid outdated comments.
Thank you and sorry again for the inconvenience.
BTW, if you are interested, you can find a GitHub workflow to automatically push a Github release to PYPI here (just make sure to change package the version)
I will certainly add it in my to-do list!
Hey @fedepup, I've updated my review (first message). Only minor comments, mainly adding a more concrete example in the tutorial section. Otherwise, everything looks good to me ! Nice work !
Thanks for the update, @vferat. I will add another notebook with a more concrete example as soon as possible.
For the error in the SSL_guide
notebook, I think you have run the one in the Notebooks
folder, right? The one in the docs
folder (which I considered the "official" example) has some minor updates based on wmvanvliet revision. In short, I think the error is related to the num_worker
parameter of the pytorch Dataloaders. May I ask you if you can try to run the one in the docs
folder or set the parameter num_worker=0 in the one where you have encountered the error? From my side, if this solves the issue, I will copy the notebooks of the docs
folder inside the notebooks
one so to keep everything updated. (I've run the SSL_guide
in the docs folder notebook with a mac, linux and windows devices, and everything worked fine.)
For the last three points, I think it's not a problem to work on that, but I will do it after the notebook concerns.
Thank you again!
Hi, @vferat. Sorry for making you wait. I've uploaded a new notebook and updated old ones included in the Notebook folder (see this commit e573df17acc1f15a77b0fc94b92aeaa8d23ae3b2 ). Just a comment on the mentioned commit.
Notebook updates: now the notebook folder includes all the updated version of the documentation notebooks, so to be sure to not run any outdated code. Again, for the error you encountered, I'm pretty sure that it was related to the num_worker
argument of the Dataloader being set greater than zero, which was changed to zero in the new version to avoid this problem. Sorry for having forgotten to update such folder.
Use case with real-world data: as you suggested, I've included a new example with the eegbci dataset (also called EEGMMI). I think everything is clearly explained and the code and experimental design simple to understand, but I will leave to you the final decision. To make things easier, I've used an already preprocessed version of such dataset, which was released as a resource for the book "Deep Learning for EEG-based Brain-Computer Interface". Data can be easily downloaded here (I've also included a list of command to run in a notebook cell to download and unzip the data in a "Data" folder).
Hope this will solve all the concerns that are blocking you to fill the documentation entry in your reviewer's checklist. Thank you again.
Additional note: I will come back tomorrow with a new comment assessing all the extra things about the maintenance improvement (which I care a lot), so to close this issue properly.
Hey @fedepup !
I really like the new tutorial and thing I will rely help people not familiar with SSL to have a good start !
I keep this issue open for the maintenance part, but everything LGTM ! Thanks for all the hard work and for providing this software to our community !
Hi, @vferat. First of all, thank you again for having spent some of your precious time in reviewing selfEEG for JOSS. I believe that your suggestions were really helpful in improving the quality of the library and its understanding.
Here is my final comment related to the extra part about code maintenance. All the things were tested in a forked repository and then merged into this one, so to not mess up things. Please refer to #7 and #8 for the complete list of changes (number 8 also includes all the pre-commit autofix).
to add additional tests by installing the "main" version of https://github.com/pytorch/pytorch so as to be able to anticipate the changes needed to remain compatible.
Now tests are run with pytorch nightly instead of with the last stable version
use a test matrix to check compatibility with several OS/python versions
Now tests are performed on all three os systems and on python 3.10 and 3.11
to maintain a simple & clean code base, add codestyle tests or a precommit (example: https://github.com/vferat/pycrostates/blob/main/.pre-commit-config.yaml)
I added a pre-commit with basic things I believe are useful for a python project. I'm not used to pre-commit, so for now I decided to add only things of which I completely understood the functionality. As you can see from #8, the code base improved a lot and I was able to find another typo in the dataloading module and lots of unused import (probably related to my initial tests in a debugging notebook). I'm pretty sure I will add other hooks in the future.
I think this will solve everything and this issue can be closed. But I will leave this decision to you.
Hey all,
I'm opening this issue to allow me to make comments for the JOSS review (openjournals/joss-reviews#6224).
While testing the library:
freq
of typefloat
:Unknown format code 'd' for object of type 'float'
I can also recommend using logging instead ofprint
for verbose.Documentation
Errors
I have tried the library on 3 different computers. For two of them, I encounter the same error while running the
SSL_guide
notebookEverything was working perfectly on the 3rd one.
Code base
This section is not required per say by the JOSS review guidelines, but seems to me to be an important point. I therefore leave you free to address these points or not, and will not delay the review for that reason.
If you want the library to evolve over time, I suggest:
Conclusion
selfEEG
is a functional python library that and should make it easy to apply SSL models on EEG data. The code base is solid. Thanks for all your hard work