Commit 04fa025c authored by Andrew Moylan's avatar Andrew Moylan Committed by Commit Bot

Roll ML Service mojoms from Chrome OS

This roll brings in the enum value for a new Smart Dim model.

Mojoms rolled with:
cp ~/chromiumos/src/platform2/ml/mojom/*.mojom \
  chromeos/services/machine_learning/public/mojom/
sed --in-place --regexp-extended \
  's~^import "ml~import "chromeos/services/machine_learning/public~g' \
  chromeos/services/machine_learning/public/mojom/*.mojom

Then updated .cc references to renamed Mojom names.

Bug: 937063
Change-Id: Ifff0796739ef7fe55878c8f25a27d6ce39f4f897
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1626835Reviewed-by: default avatarSam McNally <sammc@chromium.org>
Commit-Queue: Andrew Moylan <amoylan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662914}
parent dc8d0ae5
...@@ -130,7 +130,7 @@ void MlServiceClientImpl::ExecuteCallback( ...@@ -130,7 +130,7 @@ void MlServiceClientImpl::ExecuteCallback(
void MlServiceClientImpl::InitMlServiceHandlesIfNeeded() { void MlServiceClientImpl::InitMlServiceHandlesIfNeeded() {
if (!model_) { if (!model_) {
// Load the model. // Load the model.
ModelSpecPtr spec = ModelSpec::New(ModelId::SMART_DIM); ModelSpecPtr spec = ModelSpec::New(ModelId::SMART_DIM_20181115);
chromeos::machine_learning::ServiceConnection::GetInstance()->LoadModel( chromeos::machine_learning::ServiceConnection::GetInstance()->LoadModel(
std::move(spec), mojo::MakeRequest(&model_), std::move(spec), mojo::MakeRequest(&model_),
base::BindOnce(&MlServiceClientImpl::LoadModelCallback, base::BindOnce(&MlServiceClientImpl::LoadModelCallback,
......
...@@ -17,12 +17,15 @@ module chromeos.machine_learning.mojom; ...@@ -17,12 +17,15 @@ module chromeos.machine_learning.mojom;
// between Chromium and Chrome OS versions of this file. // between Chromium and Chrome OS versions of this file.
import "chromeos/services/machine_learning/public/mojom/graph_executor.mojom"; import "chromeos/services/machine_learning/public/mojom/graph_executor.mojom";
// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
// ModelIds prefixed with UNSUPPORTED_ are no longer supported. Attempts to load
// them will produce an error.
enum ModelId { enum ModelId {
UNKNOWN = 0, UNSUPPORTED_UNKNOWN = 0,
TEST_MODEL = 1, TEST_MODEL = 1,
SMART_DIM = 2, SMART_DIM_20181115 = 2,
// Remove kMax and use builtin kMaxValue after Mojo uprev (crbug.com/909719). SMART_DIM_20190221 = 3,
kMax = SMART_DIM,
}; };
// These values are persisted to logs. Entries should not be renumbered and // These values are persisted to logs. Entries should not be renumbered and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment