Skip to content

support hf api model retrieval basic md#1852

Merged
google-oss-prow[bot] merged 17 commits intokubeflow:mainfrom
adysenrothman:get-hf-model-data
Dec 3, 2025
Merged

support hf api model retrieval basic md#1852
google-oss-prow[bot] merged 17 commits intokubeflow:mainfrom
adysenrothman:get-hf-model-data

Conversation

@adysenrothman
Copy link
Copy Markdown
Contributor

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.

Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com>
Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com>
Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com>
Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com>
Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com>
Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com>
Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com>
Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com>
Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com>
Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com>
Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com>
@adysenrothman adysenrothman marked this pull request as ready for review November 25, 2025 21:39
@google-oss-prow google-oss-prow Bot requested a review from pboyd November 25, 2025 21:39
@Al-Pragliola
Copy link
Copy Markdown
Contributor

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.

@adysenrothman
Copy link
Copy Markdown
Contributor Author

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!

Comment thread catalog/internal/catalog/testdata/test-hf-catalog-sources.yaml
Comment thread catalog/internal/catalog/hf_catalog.go Outdated
Comment thread catalog/internal/catalog/hf_catalog.go Outdated
Comment thread catalog/internal/catalog/hf_catalog.go Outdated
Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com>
Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com>
Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com>
Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com>
Copy link
Copy Markdown
Member

@pboyd pboyd left a comment

Choose a reason for hiding this comment

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

Thanks for the changes.

/lgtm
/retest

Comment thread catalog/internal/catalog/hf_catalog.go Outdated
Signed-off-by: Adysen Rothman <85646824+adysenrothman@users.noreply.github.com>
@google-oss-prow google-oss-prow Bot removed the lgtm label Dec 2, 2025
Copy link
Copy Markdown
Member

@pboyd pboyd left a comment

Choose a reason for hiding this comment

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

/lgtm

@google-oss-prow google-oss-prow Bot added the lgtm label Dec 3, 2025
@pboyd
Copy link
Copy Markdown
Member

pboyd commented Dec 3, 2025

/approve

@google-oss-prow
Copy link
Copy Markdown
Contributor

[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

Details 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 google-oss-prow Bot merged commit 156b4f9 into kubeflow:main Dec 3, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants