-
Notifications
You must be signed in to change notification settings - Fork 182
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
[model libraries] simplified setup for countDownloads #485
Conversation
// match multiple possible filenames | ||
| { terms?: { path: string[] } } | ||
// match a wildcard | ||
| { wildcard?: { path: string } }; |
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.
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
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.
nice!
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.
Nice!
// match multiple possible filenames | ||
| { terms?: { path: string[] } } | ||
// match a wildcard | ||
| { wildcard?: { path: string } }; |
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.
(nit) FWIW, wildcards are not optimized in ES. Since we only use them to filter by suffix (*.onnx
, *.sentis
, etc.), we could use a reverse-token-filter + a prefix filter.
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.
hmm maybe cc @SBrandeis or @co42 for information
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.
We would need to reindex everything to add a reverse token filter. If the wildcard is fast enough let's use that
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.
Very nice!
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.
Very cool 🔥
Second part of #482
note to reviewers: I only expose the
filter
option because:should
. cc @coyotte508. Rather than fightining the tooling, i decided to work around it