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: Playgrounds navigation #539

Merged
merged 6 commits into from
Mar 18, 2024
Merged

Conversation

feloy
Copy link
Contributor

@feloy feloy commented Mar 14, 2024

What does this PR do?

Adds a Playground page, and the possibility to create a new playground with an optional name, and a given model.

When a new playground is created and no model service is running for its model, the model server is created and started. If the model server exists but is stopped, it is started.

Out of scope for this PR:

  • the playground details page only displays the playground id
  • the PlaygroungManagerV2 API needs to be adapted to accept playgroundId as input, and not accept info already known by the playground (modelId)
  • the user is not redirected yet to the playground page (as it is empty for now)

Screenshot / video of UI

playgrounds-list.mp4

No models are downloaded yet:

no-model

More models could be downloaded:

some-models

All models are downloaded:

all-models

What issues does this PR fix or reference?

Part of #525

How to test this PR?

Go to the Playground page and use "New Playground" button to create new playgrounds.

Creating new playgrounds should start "Services" for the model chosen for the playground, if not already running

Depending on the models downloaded or not, different messages should appear (see screenhost above)

@feloy feloy requested a review from a team as a code owner March 14, 2024 10:54
@feloy feloy marked this pull request as draft March 14, 2024 10:54
@feloy feloy force-pushed the feat-525/playgrounds-list branch 5 times, most recently from 2cf038b to ffec719 Compare March 15, 2024 10:39
@feloy feloy force-pushed the feat-525/playgrounds-list branch 3 times, most recently from 8607d29 to b0d193f Compare March 15, 2024 14:06
Signed-off-by: Philippe Martin <phmartin@redhat.com>
Signed-off-by: Philippe Martin <phmartin@redhat.com>
Signed-off-by: Philippe Martin <phmartin@redhat.com>
@feloy feloy marked this pull request as ready for review March 15, 2024 14:12
@feloy feloy force-pushed the feat-525/playgrounds-list branch from b0d193f to b8d4c88 Compare March 15, 2024 14:12
Signed-off-by: Philippe Martin <phmartin@redhat.com>
import { withDefaultConfiguration } from '../utils/inferenceUtils';

export class PlaygroundV2Manager extends Publisher<PlaygroundV2[]> implements Disposable {
#playgrounds: Map<string, PlaygroundV2>;
Copy link
Contributor

@axel7083 axel7083 Mar 15, 2024

Choose a reason for hiding this comment

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

We might prefer to add a modelId and a name to the Conversation object rather than creating a new store ?

Copy link
Contributor Author

@feloy feloy Mar 15, 2024

Choose a reason for hiding this comment

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

To simplify the review, I have superposed our 2 logics without merging them for now, it will be part of the next PR


abstract createPlayground(name: string, model: ModelInfo): Promise<void>;

abstract getPlaygroundsV2(): Promise<PlaygroundV2[]>;
Copy link
Contributor

Choose a reason for hiding this comment

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

If we combine PlaygroundV2 and Conversation we could remove this method

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.

Accepting as it is since it will be simplified in a follow up PR

@jeffmaury
Copy link
Contributor

Small hint the when the form is presented for the first time no model is selected by default the first one should be. I don't know why but this does not happen after the first playground has been created.

Signed-off-by: Philippe Martin <phmartin@redhat.com>
@feloy feloy requested a review from jeffmaury March 18, 2024 08:04
@feloy
Copy link
Contributor Author

feloy commented Mar 18, 2024

Small hint the when the form is presented for the first time no model is selected by default the first one should be. I don't know why but this does not happen after the first playground has been created.

should be fixed now. Thanks

Signed-off-by: Philippe Martin <phmartin@redhat.com>
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

@feloy feloy merged commit 85ca8b4 into containers:main Mar 18, 2024
4 checks passed
@feloy feloy mentioned this pull request Mar 19, 2024
10 tasks
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.

None yet

3 participants