commit | 67c4ba88815877cb6340dc522a827a9732a8ef2c | [log] [tgz] |
---|---|---|
author | Florian Leimgruber <fleimgruber@google.com> | Wed Oct 18 09:39:01 2023 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Oct 18 09:39:01 2023 |
tree | 865e0db4a52cdc13453b742e0ae4ba61dc45d65e | |
parent | e7220dd6278306136fe289686eb3b3c9a93f62ac [diff] |
Simplify Autofill ML model executor + handler The ML code is structured as follows: - The AutofillModelExecutor is responsible for converting the model input into a format that TFLite understand and converting the model output back to something that Autofill understands. - The AutofillMlPredictionModelHandler is responsible for retrieving the model (e.g. from the server), loading it and asynchronously calling the executor. This CL makes some minor simplifications to both classes, which will simplify the follow-up CLs: - Defines AutofillModelExecutor::Model(Input|Output) and replaces all hard coded instances of it. Follow-up CLs will change what the input/output types are. - Early return in AutofillMlPredictionModelHandler:: GetModelPredictionsForForm() when the model isn't available. This way, follow-up CLs can assume that everything was initialized correctly otherwise. - Use the newish base::test::TestFuture<> instead of base::RunLoop in the executor unit test. Bug: 1465926 Change-Id: I81a3f4a9db0052a33d659c5061d3f8b64926a371 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4946691 Code-Coverage: findit-for-me@appspot.gserviceaccount.com <findit-for-me@appspot.gserviceaccount.com> Commit-Queue: Florian Leimgruber <fleimgruber@google.com> Reviewed-by: Jihad Hanna <jihadghanna@google.com> Cr-Commit-Position: refs/heads/main@{#1211387}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.