memory_profiler
not recording timestamps
#6745
-
Hi, I am trying to profile memory on a code I have. When using memory_profiler if Monai is imported the timestamps are not recorded. There is a warning in the
To reproduce, create a file named #import monai
@profile
def my_func():
a = [1] * (10**6)
b = [2] * (2 * 10**7)
del b
return a
if __name__ == "__main__":
my_func() To run: mprof run --python example.py
mprof plot Timestamps will be recorded depending if Monai is commented out or not. Is Monai using the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @ramonemiliani93, I can't reproduce the error in "projectmonai/monai:1.2.0" image. Thanks! |
Beta Was this translation helpful? Give feedback.
-
@KumoLiu Thanks for the help! Indeed I tried with the image 1.2.0 and 0.8.1 which is my installed version and everything works out. Not sure what could be the problem on my side, I'll try to debug a bit more to understand what is happening. |
Beta Was this translation helpful? Give feedback.
Hi @ramonemiliani93, I can't reproduce the error in "projectmonai/monai:1.2.0" image.
Could you please try the same code in this image?
Thanks!