client.models.list_builds

A method of the Models endpoint.

list_builds(id: int, *, limit: int = None, page_num: int = None, order: str = None, order_dir: str = None, iterator: bool = None) ListResponse | PaginatedResponse

List builds for the given Model job

API URL: GET /models/{id}/builds

import civis
client = civis.APIClient()
response = client.models.list_builds(...)
Parameters:
idint

The ID of the Model job.

limitint, optional

Number of results to return. Defaults to 20. Maximum allowed is 100.

page_numint, optional

Page number of the results to return. Defaults to the first page, 1.

orderstr, optional

The field on which to order the result set. Defaults to id. Must be one of: id.

order_dirstr, optional

Direction in which to sort, either asc (ascending) or desc (descending) defaulting to desc.

iteratorbool, optional

If True, return a generator (specifically, a civis.PaginatedResponse object) to iterate over all responses. Use it when more results than the maximum allowed by ‘limit’ are needed. When True, ‘page_num’ is ignored. If False, return a civis.ListResponse object (= a list of civis.Response objects), whose size is determined by ‘limit’. Defaults to False.

Returns:
civis.ListResponse | civis.PaginatedResponse
  • idint

    The ID of the model build.

  • statestr

    The state of the model build.one of ‘queued’ ‘running’ ‘succeeded’ ‘failed’ or ‘cancelled’.

  • errorstr

    The error, if any, returned by the build.

  • namestr

    The name of the model build.

  • created_atstr

    The time the model build was created.

  • descriptionstr

    A description of the model build.

  • root_mean_squared_errorfloat (float)

    A key metric for continuous models. Nil for other model types.

  • r_squared_errorfloat (float)

    A key metric for continuous models. Nil for other model types.

  • roc_aucfloat (float)

    A key metric for binary, multinomial, and ordinal models. Nil for other model types.

  • transformation_metadatastr

    A string representing the full JSON output of the metadata for transformation of column names

  • outputstr

    A string representing the JSON output for the specified build. Only present when smaller than 10KB in size.

  • output_locationstr

    A URL representing the location of the full JSON output for the specified build.The URL link will be valid for 5 minutes.