support hf api model retrieval basic md
This PR sets up a basic Hugging Face implementation for the model catalog.
Description
How Has This Been Tested?
Merge criteria:
- All the commits have been signed-off (To pass the
DCOcheck)
- [ ] The commits have meaningful messages
- [ ] Automated tests are provided as part of the PR for major new functionalities; testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
- [ ] The developer has manually tested the changes and verified that the changes work.
- [ ] Code changes follow the kubeflow contribution guidelines.
- [ ] For first time contributors: Please reach out to the Reviewers to ensure all tests are being run, ensuring the label
ok-to-testhas been added to the PR.
If you have UI changes
- [ ] The developer has added tests or explained why testing cannot be added.
- [ ] Included any necessary screenshots or gifs if it was a UI change.
- [ ] Verify that UI/UX changes conform the UX guidelines for Kubeflow.
Hey @adysenrothman great job! I tried running the sample sources file for hf from the README but I got the following errors:
E1201 14:35:45.262746 37571 hf_catalog.go:297] Failed to fetch model info for ibm-granite/granite-4.0-h-small: failed to decode model info for ibm-granite/granite-4.0-h-small: json: cannot unmarshal bool into Go struct field hfModelInfo.gated of type string
E1201 14:35:45.401656 37571 hf_catalog.go:297] Failed to fetch model info for microsoft/phi-2: failed to decode model info for microsoft/phi-2: json: cannot unmarshal bool into Go struct field hfModelInfo.gated of type string
seems like the gated field is defined as string, but HuggingFace returns it as false (boolean) for non-gated models and "auto" or "manual" (string) for gated ones.
Hey @adysenrothman great job! I tried running the sample sources file for hf from the README but I got the following errors:
E1201 14:35:45.262746 37571 hf_catalog.go:297] Failed to fetch model info for ibm-granite/granite-4.0-h-small: failed to decode model info for ibm-granite/granite-4.0-h-small: json: cannot unmarshal bool into Go struct field hfModelInfo.gated of type string E1201 14:35:45.401656 37571 hf_catalog.go:297] Failed to fetch model info for microsoft/phi-2: failed to decode model info for microsoft/phi-2: json: cannot unmarshal bool into Go struct field hfModelInfo.gated of type stringseems like the gated field is defined as string, but HuggingFace returns it as false (boolean) for non-gated models and "auto" or "manual" (string) for gated ones.
I'll check on that, thanks for taking a look!
/approve
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: pboyd
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [pboyd]
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment