-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4042 Hugging Face Hub integration #6454
Conversation
thanks for the PR! please signoff your commits...(follow the DCO checker's instructions https://github.com/Project-MONAI/MONAI/pull/6454/checks?check_run_id=13150779964) |
Signed-off-by: katielink <[email protected]>
Signed-off-by: katielink <[email protected]>
…k/MONAI into 4042-hf-hub-integration
Signed-off-by: katielink <[email protected]>
for more information, see https://pre-commit.ci
This is great, looking forward to seeing the bundles from Hugging Face hub use in MONAI/MONAILabel, etc.. |
Thanks for the contribution. Thanks in advance. |
Hi @Nic-Ma this is for community-supported bundles, so that the users have the freedom to create/share their models, it's not related to our model-zoo. |
As @wyli says this is for community support so it's up to others to ensure the quality of their bundles and our model-zoo will continue to do its own thing. |
Thanks for your question @Nic-Ma! In the future, if there's interest, we can explore uploading approved bundles to the Hub under the official MONAI organization on HF, which I believe could be as simple as a few lines of code here. The submission/review process would remain the same; just a copy of the approved bundle would be pushed to HF at the same time as it's uploaded to Github. It would give users another point of accessibility for approved |
Hi @katielink , @ericspod , @wyli , Thanks for the discussion, looks good to me. |
…k/MONAI into 4042-hf-hub-integration
Signed-off-by: katielink <[email protected]> DCO Remediation Commit for katielink <[email protected]> I, katielink <[email protected]>, hereby add my Signed-off-by to this commit: b7d462d I, katielink <[email protected]>, hereby add my Signed-off-by to this commit: be3e678 Signed-off-by: katielink <[email protected]>
DCO Remediation Commit for katielink <[email protected]> I, katielink <[email protected]>, hereby add my Signed-off-by to this commit: 44b09ac Signed-off-by: katielink <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi there, maintainer of huggingface_hub
here 👋 I came across this PR (thanks for the ping @osanseviero :)) and made a quick technical review about the integration with the Hub. Looks good to me except a tiny attribute error (see below). Thanks @katielink !
Hey @Wauplin thanks so much for the review, I'm still wrapping this WIP PR up on my end so I will incorporate these comments as I do so :) |
Signed-off-by: katielink <[email protected]>
Signed-off-by: katielink <[email protected]>
Signed-off-by: katielink <[email protected]>
Signed-off-by: katielink <[email protected]>
Signed-off-by: katielink <[email protected]>
Signed-off-by: katielink <[email protected]>
Signed-off-by: katielink <[email protected]>
Signed-off-by: katielink <[email protected]>
Super helpful, thanks @Wauplin! I'll look into it a bit more, but I like the idea of running mocks in MONAI and end-to-end tests in |
Hi @katielink I think mocks are fine too. I looked at the test organisation as well and the bundles that are there look good to me. The file structure is correct except the README.md files appear duplicated in the root. This gets pulled out as the model card which is what we want, but could we point HF to use the one in |
Hi @ericspod! Yes unfortunately to my knowledge, there's no way to specify the model card's location, so it must be in the root in order to be visible in the model card tab on HF. I'm currently copying this card so that I can add some HF-specific metadata to it automatically so it's easier for others to find (e.g. adding "monai" and "medical" as tags, adding the license if it's Apache 2.0 or MIT). I can delete this modified model card upon download to keep the original structure when the bundle is local, or if you'd prefer I can simply move and modify the original card. Let me know what you'd prefer! |
If you're changing the file to suit HF I would say we leave it and just accept it's duplicated, this seems to be the easiest approach. We can mention somewhere that this is done for HF compatibility. Thanks! |
Signed-off-by: katielink <[email protected]>
…k/MONAI into 4042-hf-hub-integration
Signed-off-by: Katie Link <[email protected]>
for more information, see https://pre-commit.ci
Signed-off-by: katielink <[email protected]>
Signed-off-by: katielink <[email protected]>
Signed-off-by: katielink <[email protected]>
Signed-off-by: katielink <[email protected]>
/build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, it looks good to me. all premerge tests work fine and I think we can merge it soon for more integration tests.
Co-authored-by: Wenqi Li <[email protected]> Signed-off-by: Katie Link <[email protected]>
Co-authored-by: Wenqi Li <[email protected]> Signed-off-by: Katie Link <[email protected]>
Thanks @wyli! |
/build |
/build |
/build |
/build |
Fixes #4042 .
Description
Types of changes
./runtests.sh -f -u --net --coverage
../runtests.sh --quick --unittests --disttests
.make html
command in thedocs/
folder.