Metalhead.jl icon indicating copy to clipboard operation
Metalhead.jl copied to clipboard

Feature registries for models

Open theabhirath opened this issue 3 years ago • 3 comments

This is a first attempt at using FeatureRegistries.jl to allow the user to view the models available in Metalhead.jl. This is still a work in progress though - most notably, the time taken for using Metalhead rises significantly because of the extra code being executed.

It looks pretty though: Screenshot 2022-05-13 at 4 42 39 PM

theabhirath avatar May 13 '22 11:05 theabhirath

Looks great! Seems like this is related to #117, i.e. having a repo separate for "just the models" and then a "vision" repo. The latter can take on heavier deps. Maybe the models should go in MetalheadModels.jl?

darsnack avatar May 13 '22 20:05 darsnack

That sounds great! Metalhead can simply call using MetalheadModels.jl then.

One question I have regarding this PR, though, is that the major rise in time for using Metalhead seems to be not from using FeatureRegistries (which although not negligible, is still only about 200 ms). The rise in time is more around 3-4 seconds, which is mainly because at every using call, the parameters of every model are being initiated and summed over. We could theoretically just store the numbers but that doesn't seem so nice. If we continue to give parameter information programmatically, then maybe we need a way to lazy load the numbers only when the function is called - not sure if there is such a method. The other option, of course, is simply to give a different set of information. Would the docstring make more sense here? It would also help the user understand the variants for the model

theabhirath avatar May 14 '22 01:05 theabhirath

Yeah a docstring seems more useful than number of parameters. Maybe a description of the configurations too?

darsnack avatar May 14 '22 01:05 darsnack