Skip to content

Commit 4e44e26

Browse files
authored
Merge pull request #44 from score-p/feature/cut-perfmonitor
Cut out performance monitor, fix magics cleanup
2 parents cfb8d7f + 930d0f9 commit 4e44e26

24 files changed

Lines changed: 176 additions & 2297 deletions

.github/workflows/unit_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ jobs:
4242
pip install pyyaml dill cloudpickle numpy pandas
4343
pip install ipywidgets itables matplotlib pynvml
4444
45-
- name: Build JUmPER kernel
45+
- name: Build scorep_jupyter kernel
4646
run: |
4747
pip install .
48-
python -m jumper.install
48+
python -m scorep_jupyter.install
4949
5050
- name: Run userpersistence tests
5151
run: |

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
__pycache__/
22
.variables
33
.userpersistency
4-
4+
build
5+
logging
6+
**/*.egg-info

README.md

Lines changed: 31 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,19 @@
66
<img width="450" src="doc/JUmPER01.png"/>
77
</p>
88

9-
# A Jupyter Kernel for Performance Engineering
9+
# JUmPER: Jupyter meets Performance
1010

11-
This is the JUmPER Kernel that enables you to:
11+
JUmPER brings performance engineering to Jupyter. It consists of the two repositories:
1212

13-
1. Monitor Jupyter cells and measure system metrics like cpu, gpu, I/O or memory utilization.
13+
- JUmPER Ipython extension (https://github.com/ScaDS/jumper_ipython_extension)
1414

15-
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.
1616

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)
1818

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).
1922

2023

2124
# Table of Content
@@ -24,7 +27,6 @@ For binding to Score-P, the kernel uses the [Score-P Python bindings](https://gi
2427
- [Table of Content](#table-of-content)
2528
- [Installation](#installation)
2629
- [Usage](#usage)
27-
- [Monitoring](#monitoring)
2830
- [Score-P Instrumentation](#score-p-instrumentation)
2931
- [Configuring Score-P in Jupyter](#configuring-score-p-in-jupyter)
3032
- [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
3335
- [Limitations](#limitations)
3436
- [Serialization Type Support](#serialization-type-support)
3537
- [Overhead](#overhead)
38+
- [Logging Configuration](#logging-configuration)
3639
- [Future Work](#future-work)
3740
- [Citing](#citing)
3841
- [Contact](#contact)
3942
- [Acknowledgments](#acknowledgments)
4043

4144
# Installation
4245

43-
To install the kernel and required dependencies for supporting the monitoring features:
46+
To install the kernel and required dependencies:
4447

4548
```
46-
pip install jumper-kernel
47-
python -m jumper.install
49+
pip install scorep_jupyter
50+
python -m scorep_jupyter.install
4851
```
4952

5053
You can also build the kernel from source via:
@@ -54,75 +57,31 @@ pip install .
5457
```
5558

5659
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`.
5861

5962
**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-
```
6563

6664
From the Score-P Python bindings:
6765

6866
> You need at least Score-P 5.0, build with `--enable-shared` and the gcc compiler plugin.
6967
> Please make sure that `scorep-config` is in your `PATH` variable.
7068
> For Ubuntu LTS systems there is a non-official ppa of Score-P available: https://launchpad.net/~andreasgocht/+archive/ubuntu/scorep .
7169
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:
8071

8172
```
82-
%env JUMPER_REPORT_FREQUENCY=2
73+
pip install jumper_extension
8374
```
8475

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:
8677

8778
```
88-
%env JUMPER_REPORTS_MIN=2
79+
%load_ext jumper_extension
8980
```
9081

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-
![](doc/code_history.png)
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-
![](doc/monitoring.gif)
82+
You can find usage information in the repository of the extension.
10683

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
12685

12786
## Score-P Instrumentation
12887

@@ -228,8 +187,6 @@ Stops the marking process and writes the marked cells in a Python script. Additi
228187

229188
# Presentation of Performance Data
230189

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-
233190
To inspect the Score-P collected performance data, use tools as Vampir (Trace) or Cube (Profile).
234191

235192
# Limitations
@@ -249,20 +206,26 @@ When dealing with big data structures, there might be a big runtime overhead at
249206
## Logging Configuration
250207
To adjust logging and obtain more detailed output about the behavior of the JUmPER kernel, refer to the `src/logging_config.py` file.
251208

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.
253210

254211
# Future Work
255212

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.
260214

261215
PRs are welcome.
262216

263217
# Citing
264218

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
266229

267230
```
268231
Werner, E., Manjunath, L., Frenzel, J., & Torge, S. (2021, October).

examples/ExampleBasic.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@
503503
"metadata": {},
504504
"outputs": [],
505505
"source": [
506-
"%env JUMPER_MARSHALLING_DETAILED_REPORT=1"
506+
"%env scorep_jupyter_MARSHALLING_DETAILED_REPORT=1"
507507
]
508508
},
509509
{
@@ -527,9 +527,9 @@
527527
],
528528
"metadata": {
529529
"kernelspec": {
530-
"display_name": "JUmPER",
530+
"display_name": "scorep_jupyter",
531531
"language": "python",
532-
"name": "jumper"
532+
"name": "scorep_jupyter"
533533
},
534534
"language_info": {
535535
"file_extension": ".py",

0 commit comments

Comments
 (0)