Allow code to be viewed without installing models in Samples#428
Allow code to be viewed without installing models in Samples#428wang563681252 wants to merge 10 commits intomainfrom
Conversation
nmetulev
left a comment
There was a problem hiding this comment.
Minor comments, but otherwise works great:
-
When navigating between model groups, make sure the non-downloaded models list unselectes model when other group selects a model. To repro, open the model picker, select a non-downloaded model, navigate to other group (like Windows AI APIs) and select a model there, and then navigate back to ONNX models - the non-downloaded model remains selected but it shouldn't.
-
The message in the sample container when a non-downloaded model should be more descriptive with button to download the model and a button to view the code. Right now, it's not clear how to download the model or that I can still view the code. Consider having the code view open automatically when a non-downloaded model is selected.
-
Exporting the project with non downloaded model should maybe include a note that the sample will not work because the model is not downloaded.
| if (realCachedModel == null) | ||
| { | ||
| return null; | ||
| cachedModel = new(selectedModelDetails.Id, "Need Download", selectedModelDetails.Url, selectedModelDetails.Size, selectedModelDetails.HardwareAccelerators.FirstOrDefault(), winMlSampleOptions); |
There was a problem hiding this comment.
I think we can improve how this looks in the code - Need Download feels awkard. Consider something like path-to-model-files-once-downloaded to make it clear it's a path value that goes there.
There was a problem hiding this comment.
Which of the following do you mean to change?
- cachedModel = new(selectedModelDetails.Id, "path-to-model-files-once-downloaded",
- cachedModel = new(selectedModelDetails.Id, "C:\Users\xxx.cache\aigallery\microsoft--Phi-4-mini-instruct-onnx\main\cpu_and_mobile\cpu-int4-rtn-block-32-acc-level-4",
- cachedModel = new(selectedModelDetails.Id, "", (this code can use "App.ModelCache.IsModelCached(selectedModel.Url)" to check model status)
AIDevGallery/Controls/ModelPicker/ModelPickerViews/OnnxPickerView.xaml
Outdated
Show resolved
Hide resolved
AIDevGallery/Controls/ModelPicker/ModelPickerViews/OnnxPickerView.xaml.cs
Outdated
Show resolved
Hide resolved
|
@wang563681252 what would the additional download button do? Wouldn't it be confusing to have multiple places to download models? Also, you could consider grey-ing out the modelpicker button when no model is downloaded / available? |
Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Niels Laute <niels.laute@live.nl>
Hi @niels9001, @nmetulev say: "The message in the sample container when a non-downloaded model should be more descriptive with button to download the model and a button to view the code. Right now, it's not clear how to download the model or that I can still view the code. Consider having the code view open automatically when a non-downloaded model is selected." I think the meaning of this passage is for me to add a download button next to the selected model, but I don't think it's a good idea. I am discussing it with Nikola. |




Issue: feature #327
Now you can select nodownlaod model.

Show this image.

You can open code panel.

Export:(Only one option)
