Skip to content

Breakthrough Model

albert.resources.btmodel

BTModelSessionCategory

Bases: str, Enum

Who built a Breakthrough model session.

Attributes:

Name Type Description
USER_MODEL str

A session built by a user.

ALBERT_MODEL str

A session built automatically by Albert.

USER_MODEL

USER_MODEL = 'userModel'

ALBERT_MODEL

ALBERT_MODEL = 'albertModel'

BTModelRegistry

Bases: BaseAlbertModel

Build logs and metrics recorded for a model session.

Show JSON schema:
{
  "description": "Build logs and metrics recorded for a model session.",
  "properties": {
    "BuildLogs": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Free-form logs captured while the session's models were built.",
      "title": "Buildlogs"
    },
    "Metrics": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Free-form performance metrics recorded for the session's models.",
      "title": "Metrics"
    }
  },
  "title": "BTModelRegistry",
  "type": "object"
}

Fields:

build_logs

build_logs: dict[str, Any] | None = None

Free-form logs captured while the session's models were built.

metrics

metrics: dict[str, Any] | None = None

Free-form performance metrics recorded for the session's models.

BTModelSession

Bases: BaseResource

A parent session grouping a related set of Breakthrough models.

Albert Breakthrough is Albert's inverse-design / ML optimization capability. A model session ties together the models produced from a single dataset (BTDataset) in one modeling run. The individual models are represented by BTModel and managed through BTModelSessionCollection and BTModelCollection.

Example

from albert.resources.btmodel import BTModelSession, BTModelSessionCategory

