jupyterlab-contrib / jlab-enhanced-cell-toolbar

A cell toolbar for JupyterLab.
BSD 3-Clause "New" or "Revised" License
41 stars 16 forks source link

Some cells are not given a toolbar #33

Open agoose77 opened 3 years ago

agoose77 commented 3 years ago

Description

In the latest (3.1.4) JupyterLab release, I've noticed that some cells do not have a cell toolbar: Screenshot from 2021-08-12 09-39-33

This is reflected in the DOM inspector. Because of this, there is no margin between one cell and the previous cell.

Reproduce

This notebook demonstratesthe issue for me. I cannot easily simplify it further, because removing random cells tends to stop the bug from manifesting!

{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "fb5413e5-2298-4e1f-b858-3e3c66fefffe",
   "metadata": {
    "tags": []
   },
   "source": [
    "# Deconvolve Source Signals of ${}^{10}\\mathrm{C}\\text{-}\\alpha$ Scattering\n",
    "In this notebook we will generate a dataset containing the point cloud model inliers obtained from the signal data in the `TEvent` tree."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5bfb10b1-e227-43df-a330-fef5a312a742",
   "metadata": {},
   "source": [
    "## Prepare source chunks"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "8b91c96e-8633-480e-8d1a-b7b72db2e143",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Stored 'root_path_info' (list)\n"
     ]
    }
   ],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "cabd6526-0278-40d7-8e4a-bc8014e6e1ee",
   "metadata": {},
   "source": [
    "Given that these early operations are constrained by memory, it is important that each unit of work consumes roughly the same amount of RAM for optimal throughput. This can be estimated from the multiplicity of each event (as the memory is largely determined by the `mmWaveformY` branch which scales as $n \\propto \\text{mul}$."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "7cd6d1d4-8975-457d-aa98-dd2dc604088b",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "ae4769ac-2e65-41ea-8b42-0792cf8f8df3",
   "metadata": {},
   "source": [
    "Now we can read the events in memory-friendly chunks (ignoring empty chunks!)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "6fc77ae5-f6a9-4943-83be-3172b1be1e60",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "3398872b-a58a-4e70-89bf-bd8f2506c2e0",
   "metadata": {
    "tags": []
   },
   "source": [
    "## Process TEvent TTrees"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "60211f1d-0c85-478d-a791-e5873dd967a3",
   "metadata": {},
   "source": [
    "Restructure the `TEvent` objects"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "2faf2b96-911e-4123-8203-c33f089d0410",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "84e8223d-6736-484d-a93d-258cdaaf0217",
   "metadata": {},
   "source": [
    "Cleanup signals by removing saturated channels and attenuating the baseline noise"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "1ed0ad2a-7f0b-4f79-bf4f-843ee3fba858",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "6efc810e-3532-4cea-bef1-56d81463a05b",
   "metadata": {},
   "source": [
    "Remove high frequency noise"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "68ed62d5-1dfa-49db-b137-dd1d392a4462",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "8a414637-f692-4c5f-90e8-1ed529633d09",
   "metadata": {},
   "source": [
    "Compute the QT data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "f18b0f42-5930-411e-89d4-29a4ba1e7ead",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "id": "4415f584-9b77-4df2-a49b-d398a4d1d842",
   "metadata": {},
   "source": [
    "Accumulate the results (generate the dataset)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "9e1b7e21-9cf3-4603-b9c8-42a9149e494e",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "834638e3-29ce-461b-b41a-b76773cbe584",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "id": "abb977d3-0c07-4f43-9979-a5b1e7bfa42d",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "d37295a9-8c53-4dd6-81a5-7eec25283c29",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "if not dataset_path.exists():\n",
    "    dataset.compute()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.2"
  },
  "toc-showmarkdowntxt": false
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
fcollonval commented 3 years ago

Thanks @agoose77

I'll have a look. But I will put my :dollar: on the virtual notebook feature... :confused:

agoose77 commented 3 years ago

Thanks @agoose77

I'll have a look. But I will put my on the virtual notebook feature...

Yes, I had the same suspicions!

fcollonval commented 3 years ago

Sorry for the late answer. I don't hit the glitch :cry:

Could you try deactivating the virtual rendering to see if it is responsible for it?

Go to Advanced Settings Editor -> Notebook and in the right pane (User Preferences) paste the following:

{
    "renderCellOnIdle": false,
    "numberCellsToRenderDirectly": 10000000000000
}