question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JupyterLab regression

See original GitHub issue

JupyterLab expects the memory usage information from NBResuse (i.e. what’s waiting for it at the <base_url>/metrics endpoint) to have the JSON format specified by the following interface:

  export interface IMetricRequestResult {
    rss: number;
    limits: {
      memory?: {
        rss: number;
        warn?: number;
      };
    };
  }

However, after the update to use Prometheus (0.3.4+), the JSON response emitted “by NBResuse” (i.e. at the <base_url>/metrics endpoint) is now of the form as Prometheus’s HTTP API, see here. So JupyterLab can’t read it, so thinks NBResuse isn’t installed, and thus no longer displays memory usage information even when NBResuse is installed.

There seems to be a fairly clear mapping between the arguments passed to the constructors of the Prometheus Gauge’s here in the NBResuse code and the response of the metadata portion of the Prometheus HTTP API, but I’m not sure about the format of the HTTP response encoding the actual values of the metrics. That knowledge seems to be embedded implicitly in the Javascript code for the NBExtension, but I still feel I need to look into it more closely to be sure.

Since this is a feature regression, I think it should be a priority to find some way to fix this as soon as possible, although it will probably require making a PR to JupyterLab. If that’s the case, then we should probably hold off on making any such PR before stabilizing the “API” for NBResuse.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:19 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
yuvipandacommented, Jun 11, 2020

I added @jtpio to the repo on PyPI, and here too.

1reaction
jtpiocommented, Dec 9, 2020

Right. Although 0.4.0 is considered a major release, so it’s a good time to start adding breaking changes.

The plan is to drop it completely for the next major release: #75

The memory status code has already been removed from core lab: https://github.com/jupyterlab/jupyterlab/pull/9386

And for JupyterLab 3.0 users will still be able to get the memory usage status item with a single pip install, since the lab extension will be distributed with pip as well: https://github.com/jupyter-server/jupyter-resource-usage/pull/69

So there is no dependencies between JupyterLab and nbresuse anymore, and the frontend extensions will use the new endpoint directly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jupyter: Create Auto Interpretation for Multiple Regression ...
Multiple regression is a statistical technique to analyze several variables. Basically, this technique creates a model from dependent and ...
Read more >
Matplotlib Linear Regression Animation in Jupyter Notebook
Especially FuncAnimation class for creating animation and LinearRegression for creating a Linear Regression model. import matplotlib.pyplot as ...
Read more >
Contributing to JupyterLab
Visual Regression and UI Tests. Contributing to the debugger front-end. Build and run the stand-alone examples. Debugging in the Browser.
Read more >
SIMPLE LINEAR REGRESSION WITH JUPYTER NOTEBOOK
Part II: Visualize Plot the Regression Model . ... Part III: Generate a Linear Regression Equation .
Read more >
JupyterLab with WaziApp - WAZIUP e.V.
Screeshot of Jupyterlab with linear-regression-demo.ipynb. Jupyter Notebook provides an environment tailored to the needs and workflow of data science and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found