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

Add scvi-tools as a Hugging Face library #1129

Open
adamgayoso opened this issue Oct 21, 2022 · 7 comments
Open

Add scvi-tools as a Hugging Face library #1129

adamgayoso opened this issue Oct 21, 2022 · 7 comments

Comments

@adamgayoso
Copy link

scvi-tools is a machine learning library for single-cell genomics data. It contains implementations of popular ML models in the field as well as abstractions for quickly developing new models. It has both Jax/PyTorch backends.

A primary task people use models in scvi-tools is for pre-training VAE-like models on large datasets and then fine-tuning on newly generated query data. An analysis might fine-tune query data and then operate on the latent space of the model (train + test embeddings together) in an unsupervised way. We have an example of this here

We wanted to add support for uploading to and downloading from Hugging Face in our library, which we have a good idea how to do. However, I wanted to check in to see if we can add scvi-tools as a library in Hugging Face.

Furthermore, I'm not sure how to classify this task based on Hugging Face tasks. Tabular classification makes sense in some contexts (data is tabular) but tabular representation learning is not there?

@osanseviero
Copy link
Contributor

Hi @adamgayoso!

Thanks for reaching out! Yes, you can add support for uploading and downloading model to/from the Hub. We have a guide on how to do that here, including adding scvi-tools as an official supported library.

In order to enable this as an official library, you can open a PR against this file in the hub-docs repository. Note though that we avoid adding official libraries until there are is a good number of models in the Hub. We do this to avoid having a filter in the Hub that leads to very few models.

As for what task to use, let's discuss a bit more to make sure we do an appropriate name (cc @lhoestq @merveenoyan @julien-c )

@adamgayoso
Copy link
Author

In order to enable this as an official library, you can open a PR against this file in the hub-docs repository. Note though that we avoid adding official libraries until there are is a good number of models in the Hub. We do this to avoid having a filter in the Hub that leads to very few models.

Makes sense. We were going to upload on the order of 10+ models to start. Potentially naive question, but if the model library isn't there, can you change it after?

@osanseviero
Copy link
Contributor

Yes! The library is automatically determined based on the model card metadata (docs). You can use either tags or even better you can use library_name: scvi-tools for example. Once that's done, you will be able to filter by library.

And once the PR is merged in hub-docs, it will appear in the left filter of hf.co/models and users will get an automatic code snippet as well
`

@merveenoyan
Copy link
Contributor

merveenoyan commented Oct 24, 2022

@adamgayoso The names of the tasks are usually dependent on the abstractions over the input types. I wanted to ask what the typical output looks like from your models. Also, we can decide on this later as it requires a bit of more work 🙂 In the meantime, please let me know if you have any questions.

@Wauplin
Copy link
Contributor

Wauplin commented Jan 19, 2023

Hi @adamgayoso , I'm getting back to you about this issue :) What is the current state of the integration of scvi-tool as a Huggingface lib ?

@adamgayoso
Copy link
Author

Hi @Wauplin we are getting ready to upload about a dozen models, I'll reach back out when we have completed this! cc @watiss

@Wauplin
Copy link
Contributor

Wauplin commented Jan 20, 2023

Hi @adamgayoso, glad that you made some progress to share the models!
I remain available if you need some help somewhere :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants