Giter VIP home page Giter VIP logo

Comments (5)

christian-oreilly avatar christian-oreilly commented on July 18, 2024 1

So, a deeper issue is the transparency of JS errors from Python side. This should cause a timeout exception on Python side so that the user knows what is happening.

from ipyniivue.

christian-oreilly avatar christian-oreilly commented on July 18, 2024

Let me wrap this also in this issue to avoid creating another issue just for that: The run_custom_code also seems to fail to return values. Printing is_pial in this example currently gives me None. With fixing this, we should add a test for pytest that avoids code regression on that. This is a fairly simple test to add.

from ipyniivue.

AnthonyAndroulakis avatar AnthonyAndroulakis commented on July 18, 2024

Thank you for bringing this up. run_custom_code does not work online Jupyter environments, such as Google Colab, due to the way online Jupyter handles concurrent execution. See Kirill888/jupyter-ui-poll#23 (comment) for more info.

Concerning ipyniivue, we can either add note to the documentation specifying that run_custom_code (and therefore all getters that use run_custom_code) do not work in online Jupyter environments.
Alternatively, we could explore implementing some solution that runs in online Jupyter environments. Currently, I don't know of any ways to do this.

from ipyniivue.

christian-oreilly avatar christian-oreilly commented on July 18, 2024

What is the difference between local and "online" Jupyter environments exactly? The issue you referred to seems to make a difference between ipykernel (works) and jupyterlite (does not work). I may be mistaken but I did not see any clear restrictions (except in the version maybe) for ipykernel on the Colab...? Also, jupyter-ui-poll seems to work on Colab (Kirill888/jupyter-ui-poll#18). It seems like there was some issues with ipykernel 4.x, which was the default for Colab at the time the ticket was created, but the current version is now 5.5.6.

from ipyniivue.

AnthonyAndroulakis avatar AnthonyAndroulakis commented on July 18, 2024

I see, I think I was confused with JupyterLite and Google Colab, and just assumed they used the same kernel. I'll have to do more testing to see if I can get run_custom_code to work in Colab then.
The reason it takes at most 60 seconds to run the run_custom_code function is because it times out at 60 seconds.

from ipyniivue.

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.