-
Notifications
You must be signed in to change notification settings - Fork 2
Flash loader updated #118
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
Flash loader updated #118
Conversation
I was suggested to not include too many files hence I didn't change the poetry, requirements and conda files. The loader depends on the joblib library so please install it for reviewing (this is why the check fails) |
Certainly all dependencies should be added. Linting and tests still fail right now (see logs for details) |
Yes. There are some differences in base loader and flash. These are not caught locally by pylint as we are having multiple linters on actions. I will address them. |
The current tests for loaders fail because flash loader throws errors when the config file is not proper. These are caught in the general loader tests since it doesn't pass a config and hence config is just an empty dict. I was trying to account for that by either adding the config file for flash or ignoring the flash loader from tests. Should be not make the tests so they are better generalized? Because I can't seem to have a workaround this. I also find that the pre commit hooks specified only fix/catch some linting issues compared to the github action we have since the action uses multiple linters. I don't see that as feasible considering you can't easily check those lint errors on your local machine. Should we stick to one? |
You can run pylint and mypy locally by executing the commands in the pipeline script. Make sure to have to newest versions of the packages installed, however. Maybe we can also include them in precommit, but i don't know how. |
I cannot get your loader to work. Loading the file always fails with: Your iteration in parse_h5_keys() does not seem to have a proper breaking condition, and tries to read off keys of the final branch (dataset), which fails. This is whith h5py 3.7 and 3.8. I do, however, have solutions for the tests, I think. |
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 could only review the very skeleton, and no functionality yet, because the loader does not work for me (see comments).
flash tests still fail, because the flash loader does not work on files and folders, and because I did not include the test data yet. |
This needs merging or rebasing of main now, which will require some manual tweeking, I believe, as I have changed some details on the loader interface when adding the metadata support in the leaders. I can take care of this, once the other things are addressed (I would not do it now to not outdate my review). |
- using generic exception handling now - utils moved to flash module - attributes removed - moved initliaze paths to utils (new name) - added option for files and runs - metadata support (basic) - other instruments supported like wespe - paths like online-1 now supported
- fix kwds in processor
Great, now I can run the code. I will follow up with some more in-depth review at some later stage. |
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 had a closer look now and tried to understand the code. In general I still don't quite understand all the multi index magic and stuff, I think a very detailed documentation seems necessary here. Also, the outcome seems to me an overly detailed dataframe with a lot of unnecessary information, but that might be up to the user to see it differently. Not sure there is a practical use case for having extractor current per electron... Anyways not as default.
In general, lot of places still miss argument description in doc strings, and typing is not consistently defined. Also for me really slow (2 min for 30 MByte parquet conversion).
Apart from that, looks to be on a good track.
The config file I provided is not default. There is actually no default and is up to the user. You can easily remove the channels you find undesirable. Of course I can discuss with dima to see if we come up with a default later. |
I completely appreciate that. Then let's finalize linting, docstrings and tests and merge soon. |
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.
The code is overall not pretty with these exploded lines forced by the linting, but i guess that is not a problem of this PR.
I added a few comments, and suggest to merge soon, improve later for the performance issues.
…flash still intermediate
fix remaining issues with linting and tests
…r/files to overwrite run data.
Runs loader option
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.
Generally, LGTM now. A few things are still in open discussion threads, but can also be future issues, or are of minor importance. Importantly, the thing should be tested with various datasets at flash.
There are plenty of stuff to be done but that can be done in another PR, so I will merge this now. |
Pull Request Test Coverage Report for Build 5288984075
💛 - Coveralls |
No description provided.