ipython
Transforms all executions in IPython to execute with lineapy, by adding to
input_transformers_post
. You can find more documentations below:
https://ipython.readthedocs.io/en/stable/config/inputtransforms.html
CellsExecutedState
dataclass
Source code in lineapy/editors/ipython.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
create_visualize_display_object()
Returns a jupyter display object for the visualization.
Source code in lineapy/editors/ipython.py
63 64 65 66 67 68 69 |
|
custom_get_exc_info(*args, **kwargs)
A custom get_exc_info which will transform exceptions raised from the users code to remove our frames that we have added.
Add an extra frame on top (in the AddFrame
call), since ipython will
strip out the first one (might change in future versions), which is
probably also for similar reasons as us.
Source code in lineapy/editors/ipython.py
236 237 238 239 240 241 242 243 244 245 246 247 248 |
|
input_transformer_post(lines, session_name=None)
Translate the lines of code for the cell provided by ipython.
Source code in lineapy/editors/ipython.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
|
start(session_name=None, db_url=None, ipython=None)
Initializing the runtime so that the cells are traced with lineapy.
Source code in lineapy/editors/ipython.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
|
stop()
Stop tracing if the stop()
was called in the cell and should_stop was set.
Also track the lib information (would be the most complete).
Source code in lineapy/editors/ipython.py
220 221 222 223 224 225 226 227 228 |
|
visualize(*, live=False)
Display a visualization of the Linea graph from this session using Graphviz.
If live=True
, then this visualization will live update after cell execution.
Note that this comes with a substantial performance penalty, so it is False
by default.
Note
If the visualization is not live, it will print out the visualization
as of the previous cell execution, not the one where visualize
is executed.
Source code in lineapy/editors/ipython.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 |
|