Currently, there is no such utility or method to get the exact size of a BQM in memory. Due to the way memory management works in Python finding the memory footprint of a BQM requires a lot of context, as explainedhere. For a specific usage pattern, something that may be useful as an alternative is to get the memory usage of the process. The method of obtaining this information using Python can vary between operating systems.
Here is an ongoing open feature request to make this functionality available: https://github.com/dwavesystems/dimod/issues/668. Please feel free to write a review as it helps in pushing forward such new features.
I hope this helps! Please let us know if you have any other questions.
Comments
Hi Royal,
Currently, there is no such utility or method to get the exact size of a BQM in memory. Due to the way memory management works in Python finding the memory footprint of a BQM requires a lot of context, as explained here. For a specific usage pattern, something that may be useful as an alternative is to get the memory usage of the process. The method of obtaining this information using Python can vary between operating systems.
Here is an ongoing open feature request to make this functionality available: https://github.com/dwavesystems/dimod/issues/668. Please feel free to write a review as it helps in pushing forward such new features.
I hope this helps! Please let us know if you have any other questions.
Please sign in to leave a comment.