Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notebook Interactivity #3

Open
ivirshup opened this issue Nov 30, 2022 · 13 comments
Open

Notebook Interactivity #3

ivirshup opened this issue Nov 30, 2022 · 13 comments

Comments

@ivirshup
Copy link
Member

Splitting out the discussion on how we do interactivity of the notebooks.

There should be some sort of interactivity (i.e. the possibility to execute the notebooks online)
@grst

Yes, please. We should design everything with this in mind. I think that we'll need GPU support though, right @adamgayoso ?
@Zethson

Originally posted by @Zethson in #1 (comment)

Platforms

AFAICT, the two ways we could do this are colab and binder.

I think we could try to do both. The issue here is "how do we do dependencies" since we can specify an environment for binder, but not for colab.

Maybe there is some way to specify dependencies in an environment.yml, then have colab use them?

Dependencies more generally

I don't think we should have one environment that every notebook runs in. How can we manage this?

I think it should be possible to have multiple conda environments created on a binder image. Then notebooks could specify which environment to use with their kernel.

@Zethson, does the best practices manage this in anyway? I'm trying to figure it out right now, but the binder is taking a really long time to build 😅

@grst
Copy link
Collaborator

grst commented Nov 30, 2022

Allegedly it is possible to make colab work with conda by installing /usr/local in the base environment:

@ivirshup
Copy link
Member Author

Idk if those are trustworthy solutions. What if you install torch in your conda environment? Then aren't there two installations of torch on your python path? The one that comes with colab and the conda one?

This seems like a more robust solution from the RAPIDs (repo). Looking at the script they run, it's basically the same as the linked answers, but with a bunch of pip uninstalls first. It may also be pretty rapids specific, so I'm not sure if this approach can be used generically for other conda packages.

@adamgayoso
Copy link
Member

As for scvi-tools, we can stick to binder if we decide to only load pre-trained models, which seems like a decent compromise to me. As even on GPU, waiting for training is not fun

@grst
Copy link
Collaborator

grst commented Nov 30, 2022

Then aren't there two installations of torch on your python path? The one that comes with colab and the conda one?

FWIW, it should be possible to manipulate the PYTHONPATH so that it only refers to conda packages.

@ivirshup
Copy link
Member Author

Summarizing a couple discussions on hosting about this:

mybinder has a very small amount of resources. E.g. they promise 1gb of memory but may give you 2gb. This would be pretty restrictive for anything more than a single small-ish dataset. So integration, reference mapping, compositional analysis, etc could be difficult. @Zethson has concluded this means mybinder probably won't work for the best practices book, and they will need alternative hosting.

I then saw you can run a jupyterlab instance on galaxy and may even be able to get a GPU. This may be well timed since they are now working on tutorials for single cell. I think we should get in contact with them about this.

further discussion about galaxy on zulip

@grst
Copy link
Collaborator

grst commented Dec 6, 2022

So what's the conclusion here for the hackathon?

  • Stick with binder until there's a binderhub on galaxy
  • Additional support for colab nice to have but not required

@ivirshup
Copy link
Member Author

ivirshup commented Dec 6, 2022

I think so

Specifically about binderhub

I have my doubts about there every being a binder hub on galaxy, but I think we could have a "link to galaxy that will start a job". I think a binder hub could happen through denbi, but then we'd have to figure this for other parts of the world.

@grst
Copy link
Collaborator

grst commented Dec 6, 2022

Do you think geographic location matters that much? Running a notebook is neither particularly low-latency nor high-traffic...

@ivirshup
Copy link
Member Author

ivirshup commented Dec 6, 2022

Having used US or EU hosted services from Australia: it's very noticeable. It can take seconds to execute something very simple and connections can be dropped.

@grst grst moved this to Todo in 2022-12-08 hackathon ibk Dec 7, 2022
@grst grst changed the title Interactivity Task 1: Interactivity Dec 7, 2022
@grst grst moved this from Todo to In Progress in 2022-12-08 hackathon ibk Dec 8, 2022
@grst grst moved this from In Progress to Todo in 2022-12-08 hackathon ibk Dec 8, 2022
@grst
Copy link
Collaborator

grst commented Jan 19, 2023

In principle it works to launch mybinder from the tutorials with one click.
Should we still keep this open to track alternatives that provide more computational resources?

@Zethson
Copy link
Member

Zethson commented Jan 19, 2023

Yes, I'd be super keen to get support for this. (I'd normally volunteer now but I've reached my limit).

@ivirshup
Copy link
Member Author

👍, I'd be happy to say we're not going to follow this one up immediately, but leave it for later.

@ivirshup ivirshup moved this from Todo to Pushed in 2022-12-08 hackathon ibk Jan 19, 2023
@ivirshup
Copy link
Member Author

I'm gonna say that pushing this to a later date also entails putting off:

@grst grst changed the title Task 1: Interactivity Notebook Interactivity Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

4 participants