Closed Bug 1909508 Opened 7 months ago Closed 6 months ago

allow model loading without running an inference

Categories

(Core :: Machine Learning, enhancement)

Firefox 131
enhancement

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: tarek, Assigned: atossou)

References

Details

(Whiteboard: [genai])

Attachments

(2 files)

Right now the model download happens lazily on the first run() but that makes the UI in pdf.js hard to build because we want to download models before the first run

Let's add the ability to optionally trigger this initialization independently from a run, and have createEngine await for it

@tarek I am taking this bug and putting it into 130. Fixing this bug makes the solution for https://bugzilla.mozilla.org/show_bug.cgi?id=1910627 easier.

Assignee: tziade → atossou
Version: unspecified → Firefox 130
Blocks: 1910627

The patch is quite large and complex - since we don't need it for 130, let's hold it and do it in 131.

For https://bugzilla.mozilla.org/show_bug.cgi?id=1910627 we can call the delete of the model in the flow

Type: defect → enhancement
Version: Firefox 130 → Firefox 131

This patch is not changing many things. It is mostly just adding await here and there

It felt like big because we cannot await in constructor. So first we need to refactor the code into constructor + static initialization (with no changes in behavior).

I can add a global flag that will disable the features it brings (ability to await for full initialization) as originally suggested for this bug.

That way we would be able to land it.

Attachment #9417595 - Attachment description: Bug 1909508 - allow model loading without running an inference - r?tarek,calixte → Bug 1909508 - allow model loading without running an inference - r?tarek,calixte
Pushed by atossou@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/62f9907a4c1c allow model loading without running an inference - r=tarek
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
Whiteboard: [genai]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: