File tree Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Expand file tree Collapse file tree 2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,23 @@ def list_models(
78
78
name : typing .Optional [str ] = None ,
79
79
feature_extractor : typing .Optional [bool ] = None ,
80
80
weights : typing .Optional [typing .Union [bool , str ]] = None ,
81
- ) -> typing .List [str ]:
82
- result_names : typing .Set = set ()
81
+ ):
82
+ """List the models with the given arguments.
83
+
84
+ Args:
85
+ name: An optional `str` specifying the substring of the name of the
86
+ model to seatch for. If not specified, all models will be included.
87
+ feature_extractor: Whether to include models that support
88
+ feature extraction. Defaults to `None`, which means this
89
+ argument is not considered.
90
+ weights: An optional boolean or `str` specifying the name of the
91
+ pretrained weights. The available values are (`"imagenet"`).
92
+ Defaults to `None`, which means this argument is not considered.
93
+
94
+ Returns:
95
+ A list of model names.
96
+ """
97
+ result_names : typing .Set [str ] = set ()
83
98
for info in MODEL_REGISTRY :
84
99
# Add by default
85
100
result_names .add (info ["name" ])
Original file line number Diff line number Diff line change 4
4
5
5
@kimm_export (parent_path = ["kimm.utils" ])
6
6
def get_reparameterized_model (model : BaseModel ):
7
+ """Get the reparameterized model.
8
+
9
+ Internally, this function calls `get_reparameterized_model` from the
10
+ provided `model`.
11
+
12
+ Args:
13
+ model: A `BaseModel` to convert to its reparameterized form.
14
+
15
+ Returns:
16
+ An instance of the same class as `model` in its reparameterized form.
17
+ """
7
18
if not hasattr (model , "get_reparameterized_model" ):
8
19
raise ValueError (
9
20
"There is no 'get_reparameterized_model' method in the model. "
You can’t perform that action at this time.
0 commit comments