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: adding InferenceManager #444

Merged
merged 7 commits into from
Mar 11, 2024

Conversation

axel7083
Copy link
Contributor

@axel7083 axel7083 commented Mar 5, 2024

What does this PR do?

Adding a fully autonomous Inference Manager. It replaces most of the logic that was made inside the PlaygroundManager. This is the firsts step for having a Service page, specific for the models, and independent of the playground.

Requires

Screenshot / video of UI

What issues does this PR fix or reference?

Fixes #434

How to test this PR?

  • Unit tests has been provided

@axel7083 axel7083 force-pushed the feature/inference-manager branch from 265d0e6 to c758db3 Compare March 8, 2024 12:31
@axel7083 axel7083 marked this pull request as ready for review March 8, 2024 12:31
@axel7083 axel7083 requested a review from a team as a code owner March 8, 2024 12:31
Signed-off-by: axel7083 <[email protected]>
packages/backend/src/utils/inferenceUtils.ts Outdated Show resolved Hide resolved
packages/backend/src/utils/inferenceUtils.ts Outdated Show resolved Hide resolved
},
Labels: {
...config.labels,
[LABEL_INFERENCE_SERVER]: JSON.stringify(config.modelsInfo.map(model => model.id)),
Copy link
Contributor

Choose a reason for hiding this comment

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

The server is started only for the first model, why labels are about all models

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For now we only support one model. But in the future the Inference server can support several models see containers/ai-lab-recipes#72. So using something like MODEL_ID does not make sense as we want to be able to link more than one model to a single Inference server;

Copy link
Contributor

Choose a reason for hiding this comment

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

So if you find such a container you will think it supports several models where it has been started with a single one

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 it only support one, only one model id will be listed here

Copy link
Contributor

Choose a reason for hiding this comment

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

My concern is that on line 105 only the first element of the array is considered but not here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://github.com/projectatomic/ai-studio/blob/fa1fd271259eb9a94c9c357cc2b833afbfa43214/packages/backend/src/utils/inferenceUtils.ts#L101-L103

If you go just a little higher at line 103, you can see why I am only using the first at line 105, because currently we do not support more than one model. I still include all of them, because of guard at line 103, which prevent from having more than one.

In the future, when we will support than one, we will already have the proper logic to handle multiples, as we will simply remove the guard at line 103.

Signed-off-by: axel7083 <[email protected]>
@axel7083 axel7083 requested a review from jeffmaury March 8, 2024 15:16
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

@axel7083 axel7083 merged commit b76f906 into containers:main Mar 11, 2024
4 checks passed
mhdawson pushed a commit to mhdawson/podman-desktop-extension-ai-lab that referenced this pull request Nov 22, 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.

Divide the Playground manager in two Managers
2 participants