Why is My Evidently Launch Failing?

0

I'm trying to call the CreateLaunch API in the CloudWatch Evidently service to launch new features. I'm using the AWS SDK v3 for Javascript. However, I'm getting the following error:

ValidationException-Launch groups name in steps not present in groups

Here are the parameters that I'm passing into the CreateLaunch Command:

2023-09-01T15:56:51.511Z	6e811110-f335-4d34-a37b-8703807c268f	INFO	Create Launch Parameters: {
    "project": "****", //removed for security purposes
    "name": "test-launch",
    "groups": [
        {
            "name": "test-launch-test-feature-true",
            "feature": "test-feature",
            "variation": "true"
        },
        {
            "name": "test-launch-test-feature-false",
            "feature": "test-feature",
            "variation": "false"
        }
    ],
    "scheduledSplitsConfig": {
        "steps": [
            {
                "startTime": "2023-09-01T14:30:28.208Z",
                "groupWeights": {
                    "true": 1,
                    "false": 0
                },
                "segmentOverrides": [
                    {
                        "segment": "agent_feedback",
                        "evaluationOrder": 0,
                        "weights": {
                            "true": 0,
                            "false": 1
                        }
                    }
                ]
            }
        ]
    }
}

I've looked through the SDK v3 documentation here: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/evidently/command/CreateLaunchCommand/ and the API reference here: https://docs.aws.amazon.com/cloudwatchevidently/latest/APIReference/API_CreateLaunch.html#API_CreateLaunch_Examples

I can't figure out what's wrong with the parameters I'm passing in. Any guidance is appreciated.

kenchen
已提問 9 個月前檢視次數 221 次
1 個回答
0

Figured out the answer on my own, but the examples in the documentation need to be modified so others don't make the same mistake.

The "feature variation" keys under the groupWeights and weights (under segmentOverride) fields need to match with the group names specified in groups.

The updated should be

{
    "project": "****", //removed for security purposes
    "name": "test-launch",
    "groups": [
        {
            "name": "test-launch-test-feature-true",
            "feature": "test-feature",
            "variation": "true"
        },
        {
            "name": "test-launch-test-feature-false",
            "feature": "test-feature",
            "variation": "false"
        }
    ],
    "scheduledSplitsConfig": {
        "steps": [
            {
                "startTime": "2023-09-01T14:30:28.208Z",
                "groupWeights": {
                    "test-launch-test-feature-true": 1, <- must match group name
                    "test-launch-test-feature-false": 0 <- must match group name
                },
                "segmentOverrides": [
                    {
                        "segment": "agent_feedback",
                        "evaluationOrder": 0,
                        "weights": {
                            "test-launch-test-feature-true": 0, <- must match group name
                            "test-launch-test-feature-false": 1 <- must match group name
                        }
                    }
                ]
            }
        ]
    }
}
kenchen
已回答 9 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南