model-registry icon indicating copy to clipboard operation
model-registry copied to clipboard

support hf api model retrieval basic md

Open adysenrothman opened this issue 3 months ago • 1 comments

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 DCO check)
  • [ ] 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-test has 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.

adysenrothman avatar Nov 07 '25 18:11 adysenrothman

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.

Al-Pragliola avatar Dec 01 '25 13:12 Al-Pragliola

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.

I'll check on that, thanks for taking a look!

adysenrothman avatar Dec 01 '25 14:12 adysenrothman

/approve

pboyd avatar Dec 03 '25 13:12 pboyd

[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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

google-oss-prow[bot] avatar Dec 03 '25 13:12 google-oss-prow[bot]