Adapters
This page documents the adapter modules under jumper_extension.adapters that implement reporting, visualization, session management, and script writing. High‑level usage is described in the Public API and Jupyter API sections; the content below is generated directly from the Python code.
Data
NodeDataStore
Single source of truth for per-node hardware metadata and time-series data.
register_node(info) stores both the NodeInfo and the corresponding
PerformanceData container under the same node key.
Access patterns
store.hardware – Dict[str, NodeInfo] (metadata)
store.view(level) – aggregate DataFrame across all nodes
store.view(level, node=n) – single-node DataFrame
store.add_sample(node, level, row) – append one flat-dict sample
Source code in jumper_extension/adapters/data/node.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 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 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 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 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | |
init_node_schema(node, columns_by_level)
Store per-level column lists so view() can return a correctly shaped empty DataFrame before the first sample arrives.
Source code in jumper_extension/adapters/data/node.py
73 74 75 76 77 78 79 80 81 | |
load_frames(node, frames)
Inject pre-loaded DataFrames into a registered node's data container.
Used by offline (imported) monitors to populate data without going through the live add_sample() path.
Source code in jumper_extension/adapters/data/node.py
83 84 85 86 87 88 89 90 91 92 93 | |
aggregate_node_info(hardware)
Return a synthetic NodeInfo aggregating all nodes in hardware.
CPUs/GPUs are summed, gpu_memory takes the max, memory_limits are summed per level, gpu_name is taken from the first node that has one. Used by reporter/service/session to get a single summary view.
Source code in jumper_extension/adapters/data/node.py
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | |
Cell history and analysis
CellHistory
Source code in jumper_extension/adapters/cell_history.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 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 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | |
load(filename)
Load cell history from CSV or JSON file.
Returns:
| Type | Description |
|---|---|
Optional[DataFrame]
|
DataFrame if successful, None otherwise |
Source code in jumper_extension/adapters/cell_history.py
159 160 161 162 163 164 165 166 167 168 169 170 | |
PerformanceAnalyzer
Performance analyzer to determine workload type using relative thresholds.
Inspired by JobLabeller from:
https://gitlab.hrz.tu-chemnitz.de/pika/pika-server/-/blob/
619d62926cd85f8c20589c75aba0c6e2c51087e1/
src/post_processing/post_processing.py#L711
Source code in jumper_extension/adapters/analyzer.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 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 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 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 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | |
__init__(thresholds=None)
Initialize analyzer with relative thresholds
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
thresholds
|
Optional[Dict[str, float]]
|
Custom threshold values (uses defaults if None) |
None
|
Source code in jumper_extension/adapters/analyzer.py
57 58 59 60 61 62 63 64 65 66 67 | |
analyze_cell_performance(perfdata, memory_limit, gpu_memory_limit=None)
Analyze cell performance and determine tags
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
perfdata
|
DataFrame
|
DataFrame with performance data |
required |
memory_limit
|
float
|
System memory limit in GB |
required |
gpu_memory_limit
|
Optional[float]
|
GPU memory limit in GB (if available) |
None
|
Returns:
| Type | Description |
|---|---|
List[TagScore]
|
List[TagScore]: Ranked performance tags for the cell |
Source code in jumper_extension/adapters/analyzer.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | |
PerformanceTag
Bases: Enum
Performance tags for classifying cells
Source code in jumper_extension/adapters/analyzer.py
11 12 13 14 15 16 17 18 19 20 21 | |
TagScore
dataclass
Tag with its score for ranking
Source code in jumper_extension/adapters/analyzer.py
24 25 26 27 28 | |
Reporting and visualization
PerformanceReporter
Adapter class for performance reporting
Source code in jumper_extension/adapters/reporter.py
323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 | |
attach(monitor)
Attach started PerformanceMonitor
Source code in jumper_extension/adapters/reporter.py
333 334 335 336 337 338 339 340 341 342 343 | |
display(cell_range=None, level='process')
Display performance report
Source code in jumper_extension/adapters/reporter.py
349 350 351 | |
print(cell_range=None, level='process')
Print performance report
Source code in jumper_extension/adapters/reporter.py
345 346 347 | |
ReportBuilder
Base class for report builders
Source code in jumper_extension/adapters/reporter.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 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 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | |
ReportDisplayer
Bases: ReportBuilder
Source code in jumper_extension/adapters/reporter.py
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | |
display(cell_range=None, level='process')
Print performance report
Source code in jumper_extension/adapters/reporter.py
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | |
ReportDisplayerProtocol
Bases: Protocol
Structural protocol for HTML/text report displayers.
Source code in jumper_extension/adapters/reporter.py
237 238 239 240 | |
ReportPrinter
Bases: ReportBuilder
Source code in jumper_extension/adapters/reporter.py
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 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 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
print(cell_range=None, level='process')
Print performance report
Source code in jumper_extension/adapters/reporter.py
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 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 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
UnavailableReportDisplayer
Source code in jumper_extension/adapters/reporter.py
311 312 313 314 315 316 317 318 319 320 | |
display(cell_range=None, level='process')
non-opt display
Source code in jumper_extension/adapters/reporter.py
315 316 317 318 319 320 | |
build_performance_reporter(cell_history, templates_dir=None, display_disabled=False, display_disabled_reason='Display not available.', thresholds=None)
Build PerformanceReporter object. Allows building a reporter without displaying.
Source code in jumper_extension/adapters/reporter.py
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 | |
Sessions and scripts
SessionExporter
Handles exporting a monitoring session to directory/ZIP.
Source code in jumper_extension/adapters/session.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 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 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 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 218 219 220 221 222 223 224 225 226 227 228 | |
export(path=None)
Export session to a directory or, if path ends with .zip, to a zip archive.
Returns the path to the exported directory or created archive.
Source code in jumper_extension/adapters/session.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | |
SessionImporter
Handles importing a monitoring session from directory/ZIP.
Source code in jumper_extension/adapters/session.py
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 | |
import_(path, service)
Import a session into the given service. Returns True on success.
Source code in jumper_extension/adapters/session.py
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | |
NotebookScriptWriter
Class for writing notebook content to a Python script.
Collects code from cells and saves it to a Python file with optional metadata about execution time and cell numbers.
Source code in jumper_extension/adapters/script_writer.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 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 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 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 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | |
is_control_cell(cell_magics)
Select cells with index >= start and exclude cells that contain control magics
Source code in jumper_extension/adapters/script_writer.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 | |
is_recording_active()
Check if cell is being recorded.
Source code in jumper_extension/adapters/script_writer.py
32 33 34 | |
start_recording(settings_state, output_path=None)
Start recording code from cells.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
settings_state
|
Settings
|
Extension settings at the time of recording started |
required |
output_path
|
Optional[str]
|
Path to the output file (overrides value from init) |
None
|
Source code in jumper_extension/adapters/script_writer.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
stop_recording()
Stop recording and save accumulated code to file.
Returns:
| Type | Description |
|---|---|
Optional[str]
|
Path to the created file or None on error |
Source code in jumper_extension/adapters/script_writer.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 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 | |