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: alow to show model metrics in playground #2477

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

gastoner
Copy link
Contributor

@gastoner gastoner commented Feb 4, 2025

What does this PR do?

Shows metrics of a model in playground

Screenshot / video of UI

Untitled.video.-.Made.with.Clipchamp.4.mp4

What issues does this PR fix or reference?

Closes #438

How to test this PR?

@gastoner
Copy link
Contributor Author

gastoner commented Feb 6, 2025

Need to rebase after #2480 is merged

@gastoner gastoner force-pushed the expose_server_model_metrics branch from a762440 to 5ddd6ac Compare February 7, 2025 06:13
@gastoner gastoner marked this pull request as ready for review February 7, 2025 06:25
@gastoner gastoner requested review from benoitf, jeffmaury and a team as code owners February 7, 2025 06:25
@gastoner gastoner force-pushed the expose_server_model_metrics branch 2 times, most recently from 2b9eed0 to 264b263 Compare February 7, 2025 07:20
@@ -208,7 +209,7 @@ export class PlaygroundV2Manager implements Disposable {
throw new Error(
`modelId '${conversation.modelId}' is not available on the inference server, valid model ids are: ${server.models.map(model => model.id).join(', ')}.`,
);

console.error(options);
Copy link
Contributor

Choose a reason for hiding this comment

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

to remove?

"vulkan": "ghcr.io/containers/podman-desktop-extension-ai-lab-playground-images/ai-lab-playground-chat-vulkan@sha256:22e11661fe66ace7c30b419703305b803eb937da10e19c23cb6767f03578256c"
"default": "ghcr.io/containers/podman-desktop-extension-ai-lab-playground-images/ai-lab-playground-chat@sha256:2eb6cd7a4c4f76e54eeb88465281f4ff2a8f7b7e49db893a579a8f6842f69eb1",
"cuda": "ghcr.io/containers/podman-desktop-extension-ai-lab-playground-images/ai-lab-playground-chat-cuda@sha256:e4b57e52c31b379b4a73f8e9536bc130fdea665d88dbd05643350295b3402a2f",
"vulkan": "ghcr.io/containers/podman-desktop-extension-ai-lab-playground-images/ai-lab-playground-chat-vulkan@sha256:6a93b247099643f4f8c78ee9896c2ce4e9a455af114a69be09c16ad36aa51fd2"
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

please do that in a separate PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created #2491

@gastoner gastoner force-pushed the expose_server_model_metrics branch from 264b263 to 9ae4c04 Compare February 10, 2025 06:37
@gastoner gastoner requested a review from axel7083 February 10, 2025 06:40
if (messageIndex === -1)
throw new Error(`message with id ${messageId} does not exist in conversation ${conversationId}.`);

console.warn(messageIndex, usage);
Copy link
Contributor

Choose a reason for hiding this comment

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

why console.warn here?

Copy link
Contributor

@axel7083 axel7083 left a comment

Choose a reason for hiding this comment

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

Need some unit tests, but LGTM

@gastoner gastoner force-pushed the expose_server_model_metrics branch from 9ae4c04 to 607fe7e Compare February 10, 2025 09:51
Copy link
Contributor

@jeffmaury jeffmaury left a comment

Choose a reason for hiding this comment

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

LGTM

@gastoner gastoner requested a review from axel7083 February 10, 2025 16:53
@gastoner gastoner merged commit cd31d52 into containers:main Feb 12, 2025
7 checks passed
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.

Expose model server metrics in model playground
3 participants