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

feat: showing models metadata #1345

Closed
wants to merge 6 commits into from

Conversation

axel7083
Copy link
Contributor

@axel7083 axel7083 commented Jul 8, 2024

What does this PR do?

Adding a Tab in the model detail page for GGUF models.

If the model is already downloaded, using it, otherwise using download url to fetch metadata.

This is possible thanks to the amazing library @huggingface/gguf

Screenshot / video of UI

models-metadata.mp4

What issues does this PR fix or reference?

Fixes #1344

How to test this PR?

  • unit tests has been provided

Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com>
@axel7083 axel7083 marked this pull request as ready for review July 8, 2024 15:28
@axel7083 axel7083 requested review from benoitf, jeffmaury and a team as code owners July 8, 2024 15:28
@axel7083 axel7083 requested a review from lstocchi July 8, 2024 15:44
Copy link
Contributor

@lstocchi lstocchi left a comment

Choose a reason for hiding this comment

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

I'm a bit puzzled about the UI and some of the values displayed. TBH i'm not able to evaluate which are the values that can be useful but when they are very long they are cut, so not very readable.

E.g.
image

Then i think that using the UI that we use on the k8s resources would present the values in a much more clear way
image

} else {
throw new Error('cannot get model metadata');
}
console.log('result', result);
Copy link
Contributor

Choose a reason for hiding this comment

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

to be removed

throw err;
} finally {
data['duration'] = performance.now() - before;
this.telemetry.logUsage('get-metadata');
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
this.telemetry.logUsage('get-metadata');
this.telemetry.logUsage('get-metadata', data);

name: key,
value: String(value),
}));
console.log(`found ${items.length} items`);
Copy link
Contributor

Choose a reason for hiding this comment

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

to be removed

const row = new TableRow<Item>({});

onMount(() => {
return modelsMetadata.subscribe(metadatas => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why subscribing to a store if the only place where it is written it's here? Would it be simpler to have something like

studioClient
        .getModelMetadata(modelId)
        .then(result => {
        items = .....

without creating/subscribing to a store which is never updated elsewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you leave the page and come back, this is made for caching it

Copy link
Contributor

Choose a reason for hiding this comment

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

ah ok, please add a comment as a reminder

@axel7083
Copy link
Contributor Author

axel7083 commented Jul 9, 2024

I'm a bit puzzled about the UI and some of the values displayed.

I was not sure, I am open to suggestion, but we should keep in mind that those are metadatas. The most useful are probably the one related to the head count, which can be used as suggested by #1280 (comment)

Then i think that using the UI that we use on the k8s resources would present the values in a much more clear way

@lstocchi I agree, but that would require to hardcode the keys to decide in advance where to place them, however those information are metadatas, and we are not sure for most of them where they will be. We might want to have it discuss in the UX call what do you think ?

@lstocchi
Copy link
Contributor

lstocchi commented Jul 9, 2024

I was not sure, I am open to suggestion, but we should keep in mind that those are metadatas. The most useful are probably the one related to the head count, which can be used as suggested by #1280 (comment)

@lstocchi I agree, but that would require to hardcode the keys to decide in advance where to place them, however those information are metadatas, and we are not sure for most of them where they will be. We might want to have it discuss in the UX call what do you think ?

Sure.
Also @slemeur and @jeffmaury can give some suggestions

@axel7083
Copy link
Contributor Author

axel7083 commented Jul 9, 2024

I was not sure, I am open to suggestion, but we should keep in mind that those are metadatas. The most useful are probably the one related to the head count, which can be used as suggested by #1280 (comment)

@lstocchi I agree, but that would require to hardcode the keys to decide in advance where to place them, however those information are metadatas, and we are not sure for most of them where they will be. We might want to have it discuss in the UX call what do you think ?

Sure. Also @slemeur and @jeffmaury can give some suggestions

I will convert it to draft then, however this is a requirement for #1280 (which is my critical for this sprint)

@slemeur
Copy link
Contributor

slemeur commented Jul 9, 2024

I do think the table is not looking consistent with the other screens.
If we want to quickly move forward on this, I'd recommend the format we have on the cards for the kubecontexts, which would just require to adjust the sizes.
Screenshot 2024-07-09 at 15 44 32

That being said, I agree with @lstocchi and would prefer we take the same approach as for the kube objects.

but that would require to hardcode the keys to decide in advance where to place them, however those information are metadatas, and we are not sure for most of them where they will be. We might want to have it discuss in the UX call what do you think ?

I think you might take the first word/token of the metadata as the category for each sections. Example tokenizer.dldld.dldld would create a section tokenizer and then you'd have sub tables.
The one with only one word/token, would go into "Globals" or something like that.

@axel7083
Copy link
Contributor Author

Closing for now

@axel7083 axel7083 closed this Jul 18, 2024
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.

feat(Models): adding inspect tab with metadata information
3 participants