-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Hitting memory limit for figure generation #3468
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
Comments
I decide to try Option (2). I gamely rewrote matplotlib's plot directive so that it could load cached imagery and committed that imagery to a submodule. The build process should now require no computation from my code, so I'd expect the memory usage to be low. Unfortunately, I'm still hitting the memory consumption limit. But now I really don't know why. The build is at: https://readthedocs.org/projects/richdem/builds/6486214/ |
Okay. Everything is working now. I've stashed the big images in a submodule. I'll write a full report tomorrow. |
I ended up going with Option 2: I still use RTD to generate textual documentation, but generate image documentation on my own computer. To do so, I modified the matplotlib's Sphinx plot directive in the following ways.
I then modified my Sphinx Finally, I saved the resulting imagery in a submodule. In order to update documentation, I now use the following workflow:
Modified
My modified version of |
I'll leave this open in hopes that one of the RTD folks can weigh in about whether there might be a better way of handling this that I haven't thought of. If there isn't, I'm happy to have this issue closed. |
@r-barnes thanks for document all the process here, I don't this there is a better way of handling this. Perhaps you can automate the build of the images in travis instead of doing it locally. |
Details
Expected Result
My project manipulates geospatial raster data. I've included a 16MB test file in the git repo. The documentation includes many beautiful pictures of the test dataset that are generated as the documentation is built using matplotlib's plot directive.
Actual Result
Unfortunately, the build runs out of memory.
Ideas
I could switch to a smaller dataset and hope this uses less memory. This kind of guess-and-check strategy is frustrating and may not be sustainable if the number of images increases.
I could commit the compiled documentation to a separate repo and upload that to RTD. This prevents the repo from growing every time an image changes. I'm not sure how to tell RTD about this documentation, though.
Maybe there's some way of reducing the amount of memory Sphinx is using?
Perhaps you have other thougths? I'm sure I'm not the only one who has had this issue.
The text was updated successfully, but these errors were encountered: