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
feita há 9 meses208 visualizações
1 Resposta
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
respondido há 8 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas