@@ -78,8 +78,8 @@ def from_anndata(
7878 Additional keyword arguments to pass to the HubMetadata initializer.
7979 """
8080 setup_dict = adata .uns ["_setup_dict" ]
81- prediction_keys = adata .uns ["prediction_keys" ]
82- methods = adata .uns ["methods" ]
81+ prediction_keys = list ( adata .uns ["prediction_keys" ])
82+ methods = list ( adata .uns ["methods" ])
8383 method_kwargs = adata .uns ["method_kwargs" ]
8484
8585 return cls (
@@ -122,6 +122,8 @@ class HubModelCardHelper:
122122 The version of `scvi-tools` that the model was trained with.
123123 anndata_version
124124 The version of anndata used during model training.
125+ popv_version
126+ The version of popV that the model was trained with.
125127 scikit_learn_version
126128 The version of scikit-learn used during model training.
127129 organism
@@ -153,6 +155,7 @@ class HubModelCardHelper:
153155
154156 license_info : str
155157 anndata_version : str
158+ popv_version : str
156159 scikit_learn_version : str
157160 organism : str
158161 tissues : list [str ] = field (default_factory = list )
@@ -172,6 +175,7 @@ def from_dir(
172175 license_info : str ,
173176 anndata_version : str ,
174177 scikit_learn_version : str ,
178+ popv_version : str ,
175179 organism : str ,
176180 metrics_report : str | None = None ,
177181 ** kwargs ,
@@ -210,6 +214,7 @@ def from_dir(
210214 return cls (
211215 license_info ,
212216 anndata_version ,
217+ popv_version ,
213218 scikit_learn_version ,
214219 organism ,
215220 metrics_report = metrics_report ,
@@ -222,11 +227,11 @@ def _to_model_card(self) -> ModelCard:
222227 "biology" ,
223228 "genomics" ,
224229 "single-cell" ,
225- f"anndata_version :{ self .anndata_version } " ,
226- f"scikit_learn_version :{ self .scikit_learn_version } " ,
230+ f"AnnData :{ self .anndata_version } " ,
231+ f"scikit_learn :{ self .scikit_learn_version } " ,
227232 f"organism:{ self .organism } " ,
228- f"python_version :{ '.' .join ([str (i ) for i in sys .version_info [:3 ]])} " ,
229- "popV" ,
233+ f"Python :{ '.' .join ([str (i ) for i in sys .version_info [:3 ]])} " ,
234+ f "popV: { self . popv_version } " ,
230235 ]
231236 for t in self .tissues :
232237 tags .append (f"tissue: { t } " )
0 commit comments