Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Duc Trung Le
    @trungleduc
    @DougRzz we changed the public IP policy of Voila since 0.3.0 (https://github.com/voila-dashboards/voila/issues/1047#issuecomment-997297250)
    3 replies
    Nicolas M. Thiéry
    @nthiery
    Ok, thanks for the feedback. Yes indeed, using the micromamba docker image.
    With -vvv, it indeed shows lots of conflicts which probably make for that many corner cases. Unless I missed something, I am using conda-forge only. Just for the record,here is the environment: https://gitlab.dsi.universite-paris-saclay.fr/L1InfoInitiationScienceDonnees/ComputerLab/-/blob/master/binder/environment.yml
    Wolf Vollprecht
    @wolfv
    hmm, yeah, I just tried and indeed it's pretty slow
    it's much faster when you constrain the python version
    I just added python=3.9 and then it's as fast as always
    3.10 also works
    Nicolas M. Thiéry
    @nthiery
    Ah, ah, thanks for the tip! Now it indeed runs in a reasonable time. Great, problem solved.
    Something to keep in mind for Candyce: proposing to pin a Python version in the package selector or something similar.
    cmartinotti
    @cmartinotti

    Hi @cmartinotti . I tried your code and I had the same issue as you in Jupyter Classic. I fixed it with.

        fig.show(renderer='notebook')

    I am using Jupyter notebook, and even adding this line it doesn't work.

    cmartinotti
    @cmartinotti
    Also for me it doesn't even work in JupyterLab
    cmartinotti
    @cmartinotti

    UPDATE: Running more test using the old code (that works) and comparing it with the code that i linked previously I noticed that if I stack two cells one with the form :

    #CELL 1
    import plotly.express as px
    import pandas as pd
    import ipywidgets as widgets
    
    out=widgets.Output()
    dfa=pd.DataFrame({'x':[1,2,3],'y':[1,2,3]})
    
    
    with out:
        out.clear_output(wait=True)
        print('ciao')
        fig=px.scatter(dfa,x='x',y='y', width=800, height=400 )
        fig.show()
    
    out

    and one with the form :

    #CELL 2 
    with out:
        out.clear_output(wait=True)
        print('ciao')
        fig=px.scatter(dfa,x='x',y='y', width=800, height=400 )
        fig.show()
    
    out

    A weird thing happens. If I run CELL1 i get an empty output, then I run CELL2 and i still get an empty output, but the output from CELL1 now shows the plot from CELL2.

    ndbecker
    @nbecker
    xtensor roadmap? Is there any roadmap of future plans for xtensor? Or is it essentially finished already?
    Johan Mabille
    @JohanMabille
    @nbecker it is not finished at all, we are swamped with other projects and lack a bit of funding for xtensor
    next steps are the refactoring of the views to fix performance issues, the refactoring of the reducers
    we would like to make progress on the xtensor-sparse module too
    ndbecker
    @nbecker
    ok, so performance improvements. As far as features, basically complete, except for sparse?
    Mario Emmenlauer
    @emmenlau
    @JohanMabille I very much like this roadmap! Happy new year btw...
    Sylvain Corlay
    @SylvainCorlay
    Einsum is a big one.
    Johan Mabille
    @JohanMabille
    @nbecker there's also the einsum as said Sylvain
    we don't plan to add other features for now, but we are open to requests

    @JohanMabille I very much like this roadmap! Happy new year btw...

    thanks :) Happy new year too!

    ndbecker
    @nbecker
    thanks
    joseberlines
    @joseberlines

    Hi there, I am using voila to render a notebook in jupyterHub environement. I would like to create a kind of "Launcher" opening several tabs in chrome by clicking buttons. I have this code:

    import ipyvuetify as vue
    from ipywidgets import Output
    from IPython.display import Javascript
    
    b = vue.Btn(class_='mx-2 light-blue darken-1', color='primary',children=['open newspapers'])
    out=Output()
    
    def open_pages(widget, event, data):
        with out:
            print('clicked')
            display(Javascript(f'window.open("https://www.lemonde.fr");'))
            print('should have opened 1')
            display(Javascript(f'window.open("https://www.nytimes.com");'))
            print('should have opened 2')
    
    b.on_event('click', open_pages)
    
    display(vue.Layout(children=[b,out]))

    only one tab is open, the first one, despite of the fact that the three print statements run and no error is given back.
    Any idea how to solve this issue or where can be the error?

    martinRenou
    @martinRenou
    Hey :)
    I tried your code in Jupyter Notebook and it seems to behave the same way
    Duc Trung Le
    @trungleduc
    In Google Chrome, you need to activate Pop-ups and redirects option to make it works as intended
    popup.png
    martinRenou
    @martinRenou
    yeah I was wondering if it was something like that. Maybe the browser prevents you from opening too many new pages.
    maybe showing links instead of a button is what would be less surprising for the user?
    joseberlines
    @joseberlines
    image.png
    Thanks all. A colleague told me it runs on his side. It is very erratic, i.e. I still can not manage to make it work. Since I am working in jupyterHub I was wondering if this is a server-side thing or a client side thing. I will check out chrome options. and here it is:
    Indeed I had to change that option.
    what makes me think I have to think about other option (client side) since now I am going to get pop ups from other pages (probably).
    joseberlines
    @joseberlines
    After thinking about this situation for a bit I still find the situation a bit strange. Whatever settings you have in google chrome you can always open a link in other tab by clicking it. This is the behaviour of opening a new link rendering a notebook with voila. It is NOT a pop up. Its simply a new tab with a new link. Or am I wrong here (note: my knowledge of JS is very very limited)
    martinRenou
    @martinRenou
    This behavior actually makes sense. You don't want websites to be allowed to open as many new pages as they want, it could be the behavior of a potentially harmful website.
    joseberlines
    @joseberlines
    ok, thanks. I made a final test: here the gist:
    https://gist.github.com/joseberlines/8a5f0ba673d12034d69749cb831c2a88.js
    and indeed changing the dettings totally changes the behaiviour. that leaves me wondering what is the approach in a JupyterHub environment to launch voila-solutions made by your colleagues that are available through urls
    martinRenou
    @martinRenou
    The browser considers that the user clicking on links a different use-case than the page calling window.open by itself
    that's why I was saying earlier that showing links instead of using a custom button would maybe work better, and be less surprising from a user perspective
    and actually, having an HyperLink widget could maybe be a good addition to ipywidgets?
    joseberlines
    @joseberlines
    btw,more than the code itself perhaps the image shows better the desired behaiviour:
    image.png
    martinRenou
    @martinRenou
    if you think about it, you never have, anywhere on any website, a button or an image that opens multiple tabs at once
    joseberlines
    @joseberlines
    Of course the idea is not opening publically available websites, but jupyterhub based voila links. Different users might create different agregators of solutions.
    Wolf Vollprecht
    @wolfv
    you could open multiple JupyterLab Tabs :)
    joseberlines
    @joseberlines

    if you think about it, you never have, anywhere on any website, a button or an image that opens multiple tabs at once

    You are right. Perhpas the approach is somehow strange. But there is certainly a use case here. For a particular persona (type of user) and a particular task (task 1) 4 different jupyterHub voila based notebooks should be opened. For the same persona (user) but task 2, other different 5 notebook solutions should be opened. And this is totally transparent to the user, who does not even know what is python nor a notebook. the user is given a single url (the one displaying the above example). I am talking about an organization where 50 to 100 people might have code solutions in notebooks and where another 6000 people dont even know that is a notebook.

    I would be very interesting in knowing how jupyterHub based environments in big organisations go about "sharing work", also to people who are no coders. i.e. in an organization where everybody has access to the Hub anyone can render with coila notebook simply given an url. But you can not go around asking anyone to "open a notebook".
    Wolf Vollprecht
    @wolfv
    @joseberlines I don't know what your notebooks look like but maybe one way to make it simpler would be to have a single voila website that aggregates the multiple notebooks using a Tab view?
    joseberlines
    @joseberlines
    Hi @wolfv , thanks for suggesting, this is indeed one of the solutions, nevertheless it implies putting together stuff. INTEGRATING different solutions. For you to have an idea every of those solutions already include a bunch of menus and tabs and expansion panels. As analogy you can imagine that for doing job 1 you need MS word, and excel and for doing job two you need Word, MSexcel, powerpoint, and Access. Everyone is independent of each other. Every of the solutions is being developed by deifferent people. The agregator only opens word and excel for instance with url parameters in order to autoload the corresponding document. Putting excel and word in two tabs is not an option. Another analogy in the world of finance where JupyterHub is often used is having a complicated ipyvuetify based dashboard panel to invest in NYSE and another ipywidgets based dashboard for investing in raw materials. certainly in theory you could put both in two different tabs, but it is too much hacking. In a situation where there are, just say, 25 different dash boards, one starts to think about a kind of Launcher or aggregator. (as in pic above). I wonder how big tech companies go about this.
    Duc Trung Le
    @trungleduc
    @joseberlines in chrome you can just bookmark all your voila links into a folder and on right click you have option to open all tabs in a tab group.