chromium/components/segmentation_platform/embedder/default_model/ios_module_ranker.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/segmentation_platform/embedder/default_model/ios_module_ranker.h"

#include <memory>

#include "base/command_line.h"
#include "base/metrics/field_trial_params.h"
#include "base/metrics/metrics_hashes.h"
#include "base/task/sequenced_task_runner.h"
#include "components/segmentation_platform/internal/metadata/metadata_writer.h"
#include "components/segmentation_platform/public/config.h"
#include "components/segmentation_platform/public/features.h"
#include "components/segmentation_platform/public/proto/aggregation.pb.h"
#include "components/segmentation_platform/public/proto/model_metadata.pb.h"

namespace segmentation_platform {

namespace {
SegmentId;

// Default parameters for IosModuleRanker model.
constexpr SegmentId kSegmentId =;
// Default parameters for TestIosModuleRanker model.
constexpr SegmentId kTestSegmentId =;
constexpr int64_t kModelVersion =;
// Store 28 buckets of input data (28 days).
constexpr int64_t kSignalStorageLength =;
// Wait until we have 0 days of data.
constexpr int64_t kMinSignalCollectionLength =;
// Refresh the result every time.
constexpr int64_t kResultTTLMinutes =;

constexpr std::array<const char*, 5> kIosModuleLabels =;

constexpr std::array<const char*, 5> kIosModuleInputContextKeys =;

// Output features:

constexpr char kClickHistogram[] =;

constexpr std::array<float, 1> kOutputFeatureDefaultValue{};
constexpr std::array<MetadataWriter::UMAFeature, 1> kOutputFeatures =;

// InputFeatures.

// Enum values for the IOS.MagicStack.Module.Click and
// IOS.MagicStack.Module.TopImpression histograms.
constexpr std::array<int32_t, 1> kEnumValueForMVT{};
constexpr std::array<int32_t, 1> kEnumValueForShortcuts{};
// TODO(ritikagup) : Update this if needed once histogram is available.
constexpr std::array<int32_t, 1> kEnumValueForSafetyCheck{};
constexpr std::array<int32_t, 1> kEnumValueForTabResumption{};
constexpr std::array<int32_t, 1> kEnumValueForParcelTracking{};

// TODO(ritikagup) : Loop through all the modules for these features for better
// readability. Set UMA metrics to use as input.
constexpr std::array<MetadataWriter::UMAFeature, 30> kUMAFeatures =;

float TransformFreshness(float freshness_score, float freshness_threshold) {}

}  // namespace

// static
std::unique_ptr<Config> IosModuleRanker::GetConfig() {}

IosModuleRanker::IosModuleRanker() :{}

std::unique_ptr<DefaultModelProvider::ModelConfig>
IosModuleRanker::GetModelConfig() {}

void IosModuleRanker::ExecuteModelWithInput(
    const ModelProvider::Request& inputs,
    ExecutionCallback callback) {}

// static
std::unique_ptr<Config> TestIosModuleRanker::GetConfig() {}

TestIosModuleRanker::TestIosModuleRanker()
    :{}

std::unique_ptr<DefaultModelProvider::ModelConfig>
TestIosModuleRanker::GetModelConfig() {}

void TestIosModuleRanker::ExecuteModelWithInput(
    const ModelProvider::Request& inputs,
    ExecutionCallback callback) {}

}  // namespace segmentation_platform