Skip to content

Improve memory usage of Python150kExtractor - #125

Merged
urialon merged 1 commit into
tech-srl:masterfrom
alexhorn:master
Jun 23, 2022
Merged

Improve memory usage of Python150kExtractor#125
urialon merged 1 commit into
tech-srl:masterfrom
alexhorn:master

Conversation

@alexhorn

Copy link
Copy Markdown
Contributor

The Python150kExtractor currently deserializes all objects before splitting them using sklearn. This causes extreme memory usage even with the relatively small py150 dataset and prevents me from running it on a machine with 16 GB of RAM. This PR moves the deserialization after the splitting so that only the serialized objects need to be in memory all at once.

Parse the JSON after splitting the dataset. This improves memory usage because the deserialized objects aren't stored in memory all at once.
@urialon
urialon merged commit 8ca1417 into tech-srl:master Jun 23, 2022
@urialon

urialon commented Jun 23, 2022

Copy link
Copy Markdown
Contributor

Thanks @alexhorn for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants