Skip to content

Failed to Create an Experiment Using the TS Configurable Algorithm #2757

@zackcl

Description

@zackcl

Version where bug was found:
6.3.0

Describe the bug
In the newly designed UI, creating an experiment with the "TS Configurable" assignment algorithm returns a "400 Bad Request" error stating that the moocletPolicyParameters and rewardMetricKey properties are missing from the request body.

{
    "httpCode": 400,
    "name": "BadRequestError",
    "message": "Invalid body, check 'errors' property for more info.",
    "errors": [
        {
            "property": "moocletPolicyParameters",
            "children": [],
            "constraints": {
                "isDefined": "moocletPolicyParameters should not be null or undefined"
            }
        },
        {
            "property": "rewardMetricKey",
            "children": [],
            "constraints": {
                "isDefined": "rewardMetricKey should not be null or undefined"
            }
        }
    ]
}

To Reproduce

  1. Switch to the experiment-design-refresh branch.
  2. Go to the Experiments root page.
  3. Click "Add Experiment".
  4. Fill out the form and select "TS Configurable" as the assignment algorithm.
  5. Click "Create".
  6. Observe the "400 Bad Request" error from the POST /api/experiments response.

Expected behavior
When "TS Configurable" is selected as the assignment algorithm, the request body should include valid values for moocletPolicyParameters and rewardMetricKey so that the experiment can be created without errors.

Additional notes
It appears that the request body should also include the "queries": [] as well. For example:

{
    ...existing data,
    "moocletPolicyParameters": {
        "assignmentAlgorithm": "ts_configurable",
        "prior": {
            "failure": 1,
            "success": 1
        },
        "batch_size": 1,
        "max_rating": 1,
        "min_rating": 0,
        "uniform_threshold": 0,
        "tspostdiff_thresh": 0,
        "outcome_variable_name": "EXP_NAME_IN_ALL_CAPS_REWARD_VARIABLE"
    },
    "queries": [],
    "rewardMetricKey": "EXP_NAME_IN_ALL_CAPS_REWARD"
}

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Code Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions