chanzuckerberg / cellxgene-census

CZ CELLxGENE Discover Census
https://chanzuckerberg.github.io/cellxgene-census/
MIT License
72 stars 18 forks source link

Validate census version for embeddings #1202

Closed ivirshup closed 6 days ago

ivirshup commented 1 week ago

Description

Currently, this line produces an empty list:

cellxgene_census.experimental.get_all_available_embeddings("stable")

However, if I run:

resolved_stable_version = cellxgene_census.get_census_version_description("stable")["release_build"]
cellxgene_census.experimental.get_all_available_embeddings(resolved_stable_version)

I get a long list of embeddings. Additionally if I do:

cellxgene_census.experimental.get_all_available_embeddings("not a real release")

I get an empty list.

I think we should be validating the argument here, and resolving identifiers like "stable" and "latest" like we do with open_soma.

Context

I came across this while trying to find if there were embeddings for the "stable" version of the census that I was accessing. While I knew that there were embeddings for this version, I didn't know I couldn't pass the same version specifier to the embeddings arguments ("stable").

Also previously discussed on slack.

ivirshup commented 1 week ago

The "stable" and "latest" identifiers already work with the get_embedding function, which is a little strange since the resolved version identifier will be part of the embedding_uri argument