session = BTModelSession(
    name="Tensile strength study",
    category=BTModelSessionCategory.USER_MODEL,
    dataset_id="DST1",
)
Show JSON schema:
{
  "$defs": {
    "AuditFields": {
      "description": "The audit fields for a resource",
      "properties": {
        "by": {
          "default": null,
          "title": "By",
          "type": "string"
        },
        "byName": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Byname"
        },
        "at": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "At"
        }
      },
      "title": "AuditFields",
      "type": "object"
    },
    "BTModelRegistry": {
      "description": "Build logs and metrics recorded for a model session.",
      "properties": {
        "BuildLogs": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Free-form logs captured while the session's models were built.",
          "title": "Buildlogs"
        },
        "Metrics": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Free-form performance metrics recorded for the session's models.",
          "title": "Metrics"
        }
      },
      "title": "BTModelRegistry",
      "type": "object"
    },
    "BTModelSessionCategory": {
      "description": "Who built a Breakthrough model session.\n\nAttributes\n----------\nUSER_MODEL : str\n    A session built by a user.\nALBERT_MODEL : str\n    A session built automatically by Albert.",
      "enum": [
        "userModel",
        "albertModel"
      ],
      "title": "BTModelSessionCategory",
      "type": "string"
    },
    "Status": {
      "description": "The status of a resource.\n\nAttributes\n----------\nACTIVE : str\n    The resource is fully operational and visible in normal operations.\nINACTIVE : str\n    The resource is hidden from normal operations and disabled from use.",
      "enum": [
        "active",
        "inactive"
      ],
      "title": "Status",
      "type": "string"
    }
  },
  "description": "A parent session grouping a related set of Breakthrough models.\n\nAlbert Breakthrough is Albert's inverse-design / ML optimization capability. A model session ties\ntogether the models produced from a single dataset\n([`BTDataset`][albert.resources.btdataset.BTDataset]) in one modeling run. The\nindividual models are represented by [`BTModel`][albert.resources.btmodel.BTModel] and managed through\n[`BTModelSessionCollection`][albert.collections.btmodel.BTModelSessionCollection] and\n[`BTModelCollection`][albert.collections.btmodel.BTModelCollection].\n\n!!! example\n    ```python\n    from albert.resources.btmodel import BTModelSession, BTModelSessionCategory\n\n    session = BTModelSession(\n        name=\"Tensile strength study\",\n        category=BTModelSessionCategory.USER_MODEL,\n        dataset_id=\"DST1\",\n    )\n    ```",
  "properties": {
    "status": {
      "anyOf": [
        {
          "$ref": "#/$defs/Status"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The status of the resource, optional."
    },
    "Created": {
      "anyOf": [
        {
          "$ref": "#/$defs/AuditFields"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Audit fields for the creation of the resource, optional."
    },
    "Updated": {
      "anyOf": [
        {
          "$ref": "#/$defs/AuditFields"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Audit fields for the update of the resource, optional."
    },
    "name": {
      "description": "Human-readable name of the session.",
      "title": "Name",
      "type": "string"
    },
    "category": {
      "$ref": "#/$defs/BTModelSessionCategory",
      "description": "Whether the session was built by a user or by Albert."
    },
    "id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Unique identifier of the session (format ``MDS...``). Assigned by Albert on creation.",
      "title": "Id"
    },
    "datasetId": {
      "description": "Identifier of the dataset the session's models are built from (format ``DST...``).",
      "title": "Datasetid",
      "type": "string"
    },
    "defaultModel": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Name of the session's default model, if one is designated.",
      "title": "Defaultmodel"
    },
    "totalTime": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Total time taken to build the session, if recorded.",
      "title": "Totaltime"
    },
    "modelCount": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Number of models contained in the session, if reported.",
      "title": "Modelcount"
    },
    "target": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The target variable(s) the session's models predict.",
      "title": "Target"
    },
    "Registry": {
      "anyOf": [
        {
          "$ref": "#/$defs/BTModelRegistry"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Build logs and metrics recorded for the session."
    },
    "albertModelDetails": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Details specific to an Albert-built session, when applicable.",
      "title": "Albertmodeldetails"
    },
    "flag": {
      "default": false,
      "description": "Boolean marker on the session. Defaults to False.",
      "title": "Flag",
      "type": "boolean"
    }
  },
  "required": [
    "name",
    "category",
    "datasetId"
  ],
  "title": "BTModelSession",
  "type": "object"
}

Fields:

name

name: str

Human-readable name of the session.

category

Whether the session was built by a user or by Albert.

id

id: BTModelSessionId | None = None

Unique identifier of the session (format MDS...). Assigned by Albert on creation.

dataset_id

dataset_id: BTDatasetId

Identifier of the dataset the session's models are built from (format DST...).

default_model

default_model: str | None = None

Name of the session's default model, if one is designated.

total_time

total_time: str | None = None

Total time taken to build the session, if recorded.

model_count

model_count: int | None = None

Number of models contained in the session, if reported.

target

target: list[str] | None = None

The target variable(s) the session's models predict.

registry

registry: BTModelRegistry | None = None

Build logs and metrics recorded for the session.

albert_model_details

albert_model_details: dict[str, Any] | None = None

Details specific to an Albert-built session, when applicable.

flag

flag: bool = False

Boolean marker on the session. Defaults to False.

BTModelType

Bases: str, Enum

Whether a model belongs to a session or stands alone.

Attributes:

Name Type Description
SESSION str

A model that belongs to a parent model session.

DETACHED str

A standalone model with no parent session.

SESSION

SESSION = 'Session'

DETACHED

DETACHED = 'Detached'

BTModelState

Bases: str, Enum

Progress state of a Breakthrough model build.

Attributes:

Name Type Description
QUEUED str

The build has been queued but has not started.

BUILDING_MODELS str

Models are being trained.

GENERATING_CANDIDATES str

Candidate solutions are being generated.

COMPLETE str

The build has finished successfully.

ERROR str

The build failed.

QUEUED

QUEUED = 'Queued'

BUILDING_MODELS

BUILDING_MODELS = 'Building Models'

GENERATING_CANDIDATES

GENERATING_CANDIDATES = 'Generating Candidates'

COMPLETE

COMPLETE = 'Complete'

ERROR

ERROR = 'Error'

BTModel

Bases: BaseResource

A single trained Breakthrough model.

Albert Breakthrough is Albert's inverse-design / ML optimization capability. A model can belong to a parent session (BTModelSession), in which case parent_id is set to the session ID, or be a detached, standalone model. Models are managed through BTModelCollection.

Example

from albert.resources.btmodel import BTModel

model = BTModel(name="Random forest v1")
Show JSON schema:
{
  "$defs": {
    "AuditFields": {
      "description": "The audit fields for a resource",
      "properties": {
        "by": {
          "default": null,
          "title": "By",
          "type": "string"
        },
        "byName": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Byname"
        },
        "at": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "At"
        }
      },
      "title": "AuditFields",
      "type": "object"
    },
    "BTModelState": {
      "description": "Progress state of a Breakthrough model build.\n\nAttributes\n----------\nQUEUED : str\n    The build has been queued but has not started.\nBUILDING_MODELS : str\n    Models are being trained.\nGENERATING_CANDIDATES : str\n    Candidate solutions are being generated.\nCOMPLETE : str\n    The build has finished successfully.\nERROR : str\n    The build failed.",
      "enum": [
        "Queued",
        "Building Models",
        "Generating Candidates",
        "Complete",
        "Error"
      ],
      "title": "BTModelState",
      "type": "string"
    },
    "BTModelType": {
      "description": "Whether a model belongs to a session or stands alone.\n\nAttributes\n----------\nSESSION : str\n    A model that belongs to a parent model session.\nDETACHED : str\n    A standalone model with no parent session.",
      "enum": [
        "Session",
        "Detached"
      ],
      "title": "BTModelType",
      "type": "string"
    },
    "Status": {
      "description": "The status of a resource.\n\nAttributes\n----------\nACTIVE : str\n    The resource is fully operational and visible in normal operations.\nINACTIVE : str\n    The resource is hidden from normal operations and disabled from use.",
      "enum": [
        "active",
        "inactive"
      ],
      "title": "Status",
      "type": "string"
    }
  },
  "description": "A single trained Breakthrough model.\n\nAlbert Breakthrough is Albert's inverse-design / ML optimization capability. A model can belong to a\nparent session ([`BTModelSession`][albert.resources.btmodel.BTModelSession]), in which case ``parent_id`` is set to\nthe session ID, or be a detached, standalone model. Models are managed through\n[`BTModelCollection`][albert.collections.btmodel.BTModelCollection].\n\n!!! example\n    ```python\n    from albert.resources.btmodel import BTModel\n\n    model = BTModel(name=\"Random forest v1\")\n    ```",
  "properties": {
    "status": {
      "anyOf": [
        {
          "$ref": "#/$defs/Status"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The status of the resource, optional."
    },
    "Created": {
      "anyOf": [
        {
          "$ref": "#/$defs/AuditFields"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Audit fields for the creation of the resource, optional."
    },
    "Updated": {
      "anyOf": [
        {
          "$ref": "#/$defs/AuditFields"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Audit fields for the update of the resource, optional."
    },
    "name": {
      "description": "Human-readable name of the model.",
      "title": "Name",
      "type": "string"
    },
    "id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Unique identifier of the model (format ``MDL...``). Assigned by Albert on creation.",
      "title": "Id"
    },
    "datasetId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Identifier of the dataset the model is built from (format ``DST...``).",
      "title": "Datasetid"
    },
    "parentId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Identifier of the parent session (format ``MDS...``), or None if the model is detached.",
      "title": "Parentid"
    },
    "Metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Free-form metadata associated with the model.",
      "title": "Metadata"
    },
    "type": {
      "anyOf": [
        {
          "$ref": "#/$defs/BTModelType"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Whether the model belongs to a session or is detached."
    },
    "state": {
      "anyOf": [
        {
          "$ref": "#/$defs/BTModelState"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Current progress state of the model build."
    },
    "target": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The target variable(s) the model predicts.",
      "title": "Target"
    },
    "startTime": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "When the model build started, if recorded.",
      "title": "Starttime"
    },
    "endTime": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "When the model build finished, if recorded.",
      "title": "Endtime"
    },
    "totalTime": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Total time taken to build the model, if recorded.",
      "title": "Totaltime"
    },
    "modelBinaryKey": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Storage key for the trained model artifact, if applicable.",
      "title": "Modelbinarykey"
    },
    "flag": {
      "default": false,
      "description": "Boolean marker on the model. Defaults to False.",
      "title": "Flag",
      "type": "boolean"
    }
  },
  "required": [
    "name"
  ],
  "title": "BTModel",
  "type": "object"
}

Fields:

name

name: str

Human-readable name of the model.

id

id: BTModelId | None = None

Unique identifier of the model (format MDL...). Assigned by Albert on creation.

dataset_id

dataset_id: BTDatasetId | None = None

Identifier of the dataset the model is built from (format DST...).

parent_id

parent_id: BTModelSessionId | None = None

Identifier of the parent session (format MDS...), or None if the model is detached.

metadata

metadata: dict[str, Any] | None = None

Free-form metadata associated with the model.

type

type: BTModelType | None = None

Whether the model belongs to a session or is detached.

state

state: BTModelState | None = None

Current progress state of the model build.

target

target: list[str] | None = None

The target variable(s) the model predicts.

start_time

start_time: str | None = None

When the model build started, if recorded.

end_time

end_time: str | None = None

When the model build finished, if recorded.

total_time

total_time: str | None = None

Total time taken to build the model, if recorded.

model_binary_key

model_binary_key: str | None = None

Storage key for the trained model artifact, if applicable.

flag

flag: bool = False

Boolean marker on the model. Defaults to False.