Skip to content

fix card filling to include version#626

Closed
sayakpaul wants to merge 4 commits into
mainfrom
version-readme-cards
Closed

fix card filling to include version#626
sayakpaul wants to merge 4 commits into
mainfrom
version-readme-cards

Conversation

@sayakpaul

Copy link
Copy Markdown
Member

card_template_path.display()
);
}
const CARD_TEMPLATE: &str = include_str!("init/templates/CARD.md");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks wrong. We should render the card template that is in the repo, not the init template.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@danieldk danieldk Jun 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sayakpaul

Copy link
Copy Markdown
Member Author

Closing in favor of huggingface/kernels-community#937. Much better solution. Thanks.

@sayakpaul sayakpaul closed this Jun 8, 2026
@sayakpaul sayakpaul deleted the version-readme-cards branch June 8, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants