scvi.hub.HubModelCardHelper#
- class scvi.hub.HubModelCardHelper(license_info, model_cls_name, model_init_params, model_setup_anndata_args, model_summary_stats, model_data_registry, scvi_version, anndata_version, data_modalities=<factory>, tissues=<factory>, data_is_annotated=None, data_is_minified=None, training_data_url=None, training_code_url=None, model_parent_module='scvi.model', description='To be added...', references='To be added...')[source]#
A helper for creating a ModelCard for scvi-tools hub models.
It is not required to use this class to create a ModelCard. But this helps you do so in a way that is consistent with most other scvi-tools hub models. You can think of this as a template. The actual template string used can be found in
scvi.template
. The resulting huggingfaceModelCard
can be accessed via themodel_card()
property.- Parameters:
license_info (str) – The license information for the model.
model_cls_name (str) – The name of the model class.
model_init_params (dict) – The model initialization parameters.
model_setup_anndata_args (dict) – The arguments used to call
setup_anndata
during model training.model_summary_stats (dict) – The model summary statistics.
model_data_registry (dict) – The model data registry.
scvi_version (str) – The version of scvi-tools that the model was trained with.
anndata_version (str) – The version of anndata used during model training.
data_modalities (List[str]) – The modalities of the training data.
tissues (List[str]) – The tissues of the training data.
data_is_annotated (Optional[bool]) – Whether the training data is annotated.
data_is_minified (Optional[bool]) – Whether the training data uploaded with the model has been minified.
training_data_url (Optional[str]) – Link to the training data used to train the model, if it is too large to be uploaded to the hub. This can be a cellxgene explorer session url. However it cannot be a self-hosted session – it must be from the cellxgene portal (https://cellxgene.cziscience.com/).
training_code_url (Optional[str]) – Link to the code used to train the model.
model_parent_module (str) – The parent module of the model class. Defaults to scvi.model. Change this if you are using a model class that is not in the scvi.model module, for example, if you are using a model class from a custom module.
description (str) – A description of the model.
references (str) – A list of references for the model.
Attributes table#
Methods table#
|
Create a HubModelCardHelper object from a local directory. |
Attributes#
data_is_annotated
data_is_minified
description
model_parent_module
references
training_code_url
training_data_url
license_info
model_cls_name
model_init_params
model_setup_anndata_args
model_summary_stats
model_data_registry
scvi_version
anndata_version
data_modalities
tissues
Methods#
from_dir
- classmethod HubModelCardHelper.from_dir(local_dir, license_info, anndata_version, data_is_minified=None, **kwargs)[source]#
Create a HubModelCardHelper object from a local directory.
- Parameters:
local_dir (
str
) – The local directory containing the model files.license_info (
str
) – The license information for the model.anndata_version (
str
) – The version of anndata used during model training.data_is_minified (
Optional
[bool
] (default:None
)) – Whether the training data uploaded with the model has been minified.kwargs – Additional keyword arguments to pass to the HubModelCardHelper initializer.