We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 947195c commit 704259fCopy full SHA for 704259f
filprofiler/_ipython.py
@@ -8,7 +8,7 @@
8
from tempfile import mkdtemp
9
10
from IPython.core.magic import Magics, magics_class, cell_magic
11
-from IPython.display import IFrame, display
+from IPython.display import IFrame, display, HTML
12
13
from .api import profile
14
@@ -66,4 +66,7 @@ def run_with_profile(code_to_profile):
66
return profile(code_to_profile, tempdir)
67
finally:
68
svg_path = tempdir / "peak-memory.svg"
69
- display(IFrame(svg_path, width="100%", height="600"))
+ if svg_path.exists():
70
+ display(IFrame(svg_path, width="100%", height="600"))
71
+ else:
72
+ display(HTML("No report generated, perhaps zero memory was allocated."))
0 commit comments