blob: 26584fbd5ee01f625efa1eb983559bb56c537d2d [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Top-level API of the Machine Learning Service: loading models for inference.
// NOTE: This mojom should be kept in sync with the copy in Chromium's repo in
// //chromeos/services/machine_learning/public/mojom/.
// Example: A backwards-compatible interface change and corresponding
// implementation change can be made here first, then replicated to the client
// (Chromium) later.
module chromeos.machine_learning.mojom;
import "ml/mojom/model.mojom";
enum LoadModelResult {
OK = 0,
MODEL_SPEC_ERROR,
LOAD_MODEL_ERROR,
};
// Top-level interface between Chromium and the ML Service daemon.
interface MachineLearningService {
// The ModelId inside ModelSpec is used to specify the model to be loaded.
LoadModel(ModelSpec spec, Model& request) => (LoadModelResult result);
};