You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Instrument and trace or profile Jupyter cells with [Score-P](https://score-p.org/).
15
+
The extension allows you to take coarse-grained performance measurements and create visualizations in your Python kernels.
16
16
17
-
For binding to Score-P, the kernel uses the [Score-P Python bindings](https://github.com/score-p/scorep_binding_python). Monitoring does not rely on Score-P and you can use it without a Score-P installation.
17
+
-Score-P Jupyter kernel Python (this repository)
18
18
19
+
The Score-P kernel allows you to instrument, and trace or profile your Python code in Jupyter using [Score-P](https://score-p.org/).
20
+
21
+
For binding to Score-P, the kernel uses the [Score-P Python bindings](https://github.com/score-p/scorep_binding_python).
19
22
20
23
21
24
# Table of Content
@@ -24,7 +27,6 @@ For binding to Score-P, the kernel uses the [Score-P Python bindings](https://gi
-[Configuring Score-P in Jupyter](#configuring-score-p-in-jupyter)
30
32
-[Multi-Cell Mode](#multi-cell-mode)
@@ -33,18 +35,19 @@ For binding to Score-P, the kernel uses the [Score-P Python bindings](https://gi
33
35
-[Limitations](#limitations)
34
36
-[Serialization Type Support](#serialization-type-support)
35
37
-[Overhead](#overhead)
38
+
-[Logging Configuration](#logging-configuration)
36
39
-[Future Work](#future-work)
37
40
-[Citing](#citing)
38
41
-[Contact](#contact)
39
42
-[Acknowledgments](#acknowledgments)
40
43
41
44
# Installation
42
45
43
-
To install the kernel and required dependencies for supporting the monitoring features:
46
+
To install the kernel and required dependencies:
44
47
45
48
```
46
-
pip install jumper-kernel
47
-
python -m jumper.install
49
+
pip install scorep_jupyter
50
+
python -m scorep_jupyter.install
48
51
```
49
52
50
53
You can also build the kernel from source via:
@@ -54,75 +57,31 @@ pip install .
54
57
```
55
58
56
59
The kernel will then be installed in your active python environment.
57
-
You can select the kernel in Jupyter as `jumper`.
60
+
You can select the kernel in Jupyter as `Score-P_Python`.
58
61
59
62
**For using the Score-P features of the kernel you need a proper Score-P installation.**
60
-
Note: this is not required for the monitoring feature of system metrics.
61
-
62
-
```
63
-
pip install scorep
64
-
```
65
63
66
64
From the Score-P Python bindings:
67
65
68
66
> You need at least Score-P 5.0, build with `--enable-shared` and the gcc compiler plugin.
69
67
> Please make sure that `scorep-config` is in your `PATH` variable.
70
68
> For Ubuntu LTS systems there is a non-official ppa of Score-P available: https://launchpad.net/~andreasgocht/+archive/ubuntu/scorep .
71
69
72
-
73
-
# Usage
74
-
75
-
## Monitoring
76
-
77
-
Every cell that is executed will be monitored by a parallel running process that collects system metrics for CPU, Memory, IO and if available GPU. Besides that, Jumper forwards the execution of that code to the default Python kernel.
78
-
79
-
The frequency for performance monitoring can be set via the `JUMPER_REPORT_FREQUENCY`environment variable.
70
+
To use the coarse-grained performance measurements, simply install the JUmPER extension via:
80
71
81
72
```
82
-
%env JUMPER_REPORT_FREQUENCY=2
73
+
pip install jumper_extension
83
74
```
84
75
85
-
Additionally, the number of reports required to store performance data can be defined by the `JUMPER_REPORTS_MIN` environment variable.
76
+
Then load it in a Jupyter cell with:
86
77
87
78
```
88
-
%env JUMPER_REPORTS_MIN=2
79
+
%load_ext jumper_extension
89
80
```
90
81
91
-
The performance data is recorded in-memory and the kernel provides several magic commands to display and interact with the data:
92
-
93
-
94
-

95
-
96
-
`%%display_code_history`
97
-
98
-
Shows the history of the code of monitored cells with index and timestamp.
99
-
100
-
`%%display_code_for_index`
101
-
102
-
Shows the code for the cell of the selected index.
103
-
104
-
105
-

82
+
You can find usage information in the repository of the extension.
106
83
107
-
`%%display_graph_for_last`
108
-
109
-
Shows the performance display for the last monitored cell.
110
-
111
-
`%%display_graph_for_index [index]`
112
-
113
-
Shows the performance display for the cell of the selected index.
114
-
115
-
`%%display_graph_for_all`
116
-
117
-
Shows the accumulated performance display for all monitored cells.
118
-
119
-
`%%perfdata_to_variable [varname]`
120
-
121
-
Exports the performance data to a variable
122
-
123
-
`%%perfdata_to_json [filename]`
124
-
125
-
Exports the performance data and the code to json files.
84
+
# Usage
126
85
127
86
## Score-P Instrumentation
128
87
@@ -228,8 +187,6 @@ Stops the marking process and writes the marked cells in a Python script. Additi
228
187
229
188
# Presentation of Performance Data
230
189
231
-
For the monitoring data, use the build-in magic commands or build your own visualizations after exporting the data to a variable or json via the introduced magic commands.
232
-
233
190
To inspect the Score-P collected performance data, use tools as Vampir (Trace) or Cube (Profile).
234
191
235
192
# Limitations
@@ -249,20 +206,26 @@ When dealing with big data structures, there might be a big runtime overhead at
249
206
## Logging Configuration
250
207
To adjust logging and obtain more detailed output about the behavior of the JUmPER kernel, refer to the `src/logging_config.py` file.
251
208
252
-
This file contains configuration options for controlling the verbosity, format, and destination of log messages. You can customize it to suit your debugging or monitoring needs.
209
+
This file contains configuration options for controlling the verbosity, format, and destination of log messages. You can customize it to suit your debugging needs.
253
210
254
211
# Future Work
255
212
256
-
The kernel is still under development. The following is on the agenda:
257
-
258
-
- Provide perfmonitors for multi node setups
259
-
- Config for default perfmonitor to define collected metrics
213
+
The kernel is still under development.
260
214
261
215
PRs are welcome.
262
216
263
217
# Citing
264
218
265
-
If you publish some work using the kernel, we would appreciate if you cite the following paper:
219
+
If you publish some work using the kernel, we would appreciate if you cite one of the following papers:
220
+
221
+
```
222
+
Werner, E., Rygin, A., Gocht-Zech, A., Döbel, S., & Lieber, M. (2024, November).
223
+
JUmPER: Performance Data Monitoring, Instrumentation and Visualization for Jupyter Notebooks.
224
+
In SC24-W: Workshops of the International Conference for High Performance Computing, Networking, Storage and Analysis (pp. 2003-2011). IEEE.
225
+
https://www.doi.org/10.1109/SCW63240.2024.00250
226
+
```
227
+
228
+
or
266
229
267
230
```
268
231
Werner, E., Manjunath, L., Frenzel, J., & Torge, S. (2021, October).
0 commit comments