fix card filling to include version#626
Conversation
| card_template_path.display() | ||
| ); | ||
| } | ||
| const CARD_TEMPLATE: &str = include_str!("init/templates/CARD.md"); |
There was a problem hiding this comment.
This looks wrong. We should render the card template that is in the repo, not the init template.
There was a problem hiding this comment.
Then I am not sure why kernels (example https://huggingface.co/kernels/drbh/yamoe) built with the latest version of the builder is rendering an example usage that doesn't have version.
There was a problem hiding this comment.
One possibility could be that the card was copied from elsewhere and that version didn't have version in the get_kernel() example usage.
With the current state of things (main), I think it will keep on rendering it without version. Should there then be any detection of the presence of version and if it's not present, it's injected? But that seems fragile to me.
There was a problem hiding this comment.
Then I am not sure why kernels (example https://huggingface.co/kernels/drbh/yamoe) built with the latest version of the builder is rendering an example usage that doesn't have version.
Because the card template in the source repo does not use the version that is passed template:
https://github.com/drbh/yamoe/blob/main/CARD.md
For kernels-community we should do this:
huggingface/kernels-community#937
We cannot just switch to the init template, because some kernels may have added extra information to the CARD.md in their repo (like extra sections with information, tutorials, acknowledgments, etc). Kernel developers should be able to customize what is put in the card and that won't work anymore if we render the init template.
|
Closing in favor of huggingface/kernels-community#937. Much better solution. Thanks. |
versionshould not be missing in the Hub kernel cards: