Git Product home page Git Product logo

Comments (7)

echarles avatar echarles commented on May 29, 2024 1

Thx for very useful video. A "default kernel" is always started on page refresh, but the kernel to which the notebook connects is managed by the notebook context, so you should be connected to the same kernel, whatever it is, on page refresh (you can check that your variables are still there).

Anyway, this is suboptimal, so I am refactoring all that to solve this and hopefully other issues you reported.

Stay tuned!

from jupyter-ui.

BrandonEscamilla avatar BrandonEscamilla commented on May 29, 2024 1

Hi @echarles, it appears that the issue has been resolved. I tested it and now it's only starting one kernel, and keeping the same after page reloads. Thank you for your assistance with this! I will close the issue.

from jupyter-ui.

echarles avatar echarles commented on May 29, 2024

I am trying on my env with main branch, and the kernel is kept after page reload (both with a path defined, or with a nbformat given in the props). Which version are you using?

from jupyter-ui.

BrandonEscamilla avatar BrandonEscamilla commented on May 29, 2024

Hey @echarles, I'm using the latest release of Jupyter UI (version 0.6.5). Initially, I thought it might be related to my Redux setup, so I removed all the Redux configuration, but the problem still persists. As a result, my Jupyter server is getting overwhelmed with numerous unused kernels. Do you have any ideas or suggestions on how I can address this issue?

from jupyter-ui.

BrandonEscamilla avatar BrandonEscamilla commented on May 29, 2024

I created a new application from scratch to verify if the issue was with my setup. However, I encountered the same behavior. It's worth considering that I may be overlooking something or have a misunderstanding of the kernel's definition. Nonetheless, this is the method I use to determine if the kernel is created or reused. Thanks in advance!

"use client";
import { Jupyter, Notebook } from '@datalayer/jupyter-react'

export default function Home() {
  const NOTEBOOK_UID = 'notebook-uid'
  return (
    <main className="w-full h-screen">      
      <Jupyter
        jupyterServerHttpUrl=""
        jupyterServerWsUrl=""
        jupyterToken=""                    
      >
        <Notebook
          path="/Untitled.ipynb"
          height='calc(100vh - 2.6rem)'
          cellSidebarMargin={120}                
          uid={NOTEBOOK_UID}                
        />
      </Jupyter>
    </main>
  )
}

Video url: https://share.cleanshot.com/VRq7Dndp

from jupyter-ui.

BrandonEscamilla avatar BrandonEscamilla commented on May 29, 2024

Good to know! Currently, I'm unmounting the kernel whenever the user reloads or closes the page to prevent overwhelming the server with multiple kernels. However, this approach does result in the deletion of the variables you mentioned.

from jupyter-ui.

echarles avatar echarles commented on May 29, 2024

I have released 0.7.0 which fixes this. Can you try on your env and close this if it work for you? Thx again!

from jupyter-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.