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: allows to set a custom folder where to download models #1069

Merged
merged 1 commit into from
May 14, 2024

Conversation

lstocchi
Copy link
Contributor

@lstocchi lstocchi commented May 8, 2024

What does this PR do?

It allows to set a custom folder where to download models.
Right now, the settings it is just a textbox where the user has to copy/paste the path. It will need the PR podman-desktop/podman-desktop#7135 to be merged to switch to a file component

Screenshot / video of UI

N/A

What issues does this PR fix or reference?

it resolves #51

How to test this PR?

  1. update the models dir by using the new setting. Restart the extension and check it uses the new folder

@lstocchi lstocchi requested review from benoitf and a team as code owners May 8, 2024 11:34
@lstocchi lstocchi requested a review from feloy May 8, 2024 11:34
"type": "string",
"format": "folder",
"default": "",
"description": "Custom path where to download models. Note: The extension must be restarted for changes to take effect. (Default is blank)"
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not very user friendly to need to restart ht eextension after the user changes the setting. The AI Lab extension could use the onDidChangeConfiguration to detect when the setting is changed, and update the #modelsDir at this moment. Or is there something else that needs to be initialized at init time, and cannot be updated at this moment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No there should be no problem at init time, we would just need to dispose the old watchers i guess. My thought was to behave similarly to the podman binary path setting which is only read at activation. As i don't think this setting will be used frequently.

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

@lstocchi lstocchi merged commit 74e8a7f into containers:main May 14, 2024
4 checks passed
@lstocchi lstocchi deleted the i51 branch May 14, 2024 14:01
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.

Option to configure the path where models are stored
3 participants