popv.hub.HubModelCardHelper#
- class popv.hub.HubModelCardHelper(license_info, anndata_version, scikit_learn_version, organism, tissues=<factory>, cellxgene_url=None, description='To be added...', references='To be added...', metrics_report=None, training_code_url='Not provided by uploader.')[source]#
A helper for creating a ModelCard for popV hub models.
- Parameters:
license_info (
str) – The license information for the model.scvi_version – The version of scvi-tools that the model was trained with.
anndata_version (
str) – The version of anndata used during model training.scikit_learn_version (
str) – The version of scikit-learn used during model training.organism (
str) – The organism of the data.tissues (
list[str] (default:<factory>)) – The tissues of the training data.cellxgene_url (
str|None(default:None)) – Link to the data in the CELLxGENE portal.description (
str(default:'To be added...')) – A description of the model.references – A list of references for the model.
metrics_report (
str|None(default:None)) – A dictionary containing the metrics report for the model.
- model_card#
Stores the model card.
- Type:
ModelCard
Notes
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 other popV hub models. You can think of this as a template. The resulting huggingface
ModelCardcan be accessed via themodel_cardproperty.
Attributes table#
Methods table#
|
Create a HubModelCardHelper object from a local directory. |
Attributes#
Methods#
- classmethod HubModelCardHelper.from_dir(local_dir, license_info, anndata_version, scikit_learn_version, organism, metrics_report=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.scikit_learn_version (
str) – The version of scikit-learn used during model training.organism (
str) – The organism of the data.metrics_report (
str|None(default:None)) – Path to the json with stored metrics report.data_is_minified – Whether the training data uploaded with the model has been minified.
kwargs – Additional keyword arguments to pass to the HubModelCardHelper initializer.