| 1 | import type * as personalize from "@distilled.cloud/aws/personalize"; |
| 2 | import type * as Effect from "effect/Effect"; |
| 3 | import * as Binding from "../../Binding.ts"; |
| 4 | |
| 5 | /** |
| 6 | * Runtime binding for `personalize:GetSolutionMetrics` — Reads the offline evaluation metrics (precision, coverage, NDCG, …) |
| 7 | * of a trained solution version — used to gate deployment on model |
| 8 | * quality. |
| 9 | * Provide the implementation with |
| 10 | * `Effect.provide(AWS.Personalize.GetSolutionMetricsHttp)`. |
| 11 | * |
| 12 | * ### Retraining Loop |
| 13 | * **Example:** Evaluate a Trained Model |
| 14 | * ```typescript |
| 15 | * // init |
| 16 | * const getSolutionMetrics = yield* Personalize.GetSolutionMetrics(); |
| 17 | * |
| 18 | * const { metrics } = yield* getSolutionMetrics({ solutionVersionArn }); |
| 19 | * const ndcg = metrics?.["normalized_discounted_cumulative_gain_at_25"]; |
| 20 | * ``` |
| 21 | * |
| 22 | * @binding |
| 23 | */ |
| 24 | export interface GetSolutionMetrics extends Binding.Service< |
| 25 | GetSolutionMetrics, |
| 26 | "AWS.Personalize.GetSolutionMetrics", |
| 27 | () => Effect.Effect< |
| 28 | ( |
| 29 | request: personalize.GetSolutionMetricsRequest, |
| 30 | ) => Effect.Effect< |
| 31 | personalize.GetSolutionMetricsResponse, |
| 32 | personalize.GetSolutionMetricsError |
| 33 | > |
| 34 | > |
| 35 | > {} |
| 36 | export const GetSolutionMetrics = Binding.Service<GetSolutionMetrics>( |
| 37 | "AWS.Personalize.GetSolutionMetrics", |
| 38 | ); |