// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef MEDIA_LEARNING_COMMON_LEARNING_TASK_CONTROLLER_H_ #define MEDIA_LEARNING_COMMON_LEARNING_TASK_CONTROLLER_H_ #include <optional> #include "base/component_export.h" #include "base/functional/callback.h" #include "base/unguessable_token.h" #include "media/learning/common/labelled_example.h" #include "media/learning/common/learning_task.h" #include "media/learning/common/target_histogram.h" #include "services/metrics/public/cpp/ukm_source_id.h" namespace media { namespace learning { // Wrapper struct for completing an observation via LearningTaskController. // Most callers will just send in a TargetValue, so this lets us provide a // default weight. Further, a few callers will add optional data, like the UKM // SourceId, which most callers don't care about. struct ObservationCompletion { … }; // Client for a single learning task. Intended to be the primary API for client // code that generates FeatureVectors / requests predictions for a single task. // The API supports sending in an observed FeatureVector without a target value, // so that framework-provided features (FeatureProvider) can be snapshotted at // the right time. One doesn't generally want to wait until the TargetValue is // observed to do that. class COMPONENT_EXPORT(LEARNING_COMMON) LearningTaskController { … }; } // namespace learning } // namespace media #endif // MEDIA_LEARNING_COMMON_LEARNING_TASK_CONTROLLER_H_