Observation Batch Create

https://api.sigopt.com/v1/experiments/EXPERIMENT_ID/observations/batch

Creates multiple Observations. Matches the Observation Create endpoint.

Request Method: POST

Parameters

NameTypeRequired?Description

observations

N

An array of Observation objects.

Response

Pagination object.

Example Request

observations = conn.experiments(EXPERIMENT_ID).observations().create_batch(
  observations=[
    dict(
      suggestion="1",
      values=[
        dict(
          name="Accuracy",
          value=1
          )
        ]
      ),
    dict(
      assignments=dict(
        degree=2,
        gamma=3.6,
        kernel="rbf"
      ),
      values=[
        dict(
          name="Accuracy",
          value=1,
          value_std=0.1
          )
        ],
        metadata=dict(
          estimated_training_time_s=302
          ),
      ),
    dict(
      suggestion="2",
      failed=True,
      )
    ]
  )
Response
{
  "count": 3,
  "data": [
    {
      "assignments": {
        "degree": 2,
        "gamma": 3.6,
        "kernel": "rbf"
      },
      "created": 1414800000,
      "experiment": "1",
      "failed": true,
      "id": "3",
      "metadata": null,
      "object": "observation",
      "suggestion": "2",
      "value": null,
      "value_stddev": null,
      "values": []
    },
    {
      "assignments": {
        "degree": 2,
        "gamma": 3.6,
        "kernel": "rbf"
      },
      "created": 1414800000,
      "experiment": "1",
      "failed": false,
      "id": "2",
      "metadata": {
        "estimated_training_time_s": 302
      },
      "object": "observation",
      "suggestion": "1",
      "value": 1,
      "value_stddev": 0.1,
      "values": [
        {
          "name": "Accuracy",
          "object": "metric_evaluation",
          "value": 1,
          "value_stddev": 0.1
        }
      ]
    },
    {
      "assignments": {
        "degree": 2,
        "gamma": 3.6,
        "kernel": "rbf"
      },
      "created": 1414800000,
      "experiment": "1",
      "failed": false,
      "id": "1",
      "metadata": null,
      "object": "observation",
      "suggestion": "1",
      "value": 1,
      "value_stddev": null,
      "values": [
        {
          "name": "Accuracy",
          "object": "metric_evaluation",
          "value": 1,
          "value_stddev": null
        }
      ]
    }
  ],
  "object": "pagination",
  "paging": {
    "after": "CgIQAw",
    "before": null
  }
}

Last updated