Skip to content

Conversation

bmahabirbu
Copy link
Contributor

What does this PR do?

adds the ability to select the runtime for playground

Screenshot / video of UI

runtime

What issues does this PR fix or reference?

fixes #2613

How to test this PR?

@bmahabirbu bmahabirbu requested review from benoitf, jeffmaury and a team as code owners June 12, 2025 05:45
@bmahabirbu bmahabirbu requested review from feloy and SoniaSandler June 12, 2025 05:45
@bmahabirbu bmahabirbu force-pushed the playground-runtime branch 2 times, most recently from bc087d7 to bdabfb0 Compare June 12, 2025 06:06
@feloy
Copy link
Contributor

feloy commented Jun 12, 2025

A few questions:

  • openvino is not compatible with mac/arm. Should we list it in such platform?
  • what is the meaning of the all inference runtime?

@bmahabirbu
Copy link
Contributor Author

@feloy good questions! That would be a good idea to remove openvino from mac for now

'ALL' in this case is a placeholder for every runtime provider besides a hardcoded exclusion.

Essentially I wanted a way to list all the runtime providers in the playground creation and this made the most sense to me at the moment. There's most definitely a cleaner approach!

Copy link
Contributor

@gastoner gastoner left a comment

Choose a reason for hiding this comment

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

I think we are missing none option.
The facebook model has none runtime but the filter for it is not there
image

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.

The runtime select should be seen as a filter, no hardcoded all, it should be clearable, if no value is selected, then all models should be listed.

No need to define what mean "all"

@bmahabirbu
Copy link
Contributor Author

bmahabirbu commented Jun 17, 2025

Thanks, @axel7083. That's a good way to handle it! In that case, should the runtime selection dropdown be defaulted to having no value so the user can see all the models available?

@bmahabirbu
Copy link
Contributor Author

bmahabirbu commented Jun 17, 2025

@gastoner good catch I assumed "none" in this case was simply to have no selection. I did have a playground with resnet setup but since the model is used for object detection, I didn't get the chat to work. Maybe we can keep it excluded?

@bmahabirbu bmahabirbu force-pushed the playground-runtime branch from bdabfb0 to 385f589 Compare June 17, 2025 00:32
@axel7083
Copy link
Contributor

should the runtime selection dropdown be defaulted to having no value so the user can see all the models available?

Yes! By default no filtering

@bmahabirbu
Copy link
Contributor Author

@axel7083 updated!

Copy link
Collaborator

@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.

Have tested it and got 2 issues:

  • in the selector the none value is presented but this value is useless because there are no inference servers for those kind of models: they are just there so that recipes can load them independently from an inference server
  • when the inference runtime from the settings is different from all then it should be the default value of the selector here

@bmahabirbu bmahabirbu force-pushed the playground-runtime branch 2 times, most recently from 59dad1b to c590339 Compare June 20, 2025 07:24
@bmahabirbu
Copy link
Contributor Author

@feloy I believe that Mac support for OpenVINO might be coming soon, maybe we can keep it as a selection? Also I was trying to import @podman-desktop/api to the frontend script playground create to use the env.ismac but it seems frontend scripts only have the ability to pull from pd ui-svelte. Is there an easier approach to having ismac usable for frontend?

@bmahabirbu bmahabirbu force-pushed the playground-runtime branch 2 times, most recently from 802118c to c0281d0 Compare June 20, 2025 08:24
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.

LGTM, tested on Windows, works as expected 👍

@bmahabirbu
Copy link
Contributor Author

@jeffmaury gave me the idea to use the inference registry store, I believ,e to obtain what the user operating system is to filter openvino for mac so will try this out before merge

@bmahabirbu
Copy link
Contributor Author

@jeffmaury did we want to have a defaut model selected when the runtime is all (e.i no filter)?

My current implementation doesnt have the model selected so I had to edit one of the e2e tests

@bmahabirbu bmahabirbu force-pushed the playground-runtime branch from 519e6a5 to 029f1c5 Compare June 25, 2025 07:52
@bmahabirbu bmahabirbu force-pushed the playground-runtime branch from 029f1c5 to 1e64080 Compare June 25, 2025 08:00
@axel7083
Copy link
Contributor

@jeffmaury did we want to have a defaut model selected when the runtime is all (e.i no filter)?

Would be nice to have this PR merged! So might be a follow-up PR? cc @jeffmaury

@axel7083
Copy link
Contributor

PR checks need to be fixed

@bmahabirbu bmahabirbu force-pushed the playground-runtime branch from 834d7dc to 0fd2c7e Compare June 27, 2025 05:20
@bmahabirbu
Copy link
Contributor Author

bmahabirbu commented Jun 27, 2025

I think this is all set to go now! I'm now pulling the registered provider backend list rather than using the enum InferenceType itself. Since openvino isnt registered on mac we shouldnt see it now for that platform

Copy link
Contributor

@feloy feloy left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@jeffmaury
Copy link
Collaborator

Still not working for me:in the preferred runtime I have set llama-cpp when I got to the playground image, the llama-cpp provider is not selected in the inference runtime selection box and I can see an OpenVINO model in the list of models

playground-select

@bmahabirbu
Copy link
Contributor Author

image

I can use the preferred runtime settings instead for runtime select but in the inference runtime dropdown, I dont see OpenVINO. Shouldn't we have it as a runtime backend? We can download the openvino model and create a service for it so we should have it for the playground too!

@bmahabirbu bmahabirbu force-pushed the playground-runtime branch 2 times, most recently from c6d13e4 to 4f69688 Compare July 1, 2025 19:46
@bmahabirbu
Copy link
Contributor Author

Now im preselecting the playground runtime based on the recommended config. I removed the logic that allowed me to retrieve the registered runtimes in favor of this approach. Once openvino gets added to the selection I will remove it from my exclude inferencetype array

@bmahabirbu bmahabirbu force-pushed the playground-runtime branch from 7c6b709 to 6882d66 Compare July 1, 2025 20:36
let runtime: InferenceType | undefined = undefined;
// Exlude certain runtimes from selection
export let exclude: InferenceType[] = [InferenceType.NONE, InferenceType.WHISPER_CPP, InferenceType.OPENVINO];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is OpenVINO be excluded ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't want openvino for mac so I exclude it till we have a pr that updates the runtime select in settings with openvino

@bmahabirbu bmahabirbu force-pushed the playground-runtime branch from 34af99e to a6c76b7 Compare July 7, 2025 18:21
@bmahabirbu bmahabirbu force-pushed the playground-runtime branch from a6c76b7 to 949aa9d Compare July 8, 2025 15:43
@bmahabirbu bmahabirbu merged commit b8583e9 into containers:main Jul 9, 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.

Implementation Selecting inferencing runtime when starting a playground
5 participants