Skip to content
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

Npz sniffing: do not read the whole file #17672

Merged
merged 1 commit into from
Mar 12, 2024

Conversation

bernt-matthias
Copy link
Contributor

@bernt-matthias bernt-matthias commented Mar 12, 2024

I noticed that an upload of https://data.qiime2.org/2024.2/common/silva-138-99-nb-classifier.qza fails because of high memory load (for the file in question 18GB). One can try on usegalaxy.org.

Reason was that the npz sniffer reads the whole file (npz seems to be just zip files).

Also tried to use the mmap_mode for load (https://numpy.org/doc/stable/reference/generated/numpy.load.html) but this changed nothing.

Btw. I used memray which showed me the problem in seconds.

Could also backport further if needed (#11957)

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@github-actions github-actions bot added this to the 24.1 milestone Mar 12, 2024
Copy link
Member

@mvdbeek mvdbeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thank you!

@mvdbeek mvdbeek merged commit bd976d4 into galaxyproject:dev Mar 12, 2024
51 of 56 checks passed
Copy link

This PR was merged without a "kind/" label, please correct.

@mvdbeek
Copy link
Member

mvdbeek commented Mar 12, 2024

Arg, wrong target branch, can you open against 23.2 as well ?

@bernt-matthias bernt-matthias deleted the topic/npz-sniff branch March 12, 2024 14:01
@bernt-matthias bernt-matthias restored the topic/npz-sniff branch March 12, 2024 14:01
@bernt-matthias bernt-matthias changed the title [23.2] Npz sniffing: do not read the whole file Npz sniffing: do not read the whole file Mar 12, 2024
@bernt-matthias
Copy link
Contributor Author

Ups. Sorry: #17674

@bernt-matthias bernt-matthias deleted the topic/npz-sniff branch March 12, 2024 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants