Giter Club home page Giter Club logo

Comments (11)

DanielSchiavini avatar DanielSchiavini commented on June 6, 2024 1

I created a plugin template in https://github.com/DanielSchiavini/titanoboa-jupyterlab

Update dec 5: trying to figure out how to add a comm target from the frontend. The kernel is not directly available like before. Alternatevely we could implement some other 2 way communication via ipython or tornado, but that's much more cumbersome.

from titanoboa.

DanielSchiavini avatar DanielSchiavini commented on June 6, 2024 1

We definitely don't need any extra dependencies, this was an easy way to proof the concept.
About Collab, I have no idea, and I wasn't able to find the restrictions quickly today. I can investigate more.

from titanoboa.

charles-cooper avatar charles-cooper commented on June 6, 2024

also debugger (cf. https://jupyterlab.readthedocs.io/en/stable/user/debugger.html) and kernel for vyper could be done

from titanoboa.

DanielSchiavini avatar DanielSchiavini commented on June 6, 2024

Is the idea here to simply port the existing code into a proper plugin, or do we want to add/change the functionality as well?
If so it would be great to know what the new functions we want implement are (maybe in separate issues?)

from titanoboa.

charles-cooper avatar charles-cooper commented on June 6, 2024

i think first port into a plugin, and then we can talk about adding additional functionality. the real issue that i'm trying to address here is that the way of jerry-rigging the required libraries that works for jupyter notebook does not work for jupyter labs.

from titanoboa.

DanielSchiavini avatar DanielSchiavini commented on June 6, 2024

I got it working with API calls and shared memory, no websockets needed frontend and backend and the signer. There's still bugs to fix and tests to write, but this solution with shared memory is feasible and relatively simple.

from titanoboa.

charles-cooper avatar charles-cooper commented on June 6, 2024

I got it working with API calls and shared memory, no websockets needed frontend and backend and the signer. There's still bugs to fix and tests to write, but this solution with shared memory is feasible and relatively simple.

very slick! i think i have a couple reservations about using shared_memory_dict -- it's another dependency, and it also seems insecure because it uses pickle for instance (but that seems easy to get around by using shared_memory directly instead) and pass via json, or use something builtin to the mp library -- https://docs.python.org/3/library/multiprocessing.html#sharing-state-between-processes

from titanoboa.

charles-cooper avatar charles-cooper commented on June 6, 2024

btw, does this technique work with google colab somehow?

from titanoboa.

DanielSchiavini avatar DanielSchiavini commented on June 6, 2024

I replaced the shared dict dependency with a SharedMemory object for each of the expected callbacks. DanielSchiavini/titanoboa-jupyterlab@2e86d6b

from titanoboa.

DanielSchiavini avatar DanielSchiavini commented on June 6, 2024

The integration tests are failing in Github for some stupid reason (they pass locally).
I've managed to reproduce the issue locally, and track down an exception thru act, docker and jupyterlab to this line. It produces ["TypeError: Cannot read properties of undefined (reading 'get')","TypeError: Cannot read properties of undefined (reading 'get')"] which is about the most generic error in the planet and it can come from literally anywhere. And the error details are right there being ignored in the line. 😠
I'm trying to intercept the call somehow but it's not easy inside Github actions 😞

Of course we could ignore the included tests, but the pipelines are vital to easily produce a npm+pip package.

from titanoboa.

DanielSchiavini avatar DanielSchiavini commented on June 6, 2024

I have 2 PRs with the implementation ready for review:

from titanoboa.

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.