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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