Skip to content
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

Simpler support for new model libraries #482

Merged
merged 9 commits into from
Feb 15, 2024
Merged

Simpler support for new model libraries #482

merged 9 commits into from
Feb 15, 2024

Conversation

julien-c
Copy link
Member

@julien-c julien-c commented Feb 14, 2024

close this internal issue (ignore the unrelated README changes)

Comment on lines -50 to -52
export const ALL_DISPLAY_MODEL_LIBRARY_KEYS = ALL_MODEL_LIBRARY_KEYS.filter(
(k) => !["doctr", "k2", "mindspore", "tensorflowtts"].includes(k)
);
Copy link
Member Author

Choose a reason for hiding this comment

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

there was already this @osanseviero but i wrapped it inside the main dict

Note that i used an opt-in "filter: true" which seems friendlier to me

The elastic queries i will add in a second PR

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome, thanks a lot!

Copy link
Contributor

Choose a reason for hiding this comment

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

Was ALL_MODEL_LIBRARY_KEYS being used? They were still shown 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, looks like ALL_DISPLAY_MODEL_LIBRARY_KEYS (the filtered one) was only used in the suggestion dropdown in the GUI editor:

image

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, we need a follow up PR so ALL_DISPLAY_MODEL_LIBRARY_KEYS is also used to control the filters at left of hf.co/models

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Contributor

@osanseviero osanseviero left a comment

Choose a reason for hiding this comment

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

Thanks!

packages/tasks/src/model-libraries.ts Outdated Show resolved Hide resolved
packages/tasks/src/model-libraries.ts Show resolved Hide resolved
Comment on lines -50 to -52
export const ALL_DISPLAY_MODEL_LIBRARY_KEYS = ALL_MODEL_LIBRARY_KEYS.filter(
(k) => !["doctr", "k2", "mindspore", "tensorflowtts"].includes(k)
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome, thanks a lot!

Comment on lines -50 to -52
export const ALL_DISPLAY_MODEL_LIBRARY_KEYS = ALL_MODEL_LIBRARY_KEYS.filter(
(k) => !["doctr", "k2", "mindspore", "tensorflowtts"].includes(k)
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Was ALL_MODEL_LIBRARY_KEYS being used? They were still shown 🤔

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

PR looks good to me but I don't think it closes the issue. In https://github.com/huggingface/moon-landing/issues/8791#issuecomment-1912339361 @osanseviero suggested to:

  1. be able to remove the library from the filter list (done in this PR)
  2. move the Elastic queries to have everything in a single file (and public) => still to be done or it's already decided that we don't do it?

@@ -1,52 +1,333 @@
import * as snippets from "./library-ui-elements";
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's rename the file to make it more explicit it only contains snippets maybe

Copy link
Member Author

Choose a reason for hiding this comment

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

@julien-c
Copy link
Member Author

@Wauplin #482 (comment)

i propose to add the elastic queries in a subsequent PR

@julien-c julien-c merged commit d57fc81 into main Feb 15, 2024
3 checks passed
@julien-c julien-c deleted the simpler-libraries branch February 15, 2024 15:47
@julien-c
Copy link
Member Author

(cc @lhoestq also for dataset libraries)

@julien-c
Copy link
Member Author

Second part is in #485, please review 🙏

julien-c added a commit that referenced this pull request Feb 16, 2024
Second part of #482

note to reviewers: I only expose the `filter` option because:
- it's simpler: every library except for diffusers is using it.
- i had typings issues/conflicts with the Chai library when defining a
type that contains a property named `should`. cc @coyotte508. Rather
than fightining the tooling, i decided to work around it
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.

6 participants