Skip to content

Design Model Configs (🧪Beta)

albert.resources.design_model_configs

Attributes:

Name Type Description
MaskEntry

One feature-mask entry: a family selector or a quantity descriptor.

MaskEntryRead

A mask entry as read from the service. A known kind parses to its model (a

PreviewCount

How many preview rows or columns to return: a positive number, or "all".

DesignModelConfigOperation

A builder operation on a draft design model config.

MaskEntry

One feature-mask entry: a family selector or a quantity descriptor.

MaskEntryRead

MaskEntryRead = Annotated[
    _ReadFamilySelector | QuantityOperandRead,
    Field(union_mode="left_to_right"),
]

A mask entry as read from the service. A known kind parses to its model (a FamilySelector or a quantity descriptor) and keeps fields this version does not model; an unknown kind parses to UnknownDescriptor.

PreviewCount

PreviewCount = PositiveInt | Literal['all']

How many preview rows or columns to return: a positive number, or "all".

DesignModelConfigOperation

DesignModelConfigOperation = Annotated[
    SetOutputOperation
    | RemoveComponentOperation
    | UpdateComponentOperation,
    Field(discriminator="op"),
]

A builder operation on a draft design model config.

RemoveComponentOperation and UpdateComponentOperation are the same classes design spaces use; here the path is outputs/<target id>.

DesignModelConfigState

Bases: StrEnum

Lifecycle of a design model config. Orthogonal to its soft-delete status.

Attributes:

Name Type Description
DRAFT
PUBLISHED

DRAFT

DRAFT = 'draft'

PUBLISHED

PUBLISHED = 'published'

OutputDataType

Bases: StrEnum

The kind of prediction task an output is.

Attributes:

Name Type Description
NUMERIC
CATEGORICAL

NUMERIC

NUMERIC = 'numeric'

CATEGORICAL

CATEGORICAL = 'categorical'

OutputTransform

Bases: StrEnum

A transform applied to a numeric output before modelling.

Attributes:

Name Type Description
NONE
LOG
ASINH
YEO_JOHNSON
BOX_COX

NONE

NONE = 'none'

LOG

LOG = 'log'

ASINH

ASINH = 'asinh'

YEO_JOHNSON

YEO_JOHNSON = 'yeoJohnson'

BOX_COX

BOX_COX = 'boxCox'

FeatureFamily

Bases: StrEnum

The default feature families a resolved feature belongs to.

Attributes:

Name Type Description
INGREDIENT_AMOUNT
LABEL_FRACTION
INGREDIENT_PROPERTY
PARAMETER

INGREDIENT_AMOUNT

INGREDIENT_AMOUNT = 'ingredient_amount'

LABEL_FRACTION

LABEL_FRACTION = 'label_fraction'

INGREDIENT_PROPERTY

INGREDIENT_PROPERTY = 'ingredient_property'

PARAMETER

PARAMETER = 'parameter'

DesignModelConfigViolationCode

Bases: StrEnum

Machine-readable category of a design model config finding.

Attributes:

Name Type Description
TARGET_NOT_IN_DATASET
TRANSFORM_REQUIRES_POSITIVE_TARGET
INERT_MASK_ENTRY
FEATURE_DROPPED_BY_OVERLAP
ESTIMATOR_DOWNGRADED
UNKNOWN_REFERENCE
DIMENSION_NOT_MODELLED
INVALID_SETTINGS
INVALID_CONSTRAINT
VARIABLE_NOT_DERIVED
INSUFFICIENT_TRAINING_DATA
DUPLICATE_EXTRA
CONFLICTING_LABEL_DEFINITION

TARGET_NOT_IN_DATASET

TARGET_NOT_IN_DATASET = 'target_not_in_dataset'

TRANSFORM_REQUIRES_POSITIVE_TARGET

TRANSFORM_REQUIRES_POSITIVE_TARGET = (
    "transform_requires_positive_target"
)

INERT_MASK_ENTRY

INERT_MASK_ENTRY = 'inert_mask_entry'

FEATURE_DROPPED_BY_OVERLAP

FEATURE_DROPPED_BY_OVERLAP = 'feature_dropped_by_overlap'

ESTIMATOR_DOWNGRADED

ESTIMATOR_DOWNGRADED = 'estimator_downgraded'

UNKNOWN_REFERENCE

UNKNOWN_REFERENCE = 'unknown_reference'

DIMENSION_NOT_MODELLED

DIMENSION_NOT_MODELLED = 'dimension_not_modelled'

INVALID_SETTINGS

INVALID_SETTINGS = 'invalid_settings'

INVALID_CONSTRAINT

INVALID_CONSTRAINT = 'invalid_constraint'

VARIABLE_NOT_DERIVED

VARIABLE_NOT_DERIVED = 'variable_not_derived'

INSUFFICIENT_TRAINING_DATA

INSUFFICIENT_TRAINING_DATA = 'insufficient_training_data'

DUPLICATE_EXTRA

DUPLICATE_EXTRA = 'duplicate_extra'

CONFLICTING_LABEL_DEFINITION

CONFLICTING_LABEL_DEFINITION = (
    "conflicting_label_definition"
)

FamilySelector

Bases: TypedDesignModel

A mask entry matching every default feature of one family.

Show JSON schema:
{
  "additionalProperties": false,
  "description": "A mask entry matching every default feature of one family.",
  "properties": {
    "type": {
      "description": "Which family to match: all ingredient amounts, label fractions, ingredient\nproperty aggregations, or parameters.",
      "enum": [
        "allIngredientAmounts",
        "allLabelFractions",
        "allIngredientProperties",
        "allParameters"
      ],
      "title": "Type",
      "type": "string"
    }
  },
  "required": [
    "type"
  ],
  "title": "FamilySelector",
  "type": "object"
}

Config:

  • extra: forbid
  • revalidate_instances: subclass-instances

Fields:

  • type (Literal['allIngredientAmounts', 'allLabelFractions', 'allIngredientProperties', 'allParameters'])

type

type: Literal[
    "allIngredientAmounts",
    "allLabelFractions",
    "allIngredientProperties",
    "allParameters",
]

Which family to match: all ingredient amounts, label fractions, ingredient property aggregations, or parameters.

FeatureMask

Bases: BaseAlbertModel

Which features an output uses: exactly one of include or exclude.

Each is a non-empty list of mask entries. An output with no mask uses all features.

Show JSON schema:
{
  "$defs": {
    "AggregationBasis": {
      "description": "How an aggregation combines the member values of its scope.",
      "enum": [
        "mean",
        "sum"
      ],
      "title": "AggregationBasis",
      "type": "string"
    },
    "FamilySelector": {
      "additionalProperties": false,
      "description": "A mask entry matching every default feature of one family.",
      "properties": {
        "type": {
          "description": "Which family to match: all ingredient amounts, label fractions, ingredient\nproperty aggregations, or parameters.",
          "enum": [
            "allIngredientAmounts",
            "allLabelFractions",
            "allIngredientProperties",
            "allParameters"
          ],
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "FamilySelector",
      "type": "object"
    },
    "IngredientAmountOperand": {
      "additionalProperties": false,
      "description": "The amount of one ingredient in the formulation.",
      "properties": {
        "type": {
          "const": "ingredientAmount",
          "default": "ingredientAmount",
          "description": "Descriptor kind; fixed to ``ingredientAmount``.",
          "title": "Type",
          "type": "string"
        },
        "ingredient": {
          "description": "The inventory ID (format ``INV...``) of the ingredient.",
          "title": "Ingredient",
          "type": "string"
        }
      },
      "required": [
        "ingredient"
      ],
      "title": "IngredientAmountOperand",
      "type": "object"
    },
    "LabelFractionOperand": {
      "additionalProperties": false,
      "description": "The summed fraction of a label's member ingredients.",
      "properties": {
        "type": {
          "const": "labelFraction",
          "default": "labelFraction",
          "description": "Descriptor kind; fixed to ``labelFraction``.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "A platform tag (format ``TAG...``) or a local label key (``local:...``).",
          "title": "Label",
          "type": "string"
        }
      },
      "required": [
        "label"
      ],
      "title": "LabelFractionOperand",
      "type": "object"
    },
    "ParameterOperand": {
      "additionalProperties": false,
      "description": "The value of one parameter, addressed by its composite key.",
      "properties": {
        "type": {
          "const": "parameter",
          "default": "parameter",
          "description": "Descriptor kind; fixed to ``parameter``.",
          "title": "Type",
          "type": "string"
        },
        "parameter": {
          "description": "The composite parameter key, ``{DAT|PRG}#PRM[#UNI]``.",
          "title": "Parameter",
          "type": "string"
        }
      },
      "required": [
        "parameter"
      ],
      "title": "ParameterOperand",
      "type": "object"
    },
    "PropertyAggregationOperand": {
      "additionalProperties": false,
      "description": "An aggregation of one inventory property over a scope of ingredients.",
      "properties": {
        "type": {
          "const": "propertyAggregation",
          "default": "propertyAggregation",
          "description": "Descriptor kind; fixed to ``propertyAggregation``.",
          "title": "Type",
          "type": "string"
        },
        "basis": {
          "$ref": "#/$defs/AggregationBasis",
          "description": "How the member values combine: ``mean`` or ``sum``."
        },
        "property": {
          "description": "Name of the aggregated inventory property.",
          "title": "Property",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Restrict the aggregation to a label's members. Omit to scope to all ingredients.",
          "title": "Label"
        },
        "impute": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "How missing property values are handled: ``True`` fills the column mean, a number\nfills that constant, ``False`` fails on a sparse table. Omit to leave it unstated.",
          "title": "Impute"
        }
      },
      "required": [
        "basis",
        "property"
      ],
      "title": "PropertyAggregationOperand",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "description": "Which features an output uses: exactly one of ``include`` or ``exclude``.\n\nEach is a non-empty list of mask entries. An output with no mask uses all features.",
  "properties": {
    "include": {
      "anyOf": [
        {
          "items": {
            "discriminator": {
              "mapping": {
                "allIngredientAmounts": "#/$defs/FamilySelector",
                "allIngredientProperties": "#/$defs/FamilySelector",
                "allLabelFractions": "#/$defs/FamilySelector",
                "allParameters": "#/$defs/FamilySelector",
                "ingredientAmount": "#/$defs/IngredientAmountOperand",
                "labelFraction": "#/$defs/LabelFractionOperand",
                "parameter": "#/$defs/ParameterOperand",
                "propertyAggregation": "#/$defs/PropertyAggregationOperand"
              },
              "propertyName": "type"
            },
            "oneOf": [
              {
                "$ref": "#/$defs/FamilySelector"
              },
              {
                "$ref": "#/$defs/IngredientAmountOperand"
              },
              {
                "$ref": "#/$defs/LabelFractionOperand"
              },
              {
                "$ref": "#/$defs/ParameterOperand"
              },
              {
                "$ref": "#/$defs/PropertyAggregationOperand"
              }
            ]
          },
          "minItems": 1,
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Use only the features these entries match.",
      "title": "Include"
    },
    "exclude": {
      "anyOf": [
        {
          "items": {
            "discriminator": {
              "mapping": {
                "allIngredientAmounts": "#/$defs/FamilySelector",
                "allIngredientProperties": "#/$defs/FamilySelector",
                "allLabelFractions": "#/$defs/FamilySelector",
                "allParameters": "#/$defs/FamilySelector",
                "ingredientAmount": "#/$defs/IngredientAmountOperand",
                "labelFraction": "#/$defs/LabelFractionOperand",
                "parameter": "#/$defs/ParameterOperand",
                "propertyAggregation": "#/$defs/PropertyAggregationOperand"
              },
              "propertyName": "type"
            },
            "oneOf": [
              {
                "$ref": "#/$defs/FamilySelector"
              },
              {
                "$ref": "#/$defs/IngredientAmountOperand"
              },
              {
                "$ref": "#/$defs/LabelFractionOperand"
              },
              {
                "$ref": "#/$defs/ParameterOperand"
              },
              {
                "$ref": "#/$defs/PropertyAggregationOperand"
              }
            ]
          },
          "minItems": 1,
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Use every feature except those these entries match.",
      "title": "Exclude"
    }
  },
  "title": "FeatureMask",
  "type": "object"
}

Config:

  • extra: forbid
  • revalidate_instances: subclass-instances

Fields:

Validators:

  • _exactly_one_list

model_config

model_config = ConfigDict(
    extra="forbid",
    revalidate_instances="subclass-instances",
)

include

include: list[MaskEntry] | None = None

Use only the features these entries match.

exclude

exclude: list[MaskEntry] | None = None

Use every feature except those these entries match.

OutputEntry

Bases: BaseAlbertModel

One predicted target's wiring, keyed by target ID in a config's outputs.

Fields the SDK does not model are kept as extra fields and sent back unchanged.

Show JSON schema:
{
  "$defs": {
    "AggregationBasis": {
      "description": "How an aggregation combines the member values of its scope.",
      "enum": [
        "mean",
        "sum"
      ],
      "title": "AggregationBasis",
      "type": "string"
    },
    "FamilySelector": {
      "additionalProperties": false,
      "description": "A mask entry matching every default feature of one family.",
      "properties": {
        "type": {
          "description": "Which family to match: all ingredient amounts, label fractions, ingredient\nproperty aggregations, or parameters.",
          "enum": [
            "allIngredientAmounts",
            "allLabelFractions",
            "allIngredientProperties",
            "allParameters"
          ],
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "FamilySelector",
      "type": "object"
    },
    "FeatureMask": {
      "additionalProperties": false,
      "description": "Which features an output uses: exactly one of ``include`` or ``exclude``.\n\nEach is a non-empty list of mask entries. An output with no mask uses all features.",
      "properties": {
        "include": {
          "anyOf": [
            {
              "items": {
                "discriminator": {
                  "mapping": {
                    "allIngredientAmounts": "#/$defs/FamilySelector",
                    "allIngredientProperties": "#/$defs/FamilySelector",
                    "allLabelFractions": "#/$defs/FamilySelector",
                    "allParameters": "#/$defs/FamilySelector",
                    "ingredientAmount": "#/$defs/IngredientAmountOperand",
                    "labelFraction": "#/$defs/LabelFractionOperand",
                    "parameter": "#/$defs/ParameterOperand",
                    "propertyAggregation": "#/$defs/PropertyAggregationOperand"
                  },
                  "propertyName": "type"
                },
                "oneOf": [
                  {
                    "$ref": "#/$defs/FamilySelector"
                  },
                  {
                    "$ref": "#/$defs/IngredientAmountOperand"
                  },
                  {
                    "$ref": "#/$defs/LabelFractionOperand"
                  },
                  {
                    "$ref": "#/$defs/ParameterOperand"
                  },
                  {
                    "$ref": "#/$defs/PropertyAggregationOperand"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Use only the features these entries match.",
          "title": "Include"
        },
        "exclude": {
          "anyOf": [
            {
              "items": {
                "discriminator": {
                  "mapping": {
                    "allIngredientAmounts": "#/$defs/FamilySelector",
                    "allIngredientProperties": "#/$defs/FamilySelector",
                    "allLabelFractions": "#/$defs/FamilySelector",
                    "allParameters": "#/$defs/FamilySelector",
                    "ingredientAmount": "#/$defs/IngredientAmountOperand",
                    "labelFraction": "#/$defs/LabelFractionOperand",
                    "parameter": "#/$defs/ParameterOperand",
                    "propertyAggregation": "#/$defs/PropertyAggregationOperand"
                  },
                  "propertyName": "type"
                },
                "oneOf": [
                  {
                    "$ref": "#/$defs/FamilySelector"
                  },
                  {
                    "$ref": "#/$defs/IngredientAmountOperand"
                  },
                  {
                    "$ref": "#/$defs/LabelFractionOperand"
                  },
                  {
                    "$ref": "#/$defs/ParameterOperand"
                  },
                  {
                    "$ref": "#/$defs/PropertyAggregationOperand"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Use every feature except those these entries match.",
          "title": "Exclude"
        }
      },
      "title": "FeatureMask",
      "type": "object"
    },
    "IngredientAmountOperand": {
      "additionalProperties": false,
      "description": "The amount of one ingredient in the formulation.",
      "properties": {
        "type": {
          "const": "ingredientAmount",
          "default": "ingredientAmount",
          "description": "Descriptor kind; fixed to ``ingredientAmount``.",
          "title": "Type",
          "type": "string"
        },
        "ingredient": {
          "description": "The inventory ID (format ``INV...``) of the ingredient.",
          "title": "Ingredient",
          "type": "string"
        }
      },
      "required": [
        "ingredient"
      ],
      "title": "IngredientAmountOperand",
      "type": "object"
    },
    "LabelFractionOperand": {
      "additionalProperties": false,
      "description": "The summed fraction of a label's member ingredients.",
      "properties": {
        "type": {
          "const": "labelFraction",
          "default": "labelFraction",
          "description": "Descriptor kind; fixed to ``labelFraction``.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "A platform tag (format ``TAG...``) or a local label key (``local:...``).",
          "title": "Label",
          "type": "string"
        }
      },
      "required": [
        "label"
      ],
      "title": "LabelFractionOperand",
      "type": "object"
    },
    "OutputDataType": {
      "description": "The kind of prediction task an output is.",
      "enum": [
        "numeric",
        "categorical"
      ],
      "title": "OutputDataType",
      "type": "string"
    },
    "OutputTransform": {
      "description": "A transform applied to a numeric output before modelling.",
      "enum": [
        "none",
        "log",
        "asinh",
        "yeoJohnson",
        "boxCox"
      ],
      "title": "OutputTransform",
      "type": "string"
    },
    "ParameterOperand": {
      "additionalProperties": false,
      "description": "The value of one parameter, addressed by its composite key.",
      "properties": {
        "type": {
          "const": "parameter",
          "default": "parameter",
          "description": "Descriptor kind; fixed to ``parameter``.",
          "title": "Type",
          "type": "string"
        },
        "parameter": {
          "description": "The composite parameter key, ``{DAT|PRG}#PRM[#UNI]``.",
          "title": "Parameter",
          "type": "string"
        }
      },
      "required": [
        "parameter"
      ],
      "title": "ParameterOperand",
      "type": "object"
    },
    "PropertyAggregationOperand": {
      "additionalProperties": false,
      "description": "An aggregation of one inventory property over a scope of ingredients.",
      "properties": {
        "type": {
          "const": "propertyAggregation",
          "default": "propertyAggregation",
          "description": "Descriptor kind; fixed to ``propertyAggregation``.",
          "title": "Type",
          "type": "string"
        },
        "basis": {
          "$ref": "#/$defs/AggregationBasis",
          "description": "How the member values combine: ``mean`` or ``sum``."
        },
        "property": {
          "description": "Name of the aggregated inventory property.",
          "title": "Property",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Restrict the aggregation to a label's members. Omit to scope to all ingredients.",
          "title": "Label"
        },
        "impute": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "How missing property values are handled: ``True`` fills the column mean, a number\nfills that constant, ``False`` fails on a sparse table. Omit to leave it unstated.",
          "title": "Impute"
        }
      },
      "required": [
        "basis",
        "property"
      ],
      "title": "PropertyAggregationOperand",
      "type": "object"
    }
  },
  "additionalProperties": true,
  "description": "One predicted target's wiring, keyed by target ID in a config's ``outputs``.\n\nFields the SDK does not model are kept as extra fields and sent back unchanged.",
  "properties": {
    "dataType": {
      "$ref": "#/$defs/OutputDataType",
      "description": "Whether the target is numeric or categorical."
    },
    "outputTransform": {
      "anyOf": [
        {
          "$ref": "#/$defs/OutputTransform"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Transform for a numeric output. A transform other than ``none`` on a categorical\noutput is rejected when applied (``invalid_settings``). Omit for no transform."
    },
    "features": {
      "anyOf": [
        {
          "$ref": "#/$defs/FeatureMask"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Which features this output uses. Omit to use all features."
    }
  },
  "required": [
    "dataType"
  ],
  "title": "OutputEntry",
  "type": "object"
}

Config:

  • extra: allow
  • revalidate_instances: subclass-instances

Fields:

model_config

model_config = ConfigDict(
    extra="allow", revalidate_instances="subclass-instances"
)

data_type

data_type: OutputDataType

Whether the target is numeric or categorical.

output_transform

output_transform: OutputTransform | None = None

Transform for a numeric output. A transform other than none on a categorical output is rejected when applied (invalid_settings). Omit for no transform.

features

features: FeatureMask | None = None

Which features this output uses. Omit to use all features.

FeatureMaskRead

Bases: FeatureMask

A feature mask as read from the service: a FeatureMask whose entries keep fields and kinds this version does not model.

Show JSON schema:
{
  "$defs": {
    "AggregationBasis": {
      "description": "How an aggregation combines the member values of its scope.",
      "enum": [
        "mean",
        "sum"
      ],
      "title": "AggregationBasis",
      "type": "string"
    },
    "UnknownDescriptor": {
      "additionalProperties": true,
      "description": "A descriptor or mask entry of a kind this SDK version does not know yet.\n\nOnly appears in records read from the service. An entry written by a newer service\nversion parses into this model instead of failing, and keeps every key it carried.\nRequests never accept it.",
      "properties": {
        "type": {
          "description": "The kind the service reported.",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "UnknownDescriptor",
      "type": "object"
    },
    "_ReadFamilySelector": {
      "additionalProperties": true,
      "description": "A family selector read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "description": "Which family to match: all ingredient amounts, label fractions, ingredient\nproperty aggregations, or parameters.",
          "enum": [
            "allIngredientAmounts",
            "allLabelFractions",
            "allIngredientProperties",
            "allParameters"
          ],
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "_ReadFamilySelector",
      "type": "object"
    },
    "_ReadIngredientAmountOperand": {
      "additionalProperties": true,
      "description": "An ingredient-amount descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "ingredientAmount",
          "default": "ingredientAmount",
          "description": "Descriptor kind; fixed to ``ingredientAmount``.",
          "title": "Type",
          "type": "string"
        },
        "ingredient": {
          "description": "The inventory ID (format ``INV...``) of the ingredient.",
          "title": "Ingredient",
          "type": "string"
        }
      },
      "required": [
        "ingredient"
      ],
      "title": "_ReadIngredientAmountOperand",
      "type": "object"
    },
    "_ReadLabelFractionOperand": {
      "additionalProperties": true,
      "description": "A label-fraction descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "labelFraction",
          "default": "labelFraction",
          "description": "Descriptor kind; fixed to ``labelFraction``.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "A platform tag (format ``TAG...``) or a local label key (``local:...``).",
          "title": "Label",
          "type": "string"
        }
      },
      "required": [
        "label"
      ],
      "title": "_ReadLabelFractionOperand",
      "type": "object"
    },
    "_ReadParameterOperand": {
      "additionalProperties": true,
      "description": "A parameter descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "parameter",
          "default": "parameter",
          "description": "Descriptor kind; fixed to ``parameter``.",
          "title": "Type",
          "type": "string"
        },
        "parameter": {
          "description": "The composite parameter key, ``{DAT|PRG}#PRM[#UNI]``.",
          "title": "Parameter",
          "type": "string"
        }
      },
      "required": [
        "parameter"
      ],
      "title": "_ReadParameterOperand",
      "type": "object"
    },
    "_ReadPropertyAggregationOperand": {
      "additionalProperties": true,
      "description": "A property-aggregation descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "propertyAggregation",
          "default": "propertyAggregation",
          "description": "Descriptor kind; fixed to ``propertyAggregation``.",
          "title": "Type",
          "type": "string"
        },
        "basis": {
          "$ref": "#/$defs/AggregationBasis",
          "description": "How the member values combine: ``mean`` or ``sum``."
        },
        "property": {
          "description": "Name of the aggregated inventory property.",
          "title": "Property",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Restrict the aggregation to a label's members. Omit to scope to all ingredients.",
          "title": "Label"
        },
        "impute": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "How missing property values are handled: ``True`` fills the column mean, a number\nfills that constant, ``False`` fails on a sparse table. Omit to leave it unstated.",
          "title": "Impute"
        }
      },
      "required": [
        "basis",
        "property"
      ],
      "title": "_ReadPropertyAggregationOperand",
      "type": "object"
    }
  },
  "additionalProperties": true,
  "description": "A feature mask as read from the service: a ``FeatureMask`` whose entries keep\nfields and kinds this version does not model.",
  "properties": {
    "include": {
      "anyOf": [
        {
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/_ReadFamilySelector"
              },
              {
                "discriminator": {
                  "mapping": {
                    "ingredientAmount": "#/$defs/_ReadIngredientAmountOperand",
                    "labelFraction": "#/$defs/_ReadLabelFractionOperand",
                    "parameter": "#/$defs/_ReadParameterOperand",
                    "propertyAggregation": "#/$defs/_ReadPropertyAggregationOperand"
                  },
                  "propertyName": "type"
                },
                "oneOf": [
                  {
                    "$ref": "#/$defs/_ReadIngredientAmountOperand"
                  },
                  {
                    "$ref": "#/$defs/_ReadLabelFractionOperand"
                  },
                  {
                    "$ref": "#/$defs/_ReadParameterOperand"
                  },
                  {
                    "$ref": "#/$defs/_ReadPropertyAggregationOperand"
                  }
                ]
              },
              {
                "$ref": "#/$defs/UnknownDescriptor"
              }
            ]
          },
          "minItems": 1,
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Use only the features these entries match.",
      "title": "Include"
    },
    "exclude": {
      "anyOf": [
        {
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/_ReadFamilySelector"
              },
              {
                "discriminator": {
                  "mapping": {
                    "ingredientAmount": "#/$defs/_ReadIngredientAmountOperand",
                    "labelFraction": "#/$defs/_ReadLabelFractionOperand",
                    "parameter": "#/$defs/_ReadParameterOperand",
                    "propertyAggregation": "#/$defs/_ReadPropertyAggregationOperand"
                  },
                  "propertyName": "type"
                },
                "oneOf": [
                  {
                    "$ref": "#/$defs/_ReadIngredientAmountOperand"
                  },
                  {
                    "$ref": "#/$defs/_ReadLabelFractionOperand"
                  },
                  {
                    "$ref": "#/$defs/_ReadParameterOperand"
                  },
                  {
                    "$ref": "#/$defs/_ReadPropertyAggregationOperand"
                  }
                ]
              },
              {
                "$ref": "#/$defs/UnknownDescriptor"
              }
            ]
          },
          "minItems": 1,
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Use every feature except those these entries match.",
      "title": "Exclude"
    }
  },
  "title": "FeatureMaskRead",
  "type": "object"
}

Config:

  • extra: allow

Fields:

Validators:

  • _exactly_one_list

model_config

model_config = ConfigDict(extra='allow')

include

include: list[MaskEntryRead] | None = None

Use only the features these entries match.

exclude

exclude: list[MaskEntryRead] | None = None

Use every feature except those these entries match.

OutputEntryRead

Bases: OutputEntry

An output's wiring as read from the service: an OutputEntry that keeps data types, transforms and mask entries this version does not model.

Show JSON schema:
{
  "$defs": {
    "AggregationBasis": {
      "description": "How an aggregation combines the member values of its scope.",
      "enum": [
        "mean",
        "sum"
      ],
      "title": "AggregationBasis",
      "type": "string"
    },
    "FeatureMaskRead": {
      "additionalProperties": true,
      "description": "A feature mask as read from the service: a ``FeatureMask`` whose entries keep\nfields and kinds this version does not model.",
      "properties": {
        "include": {
          "anyOf": [
            {
              "items": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/_ReadFamilySelector"
                  },
                  {
                    "discriminator": {
                      "mapping": {
                        "ingredientAmount": "#/$defs/_ReadIngredientAmountOperand",
                        "labelFraction": "#/$defs/_ReadLabelFractionOperand",
                        "parameter": "#/$defs/_ReadParameterOperand",
                        "propertyAggregation": "#/$defs/_ReadPropertyAggregationOperand"
                      },
                      "propertyName": "type"
                    },
                    "oneOf": [
                      {
                        "$ref": "#/$defs/_ReadIngredientAmountOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadLabelFractionOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadParameterOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadPropertyAggregationOperand"
                      }
                    ]
                  },
                  {
                    "$ref": "#/$defs/UnknownDescriptor"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Use only the features these entries match.",
          "title": "Include"
        },
        "exclude": {
          "anyOf": [
            {
              "items": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/_ReadFamilySelector"
                  },
                  {
                    "discriminator": {
                      "mapping": {
                        "ingredientAmount": "#/$defs/_ReadIngredientAmountOperand",
                        "labelFraction": "#/$defs/_ReadLabelFractionOperand",
                        "parameter": "#/$defs/_ReadParameterOperand",
                        "propertyAggregation": "#/$defs/_ReadPropertyAggregationOperand"
                      },
                      "propertyName": "type"
                    },
                    "oneOf": [
                      {
                        "$ref": "#/$defs/_ReadIngredientAmountOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadLabelFractionOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadParameterOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadPropertyAggregationOperand"
                      }
                    ]
                  },
                  {
                    "$ref": "#/$defs/UnknownDescriptor"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Use every feature except those these entries match.",
          "title": "Exclude"
        }
      },
      "title": "FeatureMaskRead",
      "type": "object"
    },
    "OutputDataType": {
      "description": "The kind of prediction task an output is.",
      "enum": [
        "numeric",
        "categorical"
      ],
      "title": "OutputDataType",
      "type": "string"
    },
    "OutputTransform": {
      "description": "A transform applied to a numeric output before modelling.",
      "enum": [
        "none",
        "log",
        "asinh",
        "yeoJohnson",
        "boxCox"
      ],
      "title": "OutputTransform",
      "type": "string"
    },
    "UnknownDescriptor": {
      "additionalProperties": true,
      "description": "A descriptor or mask entry of a kind this SDK version does not know yet.\n\nOnly appears in records read from the service. An entry written by a newer service\nversion parses into this model instead of failing, and keeps every key it carried.\nRequests never accept it.",
      "properties": {
        "type": {
          "description": "The kind the service reported.",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "UnknownDescriptor",
      "type": "object"
    },
    "_ReadFamilySelector": {
      "additionalProperties": true,
      "description": "A family selector read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "description": "Which family to match: all ingredient amounts, label fractions, ingredient\nproperty aggregations, or parameters.",
          "enum": [
            "allIngredientAmounts",
            "allLabelFractions",
            "allIngredientProperties",
            "allParameters"
          ],
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "_ReadFamilySelector",
      "type": "object"
    },
    "_ReadIngredientAmountOperand": {
      "additionalProperties": true,
      "description": "An ingredient-amount descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "ingredientAmount",
          "default": "ingredientAmount",
          "description": "Descriptor kind; fixed to ``ingredientAmount``.",
          "title": "Type",
          "type": "string"
        },
        "ingredient": {
          "description": "The inventory ID (format ``INV...``) of the ingredient.",
          "title": "Ingredient",
          "type": "string"
        }
      },
      "required": [
        "ingredient"
      ],
      "title": "_ReadIngredientAmountOperand",
      "type": "object"
    },
    "_ReadLabelFractionOperand": {
      "additionalProperties": true,
      "description": "A label-fraction descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "labelFraction",
          "default": "labelFraction",
          "description": "Descriptor kind; fixed to ``labelFraction``.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "A platform tag (format ``TAG...``) or a local label key (``local:...``).",
          "title": "Label",
          "type": "string"
        }
      },
      "required": [
        "label"
      ],
      "title": "_ReadLabelFractionOperand",
      "type": "object"
    },
    "_ReadParameterOperand": {
      "additionalProperties": true,
      "description": "A parameter descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "parameter",
          "default": "parameter",
          "description": "Descriptor kind; fixed to ``parameter``.",
          "title": "Type",
          "type": "string"
        },
        "parameter": {
          "description": "The composite parameter key, ``{DAT|PRG}#PRM[#UNI]``.",
          "title": "Parameter",
          "type": "string"
        }
      },
      "required": [
        "parameter"
      ],
      "title": "_ReadParameterOperand",
      "type": "object"
    },
    "_ReadPropertyAggregationOperand": {
      "additionalProperties": true,
      "description": "A property-aggregation descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "propertyAggregation",
          "default": "propertyAggregation",
          "description": "Descriptor kind; fixed to ``propertyAggregation``.",
          "title": "Type",
          "type": "string"
        },
        "basis": {
          "$ref": "#/$defs/AggregationBasis",
          "description": "How the member values combine: ``mean`` or ``sum``."
        },
        "property": {
          "description": "Name of the aggregated inventory property.",
          "title": "Property",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Restrict the aggregation to a label's members. Omit to scope to all ingredients.",
          "title": "Label"
        },
        "impute": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "How missing property values are handled: ``True`` fills the column mean, a number\nfills that constant, ``False`` fails on a sparse table. Omit to leave it unstated.",
          "title": "Impute"
        }
      },
      "required": [
        "basis",
        "property"
      ],
      "title": "_ReadPropertyAggregationOperand",
      "type": "object"
    }
  },
  "additionalProperties": true,
  "description": "An output's wiring as read from the service: an ``OutputEntry`` that keeps data types,\ntransforms and mask entries this version does not model.",
  "properties": {
    "dataType": {
      "anyOf": [
        {
          "$ref": "#/$defs/OutputDataType"
        },
        {
          "type": "string"
        }
      ],
      "description": "Whether the target is numeric or categorical. A type this version does not know yet\nis kept as a plain string.",
      "title": "Datatype"
    },
    "outputTransform": {
      "anyOf": [
        {
          "$ref": "#/$defs/OutputTransform"
        },
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Transform for a numeric output. A transform this version does not know yet is kept\nas a plain string.",
      "title": "Outputtransform"
    },
    "features": {
      "anyOf": [
        {
          "$ref": "#/$defs/FeatureMaskRead"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Which features this output uses. ``None`` when it uses all features."
    }
  },
  "required": [
    "dataType"
  ],
  "title": "OutputEntryRead",
  "type": "object"
}

Fields:

data_type

data_type: OutputDataType | str

Whether the target is numeric or categorical. A type this version does not know yet is kept as a plain string.

output_transform

output_transform: OutputTransform | str | None = None

Transform for a numeric output. A transform this version does not know yet is kept as a plain string.

features

features: FeatureMaskRead | None = None

Which features this output uses. None when it uses all features.

DesignModelConfig

Bases: _DesignRecord

A design model config: which targets to predict, how to transform them, and which default features each one uses.

A config is created as a draft, edited with builder operations, checked against a smart dataset, and published. A published config is frozen; editing one means forking it into a new draft.

Fields this version does not model are kept as extra fields when a config is read.

Show JSON schema:
{
  "$defs": {
    "AggregationBasis": {
      "description": "How an aggregation combines the member values of its scope.",
      "enum": [
        "mean",
        "sum"
      ],
      "title": "AggregationBasis",
      "type": "string"
    },
    "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"
    },
    "DesignModelConfigState": {
      "description": "Lifecycle of a design model config. Orthogonal to its soft-delete ``status``.",
      "enum": [
        "draft",
        "published"
      ],
      "title": "DesignModelConfigState",
      "type": "string"
    },
    "FeatureMaskRead": {
      "additionalProperties": true,
      "description": "A feature mask as read from the service: a ``FeatureMask`` whose entries keep\nfields and kinds this version does not model.",
      "properties": {
        "include": {
          "anyOf": [
            {
              "items": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/_ReadFamilySelector"
                  },
                  {
                    "discriminator": {
                      "mapping": {
                        "ingredientAmount": "#/$defs/_ReadIngredientAmountOperand",
                        "labelFraction": "#/$defs/_ReadLabelFractionOperand",
                        "parameter": "#/$defs/_ReadParameterOperand",
                        "propertyAggregation": "#/$defs/_ReadPropertyAggregationOperand"
                      },
                      "propertyName": "type"
                    },
                    "oneOf": [
                      {
                        "$ref": "#/$defs/_ReadIngredientAmountOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadLabelFractionOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadParameterOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadPropertyAggregationOperand"
                      }
                    ]
                  },
                  {
                    "$ref": "#/$defs/UnknownDescriptor"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Use only the features these entries match.",
          "title": "Include"
        },
        "exclude": {
          "anyOf": [
            {
              "items": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/_ReadFamilySelector"
                  },
                  {
                    "discriminator": {
                      "mapping": {
                        "ingredientAmount": "#/$defs/_ReadIngredientAmountOperand",
                        "labelFraction": "#/$defs/_ReadLabelFractionOperand",
                        "parameter": "#/$defs/_ReadParameterOperand",
                        "propertyAggregation": "#/$defs/_ReadPropertyAggregationOperand"
                      },
                      "propertyName": "type"
                    },
                    "oneOf": [
                      {
                        "$ref": "#/$defs/_ReadIngredientAmountOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadLabelFractionOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadParameterOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadPropertyAggregationOperand"
                      }
                    ]
                  },
                  {
                    "$ref": "#/$defs/UnknownDescriptor"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Use every feature except those these entries match.",
          "title": "Exclude"
        }
      },
      "title": "FeatureMaskRead",
      "type": "object"
    },
    "OutputDataType": {
      "description": "The kind of prediction task an output is.",
      "enum": [
        "numeric",
        "categorical"
      ],
      "title": "OutputDataType",
      "type": "string"
    },
    "OutputEntryRead": {
      "additionalProperties": true,
      "description": "An output's wiring as read from the service: an ``OutputEntry`` that keeps data types,\ntransforms and mask entries this version does not model.",
      "properties": {
        "dataType": {
          "anyOf": [
            {
              "$ref": "#/$defs/OutputDataType"
            },
            {
              "type": "string"
            }
          ],
          "description": "Whether the target is numeric or categorical. A type this version does not know yet\nis kept as a plain string.",
          "title": "Datatype"
        },
        "outputTransform": {
          "anyOf": [
            {
              "$ref": "#/$defs/OutputTransform"
            },
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Transform for a numeric output. A transform this version does not know yet is kept\nas a plain string.",
          "title": "Outputtransform"
        },
        "features": {
          "anyOf": [
            {
              "$ref": "#/$defs/FeatureMaskRead"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Which features this output uses. ``None`` when it uses all features."
        }
      },
      "required": [
        "dataType"
      ],
      "title": "OutputEntryRead",
      "type": "object"
    },
    "OutputTransform": {
      "description": "A transform applied to a numeric output before modelling.",
      "enum": [
        "none",
        "log",
        "asinh",
        "yeoJohnson",
        "boxCox"
      ],
      "title": "OutputTransform",
      "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"
    },
    "UnknownDescriptor": {
      "additionalProperties": true,
      "description": "A descriptor or mask entry of a kind this SDK version does not know yet.\n\nOnly appears in records read from the service. An entry written by a newer service\nversion parses into this model instead of failing, and keeps every key it carried.\nRequests never accept it.",
      "properties": {
        "type": {
          "description": "The kind the service reported.",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "UnknownDescriptor",
      "type": "object"
    },
    "_ReadFamilySelector": {
      "additionalProperties": true,
      "description": "A family selector read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "description": "Which family to match: all ingredient amounts, label fractions, ingredient\nproperty aggregations, or parameters.",
          "enum": [
            "allIngredientAmounts",
            "allLabelFractions",
            "allIngredientProperties",
            "allParameters"
          ],
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "_ReadFamilySelector",
      "type": "object"
    },
    "_ReadIngredientAmountOperand": {
      "additionalProperties": true,
      "description": "An ingredient-amount descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "ingredientAmount",
          "default": "ingredientAmount",
          "description": "Descriptor kind; fixed to ``ingredientAmount``.",
          "title": "Type",
          "type": "string"
        },
        "ingredient": {
          "description": "The inventory ID (format ``INV...``) of the ingredient.",
          "title": "Ingredient",
          "type": "string"
        }
      },
      "required": [
        "ingredient"
      ],
      "title": "_ReadIngredientAmountOperand",
      "type": "object"
    },
    "_ReadLabelFractionOperand": {
      "additionalProperties": true,
      "description": "A label-fraction descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "labelFraction",
          "default": "labelFraction",
          "description": "Descriptor kind; fixed to ``labelFraction``.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "A platform tag (format ``TAG...``) or a local label key (``local:...``).",
          "title": "Label",
          "type": "string"
        }
      },
      "required": [
        "label"
      ],
      "title": "_ReadLabelFractionOperand",
      "type": "object"
    },
    "_ReadParameterOperand": {
      "additionalProperties": true,
      "description": "A parameter descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "parameter",
          "default": "parameter",
          "description": "Descriptor kind; fixed to ``parameter``.",
          "title": "Type",
          "type": "string"
        },
        "parameter": {
          "description": "The composite parameter key, ``{DAT|PRG}#PRM[#UNI]``.",
          "title": "Parameter",
          "type": "string"
        }
      },
      "required": [
        "parameter"
      ],
      "title": "_ReadParameterOperand",
      "type": "object"
    },
    "_ReadPropertyAggregationOperand": {
      "additionalProperties": true,
      "description": "A property-aggregation descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "propertyAggregation",
          "default": "propertyAggregation",
          "description": "Descriptor kind; fixed to ``propertyAggregation``.",
          "title": "Type",
          "type": "string"
        },
        "basis": {
          "$ref": "#/$defs/AggregationBasis",
          "description": "How the member values combine: ``mean`` or ``sum``."
        },
        "property": {
          "description": "Name of the aggregated inventory property.",
          "title": "Property",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Restrict the aggregation to a label's members. Omit to scope to all ingredients.",
          "title": "Label"
        },
        "impute": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "How missing property values are handled: ``True`` fills the column mean, a number\nfills that constant, ``False`` fails on a sparse table. Omit to leave it unstated.",
          "title": "Impute"
        }
      },
      "required": [
        "basis",
        "property"
      ],
      "title": "_ReadPropertyAggregationOperand",
      "type": "object"
    }
  },
  "additionalProperties": true,
  "description": "A design model config: which targets to predict, how to transform them, and which\ndefault features each one uses.\n\nA config is created as a draft, edited with builder operations, checked against a\nsmart dataset, and published. A published config is frozen; editing one means\nforking it into a new draft.\n\nFields this version does not model are kept as extra fields when a config is read.",
  "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 config."
    },
    "updated": {
      "anyOf": [
        {
          "$ref": "#/$defs/AuditFields"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Audit fields for the last update of the config."
    },
    "id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The unique identifier of the config (format ``DMC...``).",
      "title": "Id"
    },
    "schemaVersion": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Pins the default feature-set definition. Not a concurrency counter.",
      "title": "Schemaversion"
    },
    "name": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Display name of the config.",
      "title": "Name"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Free-text description of the config's intent.",
      "title": "Description"
    },
    "parentId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The project (format ``PRO...``) that owns the config and controls access to it.",
      "title": "Parentid"
    },
    "state": {
      "anyOf": [
        {
          "$ref": "#/$defs/DesignModelConfigState"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Lifecycle state: ``draft`` (editable) or ``published`` (frozen)."
    },
    "publishedAt": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "When the config was published; ``None`` while it is a draft.",
      "title": "Publishedat"
    },
    "forkedFromId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The published config this draft was forked from, if any.",
      "title": "Forkedfromid"
    },
    "derivedFromId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The smart dataset (format ``SDT...``) that seeded the first draft, if any.\nProvenance only; the config does not track the dataset afterwards.",
      "title": "Derivedfromid"
    },
    "outputs": {
      "anyOf": [
        {
          "additionalProperties": {
            "$ref": "#/$defs/OutputEntryRead"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Output wiring, keyed by target ID (format ``TAR...``). Empty when absent.",
      "title": "Outputs"
    },
    "version": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optimistic-concurrency counter, checked on every write.",
      "title": "Version"
    }
  },
  "title": "DesignModelConfig",
  "type": "object"
}

Config:

  • extra: allow

Fields:

id

id: DesignModelConfigId | None = None

The unique identifier of the config (format DMC...).

schema_version

schema_version: int | None = None

Pins the default feature-set definition. Not a concurrency counter.

name

name: str | None = None

Display name of the config.

description

description: str | None = None

Free-text description of the config's intent.

parent_id

parent_id: ProjectId | None = None

The project (format PRO...) that owns the config and controls access to it.

state

state: DesignModelConfigState | None = None

Lifecycle state: draft (editable) or published (frozen).

published_at

published_at: datetime | None = None

When the config was published; None while it is a draft.

forked_from_id

forked_from_id: DesignModelConfigId | None = None

The published config this draft was forked from, if any.

derived_from_id

derived_from_id: SmartDatasetId | None = None

The smart dataset (format SDT...) that seeded the first draft, if any. Provenance only; the config does not track the dataset afterwards.

outputs

outputs: dict[TargetId, OutputEntryRead] | None = None

Output wiring, keyed by target ID (format TAR...). Empty when absent.

version

version: int | None = None

Optimistic-concurrency counter, checked on every write.

created

created: AuditFields | None = None

Audit fields for the creation of the config.

updated

updated: AuditFields | None = None

Audit fields for the last update of the config.

DesignModelConfigViolation

Bases: BaseAlbertModel

A single design model config finding.

Show JSON schema:
{
  "$defs": {
    "DesignModelConfigViolationCode": {
      "description": "Machine-readable category of a design model config finding.",
      "enum": [
        "target_not_in_dataset",
        "transform_requires_positive_target",
        "inert_mask_entry",
        "feature_dropped_by_overlap",
        "estimator_downgraded",
        "unknown_reference",
        "dimension_not_modelled",
        "invalid_settings",
        "invalid_constraint",
        "variable_not_derived",
        "insufficient_training_data",
        "duplicate_extra",
        "conflicting_label_definition"
      ],
      "title": "DesignModelConfigViolationCode",
      "type": "string"
    }
  },
  "description": "A single design model config finding.",
  "properties": {
    "code": {
      "anyOf": [
        {
          "$ref": "#/$defs/DesignModelConfigViolationCode"
        },
        {
          "type": "string"
        }
      ],
      "description": "Machine-readable category of the finding. A code this version does not know yet is\nkept as a plain string.",
      "title": "Code"
    },
    "message": {
      "description": "Human-readable explanation of the finding.",
      "title": "Message",
      "type": "string"
    },
    "targetId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The target the finding is scoped to, when applicable.",
      "title": "Targetid"
    },
    "components": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Component paths (``<collection>/<key>``) the finding is attributed to.",
      "title": "Components"
    },
    "opIndex": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Position, in the ``operations`` passed to ``apply``, of the operation behind the finding.\n\n``None`` when the finding is not tied to an operation.",
      "title": "Opindex"
    }
  },
  "required": [
    "code",
    "message"
  ],
  "title": "DesignModelConfigViolation",
  "type": "object"
}

Fields:

code

Machine-readable category of the finding. A code this version does not know yet is kept as a plain string.

message

message: str

Human-readable explanation of the finding.

target_id

target_id: str | None = None

The target the finding is scoped to, when applicable.

components

components: list[str] | None = None

Component paths (<collection>/<key>) the finding is attributed to.

op_index

op_index: int | None = None

Position, in the operations passed to apply, of the operation behind the finding.

None when the finding is not tied to an operation.

DesignModelConfigCreated

Bases: DesignModelConfig

A newly created draft config, with any findings from seeding it.

Show JSON schema:
{
  "$defs": {
    "AggregationBasis": {
      "description": "How an aggregation combines the member values of its scope.",
      "enum": [
        "mean",
        "sum"
      ],
      "title": "AggregationBasis",
      "type": "string"
    },
    "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"
    },
    "DesignModelConfigState": {
      "description": "Lifecycle of a design model config. Orthogonal to its soft-delete ``status``.",
      "enum": [
        "draft",
        "published"
      ],
      "title": "DesignModelConfigState",
      "type": "string"
    },
    "DesignModelConfigViolation": {
      "description": "A single design model config finding.",
      "properties": {
        "code": {
          "anyOf": [
            {
              "$ref": "#/$defs/DesignModelConfigViolationCode"
            },
            {
              "type": "string"
            }
          ],
          "description": "Machine-readable category of the finding. A code this version does not know yet is\nkept as a plain string.",
          "title": "Code"
        },
        "message": {
          "description": "Human-readable explanation of the finding.",
          "title": "Message",
          "type": "string"
        },
        "targetId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The target the finding is scoped to, when applicable.",
          "title": "Targetid"
        },
        "components": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Component paths (``<collection>/<key>``) the finding is attributed to.",
          "title": "Components"
        },
        "opIndex": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Position, in the ``operations`` passed to ``apply``, of the operation behind the finding.\n\n``None`` when the finding is not tied to an operation.",
          "title": "Opindex"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "title": "DesignModelConfigViolation",
      "type": "object"
    },
    "DesignModelConfigViolationCode": {
      "description": "Machine-readable category of a design model config finding.",
      "enum": [
        "target_not_in_dataset",
        "transform_requires_positive_target",
        "inert_mask_entry",
        "feature_dropped_by_overlap",
        "estimator_downgraded",
        "unknown_reference",
        "dimension_not_modelled",
        "invalid_settings",
        "invalid_constraint",
        "variable_not_derived",
        "insufficient_training_data",
        "duplicate_extra",
        "conflicting_label_definition"
      ],
      "title": "DesignModelConfigViolationCode",
      "type": "string"
    },
    "FeatureMaskRead": {
      "additionalProperties": true,
      "description": "A feature mask as read from the service: a ``FeatureMask`` whose entries keep\nfields and kinds this version does not model.",
      "properties": {
        "include": {
          "anyOf": [
            {
              "items": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/_ReadFamilySelector"
                  },
                  {
                    "discriminator": {
                      "mapping": {
                        "ingredientAmount": "#/$defs/_ReadIngredientAmountOperand",
                        "labelFraction": "#/$defs/_ReadLabelFractionOperand",
                        "parameter": "#/$defs/_ReadParameterOperand",
                        "propertyAggregation": "#/$defs/_ReadPropertyAggregationOperand"
                      },
                      "propertyName": "type"
                    },
                    "oneOf": [
                      {
                        "$ref": "#/$defs/_ReadIngredientAmountOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadLabelFractionOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadParameterOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadPropertyAggregationOperand"
                      }
                    ]
                  },
                  {
                    "$ref": "#/$defs/UnknownDescriptor"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Use only the features these entries match.",
          "title": "Include"
        },
        "exclude": {
          "anyOf": [
            {
              "items": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/_ReadFamilySelector"
                  },
                  {
                    "discriminator": {
                      "mapping": {
                        "ingredientAmount": "#/$defs/_ReadIngredientAmountOperand",
                        "labelFraction": "#/$defs/_ReadLabelFractionOperand",
                        "parameter": "#/$defs/_ReadParameterOperand",
                        "propertyAggregation": "#/$defs/_ReadPropertyAggregationOperand"
                      },
                      "propertyName": "type"
                    },
                    "oneOf": [
                      {
                        "$ref": "#/$defs/_ReadIngredientAmountOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadLabelFractionOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadParameterOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadPropertyAggregationOperand"
                      }
                    ]
                  },
                  {
                    "$ref": "#/$defs/UnknownDescriptor"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Use every feature except those these entries match.",
          "title": "Exclude"
        }
      },
      "title": "FeatureMaskRead",
      "type": "object"
    },
    "OutputDataType": {
      "description": "The kind of prediction task an output is.",
      "enum": [
        "numeric",
        "categorical"
      ],
      "title": "OutputDataType",
      "type": "string"
    },
    "OutputEntryRead": {
      "additionalProperties": true,
      "description": "An output's wiring as read from the service: an ``OutputEntry`` that keeps data types,\ntransforms and mask entries this version does not model.",
      "properties": {
        "dataType": {
          "anyOf": [
            {
              "$ref": "#/$defs/OutputDataType"
            },
            {
              "type": "string"
            }
          ],
          "description": "Whether the target is numeric or categorical. A type this version does not know yet\nis kept as a plain string.",
          "title": "Datatype"
        },
        "outputTransform": {
          "anyOf": [
            {
              "$ref": "#/$defs/OutputTransform"
            },
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Transform for a numeric output. A transform this version does not know yet is kept\nas a plain string.",
          "title": "Outputtransform"
        },
        "features": {
          "anyOf": [
            {
              "$ref": "#/$defs/FeatureMaskRead"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Which features this output uses. ``None`` when it uses all features."
        }
      },
      "required": [
        "dataType"
      ],
      "title": "OutputEntryRead",
      "type": "object"
    },
    "OutputTransform": {
      "description": "A transform applied to a numeric output before modelling.",
      "enum": [
        "none",
        "log",
        "asinh",
        "yeoJohnson",
        "boxCox"
      ],
      "title": "OutputTransform",
      "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"
    },
    "UnknownDescriptor": {
      "additionalProperties": true,
      "description": "A descriptor or mask entry of a kind this SDK version does not know yet.\n\nOnly appears in records read from the service. An entry written by a newer service\nversion parses into this model instead of failing, and keeps every key it carried.\nRequests never accept it.",
      "properties": {
        "type": {
          "description": "The kind the service reported.",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "UnknownDescriptor",
      "type": "object"
    },
    "_ReadFamilySelector": {
      "additionalProperties": true,
      "description": "A family selector read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "description": "Which family to match: all ingredient amounts, label fractions, ingredient\nproperty aggregations, or parameters.",
          "enum": [
            "allIngredientAmounts",
            "allLabelFractions",
            "allIngredientProperties",
            "allParameters"
          ],
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "_ReadFamilySelector",
      "type": "object"
    },
    "_ReadIngredientAmountOperand": {
      "additionalProperties": true,
      "description": "An ingredient-amount descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "ingredientAmount",
          "default": "ingredientAmount",
          "description": "Descriptor kind; fixed to ``ingredientAmount``.",
          "title": "Type",
          "type": "string"
        },
        "ingredient": {
          "description": "The inventory ID (format ``INV...``) of the ingredient.",
          "title": "Ingredient",
          "type": "string"
        }
      },
      "required": [
        "ingredient"
      ],
      "title": "_ReadIngredientAmountOperand",
      "type": "object"
    },
    "_ReadLabelFractionOperand": {
      "additionalProperties": true,
      "description": "A label-fraction descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "labelFraction",
          "default": "labelFraction",
          "description": "Descriptor kind; fixed to ``labelFraction``.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "A platform tag (format ``TAG...``) or a local label key (``local:...``).",
          "title": "Label",
          "type": "string"
        }
      },
      "required": [
        "label"
      ],
      "title": "_ReadLabelFractionOperand",
      "type": "object"
    },
    "_ReadParameterOperand": {
      "additionalProperties": true,
      "description": "A parameter descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "parameter",
          "default": "parameter",
          "description": "Descriptor kind; fixed to ``parameter``.",
          "title": "Type",
          "type": "string"
        },
        "parameter": {
          "description": "The composite parameter key, ``{DAT|PRG}#PRM[#UNI]``.",
          "title": "Parameter",
          "type": "string"
        }
      },
      "required": [
        "parameter"
      ],
      "title": "_ReadParameterOperand",
      "type": "object"
    },
    "_ReadPropertyAggregationOperand": {
      "additionalProperties": true,
      "description": "A property-aggregation descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "propertyAggregation",
          "default": "propertyAggregation",
          "description": "Descriptor kind; fixed to ``propertyAggregation``.",
          "title": "Type",
          "type": "string"
        },
        "basis": {
          "$ref": "#/$defs/AggregationBasis",
          "description": "How the member values combine: ``mean`` or ``sum``."
        },
        "property": {
          "description": "Name of the aggregated inventory property.",
          "title": "Property",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Restrict the aggregation to a label's members. Omit to scope to all ingredients.",
          "title": "Label"
        },
        "impute": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "How missing property values are handled: ``True`` fills the column mean, a number\nfills that constant, ``False`` fails on a sparse table. Omit to leave it unstated.",
          "title": "Impute"
        }
      },
      "required": [
        "basis",
        "property"
      ],
      "title": "_ReadPropertyAggregationOperand",
      "type": "object"
    }
  },
  "additionalProperties": true,
  "description": "A newly created draft config, with any findings from seeding it.",
  "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 config."
    },
    "updated": {
      "anyOf": [
        {
          "$ref": "#/$defs/AuditFields"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Audit fields for the last update of the config."
    },
    "id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The unique identifier of the config (format ``DMC...``).",
      "title": "Id"
    },
    "schemaVersion": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Pins the default feature-set definition. Not a concurrency counter.",
      "title": "Schemaversion"
    },
    "name": {
      "anyOf": [
        {
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Display name of the config.",
      "title": "Name"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Free-text description of the config's intent.",
      "title": "Description"
    },
    "parentId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The project (format ``PRO...``) that owns the config and controls access to it.",
      "title": "Parentid"
    },
    "state": {
      "anyOf": [
        {
          "$ref": "#/$defs/DesignModelConfigState"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Lifecycle state: ``draft`` (editable) or ``published`` (frozen)."
    },
    "publishedAt": {
      "anyOf": [
        {
          "format": "date-time",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "When the config was published; ``None`` while it is a draft.",
      "title": "Publishedat"
    },
    "forkedFromId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The published config this draft was forked from, if any.",
      "title": "Forkedfromid"
    },
    "derivedFromId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The smart dataset (format ``SDT...``) that seeded the first draft, if any.\nProvenance only; the config does not track the dataset afterwards.",
      "title": "Derivedfromid"
    },
    "outputs": {
      "anyOf": [
        {
          "additionalProperties": {
            "$ref": "#/$defs/OutputEntryRead"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Output wiring, keyed by target ID (format ``TAR...``). Empty when absent.",
      "title": "Outputs"
    },
    "version": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Optimistic-concurrency counter, checked on every write.",
      "title": "Version"
    },
    "warnings": {
      "description": "Non-blocking findings. Always present; empty when there are none.",
      "items": {
        "$ref": "#/$defs/DesignModelConfigViolation"
      },
      "title": "Warnings",
      "type": "array"
    }
  },
  "title": "DesignModelConfigCreated",
  "type": "object"
}

Fields:

warnings

Non-blocking findings. Always present; empty when there are none.

DesignModelConfigValidationResponse

Bases: BaseAlbertModel

The result of checking a design model config.

Show JSON schema:
{
  "$defs": {
    "DesignModelConfigViolation": {
      "description": "A single design model config finding.",
      "properties": {
        "code": {
          "anyOf": [
            {
              "$ref": "#/$defs/DesignModelConfigViolationCode"
            },
            {
              "type": "string"
            }
          ],
          "description": "Machine-readable category of the finding. A code this version does not know yet is\nkept as a plain string.",
          "title": "Code"
        },
        "message": {
          "description": "Human-readable explanation of the finding.",
          "title": "Message",
          "type": "string"
        },
        "targetId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The target the finding is scoped to, when applicable.",
          "title": "Targetid"
        },
        "components": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Component paths (``<collection>/<key>``) the finding is attributed to.",
          "title": "Components"
        },
        "opIndex": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Position, in the ``operations`` passed to ``apply``, of the operation behind the finding.\n\n``None`` when the finding is not tied to an operation.",
          "title": "Opindex"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "title": "DesignModelConfigViolation",
      "type": "object"
    },
    "DesignModelConfigViolationCode": {
      "description": "Machine-readable category of a design model config finding.",
      "enum": [
        "target_not_in_dataset",
        "transform_requires_positive_target",
        "inert_mask_entry",
        "feature_dropped_by_overlap",
        "estimator_downgraded",
        "unknown_reference",
        "dimension_not_modelled",
        "invalid_settings",
        "invalid_constraint",
        "variable_not_derived",
        "insufficient_training_data",
        "duplicate_extra",
        "conflicting_label_definition"
      ],
      "title": "DesignModelConfigViolationCode",
      "type": "string"
    }
  },
  "description": "The result of checking a design model config.",
  "properties": {
    "valid": {
      "description": "Whether the config passed. ``False`` is a normal result, not an error.",
      "title": "Valid",
      "type": "boolean"
    },
    "violations": {
      "description": "Blocking and non-blocking findings. Empty when the config is valid.",
      "items": {
        "$ref": "#/$defs/DesignModelConfigViolation"
      },
      "title": "Violations",
      "type": "array"
    }
  },
  "required": [
    "valid"
  ],
  "title": "DesignModelConfigValidationResponse",
  "type": "object"
}

Fields:

valid

valid: bool

Whether the config passed. False is a normal result, not an error.

violations

Blocking and non-blocking findings. Empty when the config is valid.

ResolvedFeature

Bases: BaseAlbertModel

One concrete feature of a resolved feature set.

Show JSON schema:
{
  "$defs": {
    "AggregationBasis": {
      "description": "How an aggregation combines the member values of its scope.",
      "enum": [
        "mean",
        "sum"
      ],
      "title": "AggregationBasis",
      "type": "string"
    },
    "FeatureFamily": {
      "description": "The default feature families a resolved feature belongs to.",
      "enum": [
        "ingredient_amount",
        "label_fraction",
        "ingredient_property",
        "parameter"
      ],
      "title": "FeatureFamily",
      "type": "string"
    },
    "UnknownDescriptor": {
      "additionalProperties": true,
      "description": "A descriptor or mask entry of a kind this SDK version does not know yet.\n\nOnly appears in records read from the service. An entry written by a newer service\nversion parses into this model instead of failing, and keeps every key it carried.\nRequests never accept it.",
      "properties": {
        "type": {
          "description": "The kind the service reported.",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "UnknownDescriptor",
      "type": "object"
    },
    "_ReadIngredientAmountOperand": {
      "additionalProperties": true,
      "description": "An ingredient-amount descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "ingredientAmount",
          "default": "ingredientAmount",
          "description": "Descriptor kind; fixed to ``ingredientAmount``.",
          "title": "Type",
          "type": "string"
        },
        "ingredient": {
          "description": "The inventory ID (format ``INV...``) of the ingredient.",
          "title": "Ingredient",
          "type": "string"
        }
      },
      "required": [
        "ingredient"
      ],
      "title": "_ReadIngredientAmountOperand",
      "type": "object"
    },
    "_ReadLabelFractionOperand": {
      "additionalProperties": true,
      "description": "A label-fraction descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "labelFraction",
          "default": "labelFraction",
          "description": "Descriptor kind; fixed to ``labelFraction``.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "A platform tag (format ``TAG...``) or a local label key (``local:...``).",
          "title": "Label",
          "type": "string"
        }
      },
      "required": [
        "label"
      ],
      "title": "_ReadLabelFractionOperand",
      "type": "object"
    },
    "_ReadParameterOperand": {
      "additionalProperties": true,
      "description": "A parameter descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "parameter",
          "default": "parameter",
          "description": "Descriptor kind; fixed to ``parameter``.",
          "title": "Type",
          "type": "string"
        },
        "parameter": {
          "description": "The composite parameter key, ``{DAT|PRG}#PRM[#UNI]``.",
          "title": "Parameter",
          "type": "string"
        }
      },
      "required": [
        "parameter"
      ],
      "title": "_ReadParameterOperand",
      "type": "object"
    },
    "_ReadPropertyAggregationOperand": {
      "additionalProperties": true,
      "description": "A property-aggregation descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "propertyAggregation",
          "default": "propertyAggregation",
          "description": "Descriptor kind; fixed to ``propertyAggregation``.",
          "title": "Type",
          "type": "string"
        },
        "basis": {
          "$ref": "#/$defs/AggregationBasis",
          "description": "How the member values combine: ``mean`` or ``sum``."
        },
        "property": {
          "description": "Name of the aggregated inventory property.",
          "title": "Property",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Restrict the aggregation to a label's members. Omit to scope to all ingredients.",
          "title": "Label"
        },
        "impute": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "How missing property values are handled: ``True`` fills the column mean, a number\nfills that constant, ``False`` fails on a sparse table. Omit to leave it unstated.",
          "title": "Impute"
        }
      },
      "required": [
        "basis",
        "property"
      ],
      "title": "_ReadPropertyAggregationOperand",
      "type": "object"
    }
  },
  "additionalProperties": true,
  "description": "One concrete feature of a resolved feature set.",
  "properties": {
    "key": {
      "description": "Stable feature key, the feature's identity across resolutions. Keys have the form\n``ingredient/<INV id>``, ``label/<tag or local key>``,\n``property/<mean|sum>/<name>[/<label>]``, ``parameter/<composite key>`` or\n``parameter/<composite key>/<category>``. Treat a key as opaque.",
      "title": "Key",
      "type": "string"
    },
    "family": {
      "anyOf": [
        {
          "$ref": "#/$defs/FeatureFamily"
        },
        {
          "type": "string"
        }
      ],
      "description": "The default family the feature belongs to. A family this version does not know yet\nis kept as a plain string.",
      "title": "Family"
    },
    "descriptor": {
      "anyOf": [
        {
          "discriminator": {
            "mapping": {
              "ingredientAmount": "#/$defs/_ReadIngredientAmountOperand",
              "labelFraction": "#/$defs/_ReadLabelFractionOperand",
              "parameter": "#/$defs/_ReadParameterOperand",
              "propertyAggregation": "#/$defs/_ReadPropertyAggregationOperand"
            },
            "propertyName": "type"
          },
          "oneOf": [
            {
              "$ref": "#/$defs/_ReadIngredientAmountOperand"
            },
            {
              "$ref": "#/$defs/_ReadLabelFractionOperand"
            },
            {
              "$ref": "#/$defs/_ReadParameterOperand"
            },
            {
              "$ref": "#/$defs/_ReadPropertyAggregationOperand"
            }
          ]
        },
        {
          "$ref": "#/$defs/UnknownDescriptor"
        }
      ],
      "description": "The quantity the feature computes. A kind this version does not know yet parses to\n``UnknownDescriptor``.",
      "title": "Descriptor"
    },
    "value": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The category a one-hot parameter feature encodes; ``None`` otherwise.",
      "title": "Value"
    },
    "origin": {
      "default": "default",
      "description": "``default`` for the always-computed default set; otherwise the key of the extra\nfeature that authored it.",
      "title": "Origin",
      "type": "string"
    }
  },
  "required": [
    "key",
    "family",
    "descriptor"
  ],
  "title": "ResolvedFeature",
  "type": "object"
}

Config:

  • extra: allow

Fields:

model_config

model_config = ConfigDict(extra='allow')

key

key: str

Stable feature key, the feature's identity across resolutions. Keys have the form ingredient/<INV id>, label/<tag or local key>, property/<mean|sum>/<name>[/<label>], parameter/<composite key> or parameter/<composite key>/<category>. Treat a key as opaque.

family

family: FeatureFamily | str

The default family the feature belongs to. A family this version does not know yet is kept as a plain string.

descriptor

descriptor: QuantityOperandRead

The quantity the feature computes. A kind this version does not know yet parses to UnknownDescriptor.

value

value: str | None = None

The category a one-hot parameter feature encodes; None otherwise.

origin

origin: str = 'default'

default for the always-computed default set; otherwise the key of the extra feature that authored it.

DesignModelConfigResolvedFeatures

Bases: BaseAlbertModel

The features a config resolves to against a smart dataset, and how outputs use them.

Show JSON schema:
{
  "$defs": {
    "AggregationBasis": {
      "description": "How an aggregation combines the member values of its scope.",
      "enum": [
        "mean",
        "sum"
      ],
      "title": "AggregationBasis",
      "type": "string"
    },
    "DesignModelConfigViolation": {
      "description": "A single design model config finding.",
      "properties": {
        "code": {
          "anyOf": [
            {
              "$ref": "#/$defs/DesignModelConfigViolationCode"
            },
            {
              "type": "string"
            }
          ],
          "description": "Machine-readable category of the finding. A code this version does not know yet is\nkept as a plain string.",
          "title": "Code"
        },
        "message": {
          "description": "Human-readable explanation of the finding.",
          "title": "Message",
          "type": "string"
        },
        "targetId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The target the finding is scoped to, when applicable.",
          "title": "Targetid"
        },
        "components": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Component paths (``<collection>/<key>``) the finding is attributed to.",
          "title": "Components"
        },
        "opIndex": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Position, in the ``operations`` passed to ``apply``, of the operation behind the finding.\n\n``None`` when the finding is not tied to an operation.",
          "title": "Opindex"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "title": "DesignModelConfigViolation",
      "type": "object"
    },
    "DesignModelConfigViolationCode": {
      "description": "Machine-readable category of a design model config finding.",
      "enum": [
        "target_not_in_dataset",
        "transform_requires_positive_target",
        "inert_mask_entry",
        "feature_dropped_by_overlap",
        "estimator_downgraded",
        "unknown_reference",
        "dimension_not_modelled",
        "invalid_settings",
        "invalid_constraint",
        "variable_not_derived",
        "insufficient_training_data",
        "duplicate_extra",
        "conflicting_label_definition"
      ],
      "title": "DesignModelConfigViolationCode",
      "type": "string"
    },
    "FeatureFamily": {
      "description": "The default feature families a resolved feature belongs to.",
      "enum": [
        "ingredient_amount",
        "label_fraction",
        "ingredient_property",
        "parameter"
      ],
      "title": "FeatureFamily",
      "type": "string"
    },
    "ResolvedFeature": {
      "additionalProperties": true,
      "description": "One concrete feature of a resolved feature set.",
      "properties": {
        "key": {
          "description": "Stable feature key, the feature's identity across resolutions. Keys have the form\n``ingredient/<INV id>``, ``label/<tag or local key>``,\n``property/<mean|sum>/<name>[/<label>]``, ``parameter/<composite key>`` or\n``parameter/<composite key>/<category>``. Treat a key as opaque.",
          "title": "Key",
          "type": "string"
        },
        "family": {
          "anyOf": [
            {
              "$ref": "#/$defs/FeatureFamily"
            },
            {
              "type": "string"
            }
          ],
          "description": "The default family the feature belongs to. A family this version does not know yet\nis kept as a plain string.",
          "title": "Family"
        },
        "descriptor": {
          "anyOf": [
            {
              "discriminator": {
                "mapping": {
                  "ingredientAmount": "#/$defs/_ReadIngredientAmountOperand",
                  "labelFraction": "#/$defs/_ReadLabelFractionOperand",
                  "parameter": "#/$defs/_ReadParameterOperand",
                  "propertyAggregation": "#/$defs/_ReadPropertyAggregationOperand"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/$defs/_ReadIngredientAmountOperand"
                },
                {
                  "$ref": "#/$defs/_ReadLabelFractionOperand"
                },
                {
                  "$ref": "#/$defs/_ReadParameterOperand"
                },
                {
                  "$ref": "#/$defs/_ReadPropertyAggregationOperand"
                }
              ]
            },
            {
              "$ref": "#/$defs/UnknownDescriptor"
            }
          ],
          "description": "The quantity the feature computes. A kind this version does not know yet parses to\n``UnknownDescriptor``.",
          "title": "Descriptor"
        },
        "value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The category a one-hot parameter feature encodes; ``None`` otherwise.",
          "title": "Value"
        },
        "origin": {
          "default": "default",
          "description": "``default`` for the always-computed default set; otherwise the key of the extra\nfeature that authored it.",
          "title": "Origin",
          "type": "string"
        }
      },
      "required": [
        "key",
        "family",
        "descriptor"
      ],
      "title": "ResolvedFeature",
      "type": "object"
    },
    "UnknownDescriptor": {
      "additionalProperties": true,
      "description": "A descriptor or mask entry of a kind this SDK version does not know yet.\n\nOnly appears in records read from the service. An entry written by a newer service\nversion parses into this model instead of failing, and keeps every key it carried.\nRequests never accept it.",
      "properties": {
        "type": {
          "description": "The kind the service reported.",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "UnknownDescriptor",
      "type": "object"
    },
    "_ReadIngredientAmountOperand": {
      "additionalProperties": true,
      "description": "An ingredient-amount descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "ingredientAmount",
          "default": "ingredientAmount",
          "description": "Descriptor kind; fixed to ``ingredientAmount``.",
          "title": "Type",
          "type": "string"
        },
        "ingredient": {
          "description": "The inventory ID (format ``INV...``) of the ingredient.",
          "title": "Ingredient",
          "type": "string"
        }
      },
      "required": [
        "ingredient"
      ],
      "title": "_ReadIngredientAmountOperand",
      "type": "object"
    },
    "_ReadLabelFractionOperand": {
      "additionalProperties": true,
      "description": "A label-fraction descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "labelFraction",
          "default": "labelFraction",
          "description": "Descriptor kind; fixed to ``labelFraction``.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "A platform tag (format ``TAG...``) or a local label key (``local:...``).",
          "title": "Label",
          "type": "string"
        }
      },
      "required": [
        "label"
      ],
      "title": "_ReadLabelFractionOperand",
      "type": "object"
    },
    "_ReadParameterOperand": {
      "additionalProperties": true,
      "description": "A parameter descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "parameter",
          "default": "parameter",
          "description": "Descriptor kind; fixed to ``parameter``.",
          "title": "Type",
          "type": "string"
        },
        "parameter": {
          "description": "The composite parameter key, ``{DAT|PRG}#PRM[#UNI]``.",
          "title": "Parameter",
          "type": "string"
        }
      },
      "required": [
        "parameter"
      ],
      "title": "_ReadParameterOperand",
      "type": "object"
    },
    "_ReadPropertyAggregationOperand": {
      "additionalProperties": true,
      "description": "A property-aggregation descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "propertyAggregation",
          "default": "propertyAggregation",
          "description": "Descriptor kind; fixed to ``propertyAggregation``.",
          "title": "Type",
          "type": "string"
        },
        "basis": {
          "$ref": "#/$defs/AggregationBasis",
          "description": "How the member values combine: ``mean`` or ``sum``."
        },
        "property": {
          "description": "Name of the aggregated inventory property.",
          "title": "Property",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Restrict the aggregation to a label's members. Omit to scope to all ingredients.",
          "title": "Label"
        },
        "impute": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "How missing property values are handled: ``True`` fills the column mean, a number\nfills that constant, ``False`` fails on a sparse table. Omit to leave it unstated.",
          "title": "Impute"
        }
      },
      "required": [
        "basis",
        "property"
      ],
      "title": "_ReadPropertyAggregationOperand",
      "type": "object"
    }
  },
  "additionalProperties": true,
  "description": "The features a config resolves to against a smart dataset, and how outputs use them.",
  "properties": {
    "features": {
      "description": "The full resolved set in a deterministic order, before any output mask.",
      "items": {
        "$ref": "#/$defs/ResolvedFeature"
      },
      "title": "Features",
      "type": "array"
    },
    "outputs": {
      "additionalProperties": {
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "description": "Target ID to the keys of the features its mask routes, in feature order.",
      "title": "Outputs",
      "type": "object"
    },
    "warnings": {
      "description": "Non-blocking findings. Empty when there are none.",
      "items": {
        "$ref": "#/$defs/DesignModelConfigViolation"
      },
      "title": "Warnings",
      "type": "array"
    }
  },
  "title": "DesignModelConfigResolvedFeatures",
  "type": "object"
}

Config:

  • extra: allow

Fields:

model_config

model_config = ConfigDict(extra='allow')

features

features: list[ResolvedFeature]

The full resolved set in a deterministic order, before any output mask.

outputs

outputs: dict[str, list[str]]

Target ID to the keys of the features its mask routes, in feature order.

warnings

Non-blocking findings. Empty when there are none.

FeaturePreviewRowIdentifiers

Bases: BaseAlbertModel

The Albert records a featurized row was measured on.

Show JSON schema:
{
  "additionalProperties": true,
  "description": "The Albert records a featurized row was measured on.",
  "properties": {
    "type": {
      "const": "albert_measurement",
      "default": "albert_measurement",
      "description": "The identifier kind. Preview rows are always single measurements.",
      "title": "Type",
      "type": "string"
    },
    "inventoryId": {
      "description": "The formula or inventory item the row was measured on.",
      "title": "Inventoryid",
      "type": "string"
    },
    "lotId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The lot, when the measurement is on a lot.",
      "title": "Lotid"
    },
    "workflowInterval": {
      "description": "The workflow interval of the measurement.",
      "title": "Workflowinterval",
      "type": "string"
    },
    "taskId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The task that recorded the measurement.",
      "title": "Taskid"
    },
    "propertyDataId": {
      "description": "The property data record.",
      "title": "Propertydataid",
      "type": "string"
    },
    "projectId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Derived from ``inventory_id`` during the dataset build (temporary). Link records with\n``inventory_id`` and ``lot_id`` instead.",
      "title": "Projectid"
    }
  },
  "required": [
    "inventoryId",
    "workflowInterval",
    "propertyDataId"
  ],
  "title": "FeaturePreviewRowIdentifiers",
  "type": "object"
}

Config:

  • extra: allow

Fields:

model_config

model_config = ConfigDict(extra='allow')

type

type: Literal['albert_measurement'] = 'albert_measurement'

The identifier kind. Preview rows are always single measurements.

inventory_id

inventory_id: str

The formula or inventory item the row was measured on.

lot_id

lot_id: str | None = None

The lot, when the measurement is on a lot.

workflow_interval

workflow_interval: str

The workflow interval of the measurement.

task_id

task_id: str | None = None

The task that recorded the measurement.

property_data_id

property_data_id: str

The property data record.

project_id

project_id: str | None = None

Derived from inventory_id during the dataset build (temporary). Link records with inventory_id and lot_id instead.

FeaturePreviewRow

Bases: BaseAlbertModel

One featurized experiment row.

Show JSON schema:
{
  "$defs": {
    "FeaturePreviewRowIdentifiers": {
      "additionalProperties": true,
      "description": "The Albert records a featurized row was measured on.",
      "properties": {
        "type": {
          "const": "albert_measurement",
          "default": "albert_measurement",
          "description": "The identifier kind. Preview rows are always single measurements.",
          "title": "Type",
          "type": "string"
        },
        "inventoryId": {
          "description": "The formula or inventory item the row was measured on.",
          "title": "Inventoryid",
          "type": "string"
        },
        "lotId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The lot, when the measurement is on a lot.",
          "title": "Lotid"
        },
        "workflowInterval": {
          "description": "The workflow interval of the measurement.",
          "title": "Workflowinterval",
          "type": "string"
        },
        "taskId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The task that recorded the measurement.",
          "title": "Taskid"
        },
        "propertyDataId": {
          "description": "The property data record.",
          "title": "Propertydataid",
          "type": "string"
        },
        "projectId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Derived from ``inventory_id`` during the dataset build (temporary). Link records with\n``inventory_id`` and ``lot_id`` instead.",
          "title": "Projectid"
        }
      },
      "required": [
        "inventoryId",
        "workflowInterval",
        "propertyDataId"
      ],
      "title": "FeaturePreviewRowIdentifiers",
      "type": "object"
    }
  },
  "additionalProperties": true,
  "description": "One featurized experiment row.",
  "properties": {
    "experimentId": {
      "description": "The experiment's row key in the dataset. Opaque; use ``identifiers`` to link the row to\nAlbert records.",
      "title": "Experimentid",
      "type": "string"
    },
    "identifiers": {
      "anyOf": [
        {
          "$ref": "#/$defs/FeaturePreviewRowIdentifiers"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The Albert records the row was measured on. ``None`` when the dataset's rows carry no\nAlbert identifiers."
    },
    "values": {
      "additionalProperties": {
        "anyOf": [
          {
            "type": "number"
          },
          {
            "type": "integer"
          },
          {
            "type": "boolean"
          },
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "description": "Stable feature key to value. Missing values (NaN) are ``None``.",
      "title": "Values",
      "type": "object"
    }
  },
  "required": [
    "experimentId"
  ],
  "title": "FeaturePreviewRow",
  "type": "object"
}

Config:

  • extra: allow

Fields:

model_config

model_config = ConfigDict(extra='allow')

experiment_id

experiment_id: str

The experiment's row key in the dataset. Opaque; use identifiers to link the row to Albert records.

identifiers

identifiers: FeaturePreviewRowIdentifiers | None = None

The Albert records the row was measured on. None when the dataset's rows carry no Albert identifiers.

values

values: dict[str, float | int | bool | str | None]

Stable feature key to value. Missing values (NaN) are None.

FeatureSummary

Bases: BaseAlbertModel

A per-feature summary over every row of the dataset.

Show JSON schema:
{
  "additionalProperties": true,
  "description": "A per-feature summary over every row of the dataset.",
  "properties": {
    "key": {
      "description": "Stable feature key.",
      "title": "Key",
      "type": "string"
    },
    "dtype": {
      "description": "Dtype of the featurized column.",
      "title": "Dtype",
      "type": "string"
    },
    "nanCount": {
      "description": "Dataset rows where the feature is missing.",
      "title": "Nancount",
      "type": "integer"
    },
    "constant": {
      "description": "Whether the feature has at most one distinct non-missing value across the dataset.",
      "title": "Constant",
      "type": "boolean"
    }
  },
  "required": [
    "key",
    "dtype",
    "nanCount",
    "constant"
  ],
  "title": "FeatureSummary",
  "type": "object"
}

Config:

  • extra: allow

Fields:

model_config

model_config = ConfigDict(extra='allow')

key

key: str

Stable feature key.

dtype

dtype: str

Dtype of the featurized column.

nan_count

nan_count: int

Dataset rows where the feature is missing.

constant

constant: bool

Whether the feature has at most one distinct non-missing value across the dataset.

AutomaticFeatures

Bases: BaseAlbertModel

Features computed automatically, without a stable key (for example molecular descriptors). They are always used, cannot be masked, and are not in the row values.

Show JSON schema:
{
  "additionalProperties": true,
  "description": "Features computed automatically, without a stable key (for example molecular\ndescriptors). They are always used, cannot be masked, and are not in the row values.",
  "properties": {
    "count": {
      "description": "How many automatic features there are.",
      "title": "Count",
      "type": "integer"
    },
    "names": {
      "description": "Their names.",
      "items": {
        "type": "string"
      },
      "title": "Names",
      "type": "array"
    }
  },
  "required": [
    "count"
  ],
  "title": "AutomaticFeatures",
  "type": "object"
}

Config:

  • extra: allow

Fields:

model_config

model_config = ConfigDict(extra='allow')

count

count: int

How many automatic features there are.

names

names: list[str]

Their names.

DesignModelConfigFeaturePreview

Bases: BaseAlbertModel

Dataset rows run through a config's resolved features, with no model fit.

Show JSON schema:
{
  "$defs": {
    "AutomaticFeatures": {
      "additionalProperties": true,
      "description": "Features computed automatically, without a stable key (for example molecular\ndescriptors). They are always used, cannot be masked, and are not in the row values.",
      "properties": {
        "count": {
          "description": "How many automatic features there are.",
          "title": "Count",
          "type": "integer"
        },
        "names": {
          "description": "Their names.",
          "items": {
            "type": "string"
          },
          "title": "Names",
          "type": "array"
        }
      },
      "required": [
        "count"
      ],
      "title": "AutomaticFeatures",
      "type": "object"
    },
    "DesignModelConfigViolation": {
      "description": "A single design model config finding.",
      "properties": {
        "code": {
          "anyOf": [
            {
              "$ref": "#/$defs/DesignModelConfigViolationCode"
            },
            {
              "type": "string"
            }
          ],
          "description": "Machine-readable category of the finding. A code this version does not know yet is\nkept as a plain string.",
          "title": "Code"
        },
        "message": {
          "description": "Human-readable explanation of the finding.",
          "title": "Message",
          "type": "string"
        },
        "targetId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The target the finding is scoped to, when applicable.",
          "title": "Targetid"
        },
        "components": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Component paths (``<collection>/<key>``) the finding is attributed to.",
          "title": "Components"
        },
        "opIndex": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Position, in the ``operations`` passed to ``apply``, of the operation behind the finding.\n\n``None`` when the finding is not tied to an operation.",
          "title": "Opindex"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "title": "DesignModelConfigViolation",
      "type": "object"
    },
    "DesignModelConfigViolationCode": {
      "description": "Machine-readable category of a design model config finding.",
      "enum": [
        "target_not_in_dataset",
        "transform_requires_positive_target",
        "inert_mask_entry",
        "feature_dropped_by_overlap",
        "estimator_downgraded",
        "unknown_reference",
        "dimension_not_modelled",
        "invalid_settings",
        "invalid_constraint",
        "variable_not_derived",
        "insufficient_training_data",
        "duplicate_extra",
        "conflicting_label_definition"
      ],
      "title": "DesignModelConfigViolationCode",
      "type": "string"
    },
    "FeaturePreviewRow": {
      "additionalProperties": true,
      "description": "One featurized experiment row.",
      "properties": {
        "experimentId": {
          "description": "The experiment's row key in the dataset. Opaque; use ``identifiers`` to link the row to\nAlbert records.",
          "title": "Experimentid",
          "type": "string"
        },
        "identifiers": {
          "anyOf": [
            {
              "$ref": "#/$defs/FeaturePreviewRowIdentifiers"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The Albert records the row was measured on. ``None`` when the dataset's rows carry no\nAlbert identifiers."
        },
        "values": {
          "additionalProperties": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "integer"
              },
              {
                "type": "boolean"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": "Stable feature key to value. Missing values (NaN) are ``None``.",
          "title": "Values",
          "type": "object"
        }
      },
      "required": [
        "experimentId"
      ],
      "title": "FeaturePreviewRow",
      "type": "object"
    },
    "FeaturePreviewRowIdentifiers": {
      "additionalProperties": true,
      "description": "The Albert records a featurized row was measured on.",
      "properties": {
        "type": {
          "const": "albert_measurement",
          "default": "albert_measurement",
          "description": "The identifier kind. Preview rows are always single measurements.",
          "title": "Type",
          "type": "string"
        },
        "inventoryId": {
          "description": "The formula or inventory item the row was measured on.",
          "title": "Inventoryid",
          "type": "string"
        },
        "lotId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The lot, when the measurement is on a lot.",
          "title": "Lotid"
        },
        "workflowInterval": {
          "description": "The workflow interval of the measurement.",
          "title": "Workflowinterval",
          "type": "string"
        },
        "taskId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The task that recorded the measurement.",
          "title": "Taskid"
        },
        "propertyDataId": {
          "description": "The property data record.",
          "title": "Propertydataid",
          "type": "string"
        },
        "projectId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Derived from ``inventory_id`` during the dataset build (temporary). Link records with\n``inventory_id`` and ``lot_id`` instead.",
          "title": "Projectid"
        }
      },
      "required": [
        "inventoryId",
        "workflowInterval",
        "propertyDataId"
      ],
      "title": "FeaturePreviewRowIdentifiers",
      "type": "object"
    },
    "FeatureSummary": {
      "additionalProperties": true,
      "description": "A per-feature summary over every row of the dataset.",
      "properties": {
        "key": {
          "description": "Stable feature key.",
          "title": "Key",
          "type": "string"
        },
        "dtype": {
          "description": "Dtype of the featurized column.",
          "title": "Dtype",
          "type": "string"
        },
        "nanCount": {
          "description": "Dataset rows where the feature is missing.",
          "title": "Nancount",
          "type": "integer"
        },
        "constant": {
          "description": "Whether the feature has at most one distinct non-missing value across the dataset.",
          "title": "Constant",
          "type": "boolean"
        }
      },
      "required": [
        "key",
        "dtype",
        "nanCount",
        "constant"
      ],
      "title": "FeatureSummary",
      "type": "object"
    }
  },
  "additionalProperties": true,
  "description": "Dataset rows run through a config's resolved features, with no model fit.",
  "properties": {
    "numRows": {
      "description": "Rows returned in ``rows``.",
      "title": "Numrows",
      "type": "integer"
    },
    "totalRows": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Experiment rows in the dataset.",
      "title": "Totalrows"
    },
    "rowsTruncated": {
      "default": false,
      "description": "Whether ``rows`` carry fewer rows than ``total_rows``.",
      "title": "Rowstruncated",
      "type": "boolean"
    },
    "rows": {
      "description": "The featurized rows. Values are limited to the requested keyed feature columns.",
      "items": {
        "$ref": "#/$defs/FeaturePreviewRow"
      },
      "title": "Rows",
      "type": "array"
    },
    "columnsTruncated": {
      "default": false,
      "description": "Whether ``rows`` carry fewer features than ``summary``.",
      "title": "Columnstruncated",
      "type": "boolean"
    },
    "summary": {
      "description": "Every keyed feature, in feature order.",
      "items": {
        "$ref": "#/$defs/FeatureSummary"
      },
      "title": "Summary",
      "type": "array"
    },
    "automaticFeatures": {
      "$ref": "#/$defs/AutomaticFeatures",
      "description": "The unkeyed features that are always used."
    },
    "warnings": {
      "description": "Non-blocking findings. Empty when there are none.",
      "items": {
        "$ref": "#/$defs/DesignModelConfigViolation"
      },
      "title": "Warnings",
      "type": "array"
    }
  },
  "required": [
    "numRows",
    "automaticFeatures"
  ],
  "title": "DesignModelConfigFeaturePreview",
  "type": "object"
}

Config:

  • extra: allow

Fields:

model_config

model_config = ConfigDict(extra='allow')

num_rows

num_rows: int

Rows returned in rows.

total_rows

total_rows: int | None = None

Experiment rows in the dataset.

rows_truncated

rows_truncated: bool = False

Whether rows carry fewer rows than total_rows.

rows

The featurized rows. Values are limited to the requested keyed feature columns.

columns_truncated

columns_truncated: bool = False

Whether rows carry fewer features than summary.

summary

summary: list[FeatureSummary]

Every keyed feature, in feature order.

automatic_features

automatic_features: AutomaticFeatures

The unkeyed features that are always used.

warnings

Non-blocking findings. Empty when there are none.

DesignModelConfigReferences

Bases: BaseAlbertModel

What references a component of a design model config. Powers safe removal.

Show JSON schema:
{
  "additionalProperties": true,
  "description": "What references a component of a design model config. Powers safe removal.",
  "properties": {
    "references": {
      "description": "Component paths (``<collection>/<key>``, for example ``outputs/TAR046``) that point\nat the requested component, such as the outputs whose feature mask names it. Empty\nwhen nothing does.",
      "items": {
        "type": "string"
      },
      "title": "References",
      "type": "array"
    }
  },
  "title": "DesignModelConfigReferences",
  "type": "object"
}

Config:

  • extra: allow

Fields:

model_config

model_config = ConfigDict(extra='allow')

references

references: list[str]

Component paths (<collection>/<key>, for example outputs/TAR046) that point at the requested component, such as the outputs whose feature mask names it. Empty when nothing does.

DesignModelConfigApplyResponse

Bases: BaseAlbertModel

The result of applying builder operations to a draft design model config.

Show JSON schema:
{
  "$defs": {
    "AggregationBasis": {
      "description": "How an aggregation combines the member values of its scope.",
      "enum": [
        "mean",
        "sum"
      ],
      "title": "AggregationBasis",
      "type": "string"
    },
    "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"
    },
    "AutomaticFeatures": {
      "additionalProperties": true,
      "description": "Features computed automatically, without a stable key (for example molecular\ndescriptors). They are always used, cannot be masked, and are not in the row values.",
      "properties": {
        "count": {
          "description": "How many automatic features there are.",
          "title": "Count",
          "type": "integer"
        },
        "names": {
          "description": "Their names.",
          "items": {
            "type": "string"
          },
          "title": "Names",
          "type": "array"
        }
      },
      "required": [
        "count"
      ],
      "title": "AutomaticFeatures",
      "type": "object"
    },
    "DesignModelConfig": {
      "additionalProperties": true,
      "description": "A design model config: which targets to predict, how to transform them, and which\ndefault features each one uses.\n\nA config is created as a draft, edited with builder operations, checked against a\nsmart dataset, and published. A published config is frozen; editing one means\nforking it into a new draft.\n\nFields this version does not model are kept as extra fields when a config is read.",
      "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 config."
        },
        "updated": {
          "anyOf": [
            {
              "$ref": "#/$defs/AuditFields"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Audit fields for the last update of the config."
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The unique identifier of the config (format ``DMC...``).",
          "title": "Id"
        },
        "schemaVersion": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Pins the default feature-set definition. Not a concurrency counter.",
          "title": "Schemaversion"
        },
        "name": {
          "anyOf": [
            {
              "minLength": 1,
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Display name of the config.",
          "title": "Name"
        },
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Free-text description of the config's intent.",
          "title": "Description"
        },
        "parentId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The project (format ``PRO...``) that owns the config and controls access to it.",
          "title": "Parentid"
        },
        "state": {
          "anyOf": [
            {
              "$ref": "#/$defs/DesignModelConfigState"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Lifecycle state: ``draft`` (editable) or ``published`` (frozen)."
        },
        "publishedAt": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "When the config was published; ``None`` while it is a draft.",
          "title": "Publishedat"
        },
        "forkedFromId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The published config this draft was forked from, if any.",
          "title": "Forkedfromid"
        },
        "derivedFromId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The smart dataset (format ``SDT...``) that seeded the first draft, if any.\nProvenance only; the config does not track the dataset afterwards.",
          "title": "Derivedfromid"
        },
        "outputs": {
          "anyOf": [
            {
              "additionalProperties": {
                "$ref": "#/$defs/OutputEntryRead"
              },
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Output wiring, keyed by target ID (format ``TAR...``). Empty when absent.",
          "title": "Outputs"
        },
        "version": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Optimistic-concurrency counter, checked on every write.",
          "title": "Version"
        }
      },
      "title": "DesignModelConfig",
      "type": "object"
    },
    "DesignModelConfigFeaturePreview": {
      "additionalProperties": true,
      "description": "Dataset rows run through a config's resolved features, with no model fit.",
      "properties": {
        "numRows": {
          "description": "Rows returned in ``rows``.",
          "title": "Numrows",
          "type": "integer"
        },
        "totalRows": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Experiment rows in the dataset.",
          "title": "Totalrows"
        },
        "rowsTruncated": {
          "default": false,
          "description": "Whether ``rows`` carry fewer rows than ``total_rows``.",
          "title": "Rowstruncated",
          "type": "boolean"
        },
        "rows": {
          "description": "The featurized rows. Values are limited to the requested keyed feature columns.",
          "items": {
            "$ref": "#/$defs/FeaturePreviewRow"
          },
          "title": "Rows",
          "type": "array"
        },
        "columnsTruncated": {
          "default": false,
          "description": "Whether ``rows`` carry fewer features than ``summary``.",
          "title": "Columnstruncated",
          "type": "boolean"
        },
        "summary": {
          "description": "Every keyed feature, in feature order.",
          "items": {
            "$ref": "#/$defs/FeatureSummary"
          },
          "title": "Summary",
          "type": "array"
        },
        "automaticFeatures": {
          "$ref": "#/$defs/AutomaticFeatures",
          "description": "The unkeyed features that are always used."
        },
        "warnings": {
          "description": "Non-blocking findings. Empty when there are none.",
          "items": {
            "$ref": "#/$defs/DesignModelConfigViolation"
          },
          "title": "Warnings",
          "type": "array"
        }
      },
      "required": [
        "numRows",
        "automaticFeatures"
      ],
      "title": "DesignModelConfigFeaturePreview",
      "type": "object"
    },
    "DesignModelConfigResolvedFeatures": {
      "additionalProperties": true,
      "description": "The features a config resolves to against a smart dataset, and how outputs use them.",
      "properties": {
        "features": {
          "description": "The full resolved set in a deterministic order, before any output mask.",
          "items": {
            "$ref": "#/$defs/ResolvedFeature"
          },
          "title": "Features",
          "type": "array"
        },
        "outputs": {
          "additionalProperties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": "Target ID to the keys of the features its mask routes, in feature order.",
          "title": "Outputs",
          "type": "object"
        },
        "warnings": {
          "description": "Non-blocking findings. Empty when there are none.",
          "items": {
            "$ref": "#/$defs/DesignModelConfigViolation"
          },
          "title": "Warnings",
          "type": "array"
        }
      },
      "title": "DesignModelConfigResolvedFeatures",
      "type": "object"
    },
    "DesignModelConfigState": {
      "description": "Lifecycle of a design model config. Orthogonal to its soft-delete ``status``.",
      "enum": [
        "draft",
        "published"
      ],
      "title": "DesignModelConfigState",
      "type": "string"
    },
    "DesignModelConfigValidationResponse": {
      "description": "The result of checking a design model config.",
      "properties": {
        "valid": {
          "description": "Whether the config passed. ``False`` is a normal result, not an error.",
          "title": "Valid",
          "type": "boolean"
        },
        "violations": {
          "description": "Blocking and non-blocking findings. Empty when the config is valid.",
          "items": {
            "$ref": "#/$defs/DesignModelConfigViolation"
          },
          "title": "Violations",
          "type": "array"
        }
      },
      "required": [
        "valid"
      ],
      "title": "DesignModelConfigValidationResponse",
      "type": "object"
    },
    "DesignModelConfigViolation": {
      "description": "A single design model config finding.",
      "properties": {
        "code": {
          "anyOf": [
            {
              "$ref": "#/$defs/DesignModelConfigViolationCode"
            },
            {
              "type": "string"
            }
          ],
          "description": "Machine-readable category of the finding. A code this version does not know yet is\nkept as a plain string.",
          "title": "Code"
        },
        "message": {
          "description": "Human-readable explanation of the finding.",
          "title": "Message",
          "type": "string"
        },
        "targetId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The target the finding is scoped to, when applicable.",
          "title": "Targetid"
        },
        "components": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Component paths (``<collection>/<key>``) the finding is attributed to.",
          "title": "Components"
        },
        "opIndex": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Position, in the ``operations`` passed to ``apply``, of the operation behind the finding.\n\n``None`` when the finding is not tied to an operation.",
          "title": "Opindex"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "title": "DesignModelConfigViolation",
      "type": "object"
    },
    "DesignModelConfigViolationCode": {
      "description": "Machine-readable category of a design model config finding.",
      "enum": [
        "target_not_in_dataset",
        "transform_requires_positive_target",
        "inert_mask_entry",
        "feature_dropped_by_overlap",
        "estimator_downgraded",
        "unknown_reference",
        "dimension_not_modelled",
        "invalid_settings",
        "invalid_constraint",
        "variable_not_derived",
        "insufficient_training_data",
        "duplicate_extra",
        "conflicting_label_definition"
      ],
      "title": "DesignModelConfigViolationCode",
      "type": "string"
    },
    "FeatureFamily": {
      "description": "The default feature families a resolved feature belongs to.",
      "enum": [
        "ingredient_amount",
        "label_fraction",
        "ingredient_property",
        "parameter"
      ],
      "title": "FeatureFamily",
      "type": "string"
    },
    "FeatureMaskRead": {
      "additionalProperties": true,
      "description": "A feature mask as read from the service: a ``FeatureMask`` whose entries keep\nfields and kinds this version does not model.",
      "properties": {
        "include": {
          "anyOf": [
            {
              "items": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/_ReadFamilySelector"
                  },
                  {
                    "discriminator": {
                      "mapping": {
                        "ingredientAmount": "#/$defs/_ReadIngredientAmountOperand",
                        "labelFraction": "#/$defs/_ReadLabelFractionOperand",
                        "parameter": "#/$defs/_ReadParameterOperand",
                        "propertyAggregation": "#/$defs/_ReadPropertyAggregationOperand"
                      },
                      "propertyName": "type"
                    },
                    "oneOf": [
                      {
                        "$ref": "#/$defs/_ReadIngredientAmountOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadLabelFractionOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadParameterOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadPropertyAggregationOperand"
                      }
                    ]
                  },
                  {
                    "$ref": "#/$defs/UnknownDescriptor"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Use only the features these entries match.",
          "title": "Include"
        },
        "exclude": {
          "anyOf": [
            {
              "items": {
                "anyOf": [
                  {
                    "$ref": "#/$defs/_ReadFamilySelector"
                  },
                  {
                    "discriminator": {
                      "mapping": {
                        "ingredientAmount": "#/$defs/_ReadIngredientAmountOperand",
                        "labelFraction": "#/$defs/_ReadLabelFractionOperand",
                        "parameter": "#/$defs/_ReadParameterOperand",
                        "propertyAggregation": "#/$defs/_ReadPropertyAggregationOperand"
                      },
                      "propertyName": "type"
                    },
                    "oneOf": [
                      {
                        "$ref": "#/$defs/_ReadIngredientAmountOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadLabelFractionOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadParameterOperand"
                      },
                      {
                        "$ref": "#/$defs/_ReadPropertyAggregationOperand"
                      }
                    ]
                  },
                  {
                    "$ref": "#/$defs/UnknownDescriptor"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Use every feature except those these entries match.",
          "title": "Exclude"
        }
      },
      "title": "FeatureMaskRead",
      "type": "object"
    },
    "FeaturePreviewRow": {
      "additionalProperties": true,
      "description": "One featurized experiment row.",
      "properties": {
        "experimentId": {
          "description": "The experiment's row key in the dataset. Opaque; use ``identifiers`` to link the row to\nAlbert records.",
          "title": "Experimentid",
          "type": "string"
        },
        "identifiers": {
          "anyOf": [
            {
              "$ref": "#/$defs/FeaturePreviewRowIdentifiers"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The Albert records the row was measured on. ``None`` when the dataset's rows carry no\nAlbert identifiers."
        },
        "values": {
          "additionalProperties": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "integer"
              },
              {
                "type": "boolean"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": "Stable feature key to value. Missing values (NaN) are ``None``.",
          "title": "Values",
          "type": "object"
        }
      },
      "required": [
        "experimentId"
      ],
      "title": "FeaturePreviewRow",
      "type": "object"
    },
    "FeaturePreviewRowIdentifiers": {
      "additionalProperties": true,
      "description": "The Albert records a featurized row was measured on.",
      "properties": {
        "type": {
          "const": "albert_measurement",
          "default": "albert_measurement",
          "description": "The identifier kind. Preview rows are always single measurements.",
          "title": "Type",
          "type": "string"
        },
        "inventoryId": {
          "description": "The formula or inventory item the row was measured on.",
          "title": "Inventoryid",
          "type": "string"
        },
        "lotId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The lot, when the measurement is on a lot.",
          "title": "Lotid"
        },
        "workflowInterval": {
          "description": "The workflow interval of the measurement.",
          "title": "Workflowinterval",
          "type": "string"
        },
        "taskId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The task that recorded the measurement.",
          "title": "Taskid"
        },
        "propertyDataId": {
          "description": "The property data record.",
          "title": "Propertydataid",
          "type": "string"
        },
        "projectId": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Derived from ``inventory_id`` during the dataset build (temporary). Link records with\n``inventory_id`` and ``lot_id`` instead.",
          "title": "Projectid"
        }
      },
      "required": [
        "inventoryId",
        "workflowInterval",
        "propertyDataId"
      ],
      "title": "FeaturePreviewRowIdentifiers",
      "type": "object"
    },
    "FeatureSummary": {
      "additionalProperties": true,
      "description": "A per-feature summary over every row of the dataset.",
      "properties": {
        "key": {
          "description": "Stable feature key.",
          "title": "Key",
          "type": "string"
        },
        "dtype": {
          "description": "Dtype of the featurized column.",
          "title": "Dtype",
          "type": "string"
        },
        "nanCount": {
          "description": "Dataset rows where the feature is missing.",
          "title": "Nancount",
          "type": "integer"
        },
        "constant": {
          "description": "Whether the feature has at most one distinct non-missing value across the dataset.",
          "title": "Constant",
          "type": "boolean"
        }
      },
      "required": [
        "key",
        "dtype",
        "nanCount",
        "constant"
      ],
      "title": "FeatureSummary",
      "type": "object"
    },
    "OutputDataType": {
      "description": "The kind of prediction task an output is.",
      "enum": [
        "numeric",
        "categorical"
      ],
      "title": "OutputDataType",
      "type": "string"
    },
    "OutputEntryRead": {
      "additionalProperties": true,
      "description": "An output's wiring as read from the service: an ``OutputEntry`` that keeps data types,\ntransforms and mask entries this version does not model.",
      "properties": {
        "dataType": {
          "anyOf": [
            {
              "$ref": "#/$defs/OutputDataType"
            },
            {
              "type": "string"
            }
          ],
          "description": "Whether the target is numeric or categorical. A type this version does not know yet\nis kept as a plain string.",
          "title": "Datatype"
        },
        "outputTransform": {
          "anyOf": [
            {
              "$ref": "#/$defs/OutputTransform"
            },
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Transform for a numeric output. A transform this version does not know yet is kept\nas a plain string.",
          "title": "Outputtransform"
        },
        "features": {
          "anyOf": [
            {
              "$ref": "#/$defs/FeatureMaskRead"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Which features this output uses. ``None`` when it uses all features."
        }
      },
      "required": [
        "dataType"
      ],
      "title": "OutputEntryRead",
      "type": "object"
    },
    "OutputTransform": {
      "description": "A transform applied to a numeric output before modelling.",
      "enum": [
        "none",
        "log",
        "asinh",
        "yeoJohnson",
        "boxCox"
      ],
      "title": "OutputTransform",
      "type": "string"
    },
    "ResolvedFeature": {
      "additionalProperties": true,
      "description": "One concrete feature of a resolved feature set.",
      "properties": {
        "key": {
          "description": "Stable feature key, the feature's identity across resolutions. Keys have the form\n``ingredient/<INV id>``, ``label/<tag or local key>``,\n``property/<mean|sum>/<name>[/<label>]``, ``parameter/<composite key>`` or\n``parameter/<composite key>/<category>``. Treat a key as opaque.",
          "title": "Key",
          "type": "string"
        },
        "family": {
          "anyOf": [
            {
              "$ref": "#/$defs/FeatureFamily"
            },
            {
              "type": "string"
            }
          ],
          "description": "The default family the feature belongs to. A family this version does not know yet\nis kept as a plain string.",
          "title": "Family"
        },
        "descriptor": {
          "anyOf": [
            {
              "discriminator": {
                "mapping": {
                  "ingredientAmount": "#/$defs/_ReadIngredientAmountOperand",
                  "labelFraction": "#/$defs/_ReadLabelFractionOperand",
                  "parameter": "#/$defs/_ReadParameterOperand",
                  "propertyAggregation": "#/$defs/_ReadPropertyAggregationOperand"
                },
                "propertyName": "type"
              },
              "oneOf": [
                {
                  "$ref": "#/$defs/_ReadIngredientAmountOperand"
                },
                {
                  "$ref": "#/$defs/_ReadLabelFractionOperand"
                },
                {
                  "$ref": "#/$defs/_ReadParameterOperand"
                },
                {
                  "$ref": "#/$defs/_ReadPropertyAggregationOperand"
                }
              ]
            },
            {
              "$ref": "#/$defs/UnknownDescriptor"
            }
          ],
          "description": "The quantity the feature computes. A kind this version does not know yet parses to\n``UnknownDescriptor``.",
          "title": "Descriptor"
        },
        "value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The category a one-hot parameter feature encodes; ``None`` otherwise.",
          "title": "Value"
        },
        "origin": {
          "default": "default",
          "description": "``default`` for the always-computed default set; otherwise the key of the extra\nfeature that authored it.",
          "title": "Origin",
          "type": "string"
        }
      },
      "required": [
        "key",
        "family",
        "descriptor"
      ],
      "title": "ResolvedFeature",
      "type": "object"
    },
    "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"
    },
    "UnknownDescriptor": {
      "additionalProperties": true,
      "description": "A descriptor or mask entry of a kind this SDK version does not know yet.\n\nOnly appears in records read from the service. An entry written by a newer service\nversion parses into this model instead of failing, and keeps every key it carried.\nRequests never accept it.",
      "properties": {
        "type": {
          "description": "The kind the service reported.",
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "UnknownDescriptor",
      "type": "object"
    },
    "_ReadFamilySelector": {
      "additionalProperties": true,
      "description": "A family selector read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "description": "Which family to match: all ingredient amounts, label fractions, ingredient\nproperty aggregations, or parameters.",
          "enum": [
            "allIngredientAmounts",
            "allLabelFractions",
            "allIngredientProperties",
            "allParameters"
          ],
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "_ReadFamilySelector",
      "type": "object"
    },
    "_ReadIngredientAmountOperand": {
      "additionalProperties": true,
      "description": "An ingredient-amount descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "ingredientAmount",
          "default": "ingredientAmount",
          "description": "Descriptor kind; fixed to ``ingredientAmount``.",
          "title": "Type",
          "type": "string"
        },
        "ingredient": {
          "description": "The inventory ID (format ``INV...``) of the ingredient.",
          "title": "Ingredient",
          "type": "string"
        }
      },
      "required": [
        "ingredient"
      ],
      "title": "_ReadIngredientAmountOperand",
      "type": "object"
    },
    "_ReadLabelFractionOperand": {
      "additionalProperties": true,
      "description": "A label-fraction descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "labelFraction",
          "default": "labelFraction",
          "description": "Descriptor kind; fixed to ``labelFraction``.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "A platform tag (format ``TAG...``) or a local label key (``local:...``).",
          "title": "Label",
          "type": "string"
        }
      },
      "required": [
        "label"
      ],
      "title": "_ReadLabelFractionOperand",
      "type": "object"
    },
    "_ReadParameterOperand": {
      "additionalProperties": true,
      "description": "A parameter descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "parameter",
          "default": "parameter",
          "description": "Descriptor kind; fixed to ``parameter``.",
          "title": "Type",
          "type": "string"
        },
        "parameter": {
          "description": "The composite parameter key, ``{DAT|PRG}#PRM[#UNI]``.",
          "title": "Parameter",
          "type": "string"
        }
      },
      "required": [
        "parameter"
      ],
      "title": "_ReadParameterOperand",
      "type": "object"
    },
    "_ReadPropertyAggregationOperand": {
      "additionalProperties": true,
      "description": "A property-aggregation descriptor read from the service, keeping unknown fields.",
      "properties": {
        "type": {
          "const": "propertyAggregation",
          "default": "propertyAggregation",
          "description": "Descriptor kind; fixed to ``propertyAggregation``.",
          "title": "Type",
          "type": "string"
        },
        "basis": {
          "$ref": "#/$defs/AggregationBasis",
          "description": "How the member values combine: ``mean`` or ``sum``."
        },
        "property": {
          "description": "Name of the aggregated inventory property.",
          "title": "Property",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Restrict the aggregation to a label's members. Omit to scope to all ingredients.",
          "title": "Label"
        },
        "impute": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "How missing property values are handled: ``True`` fills the column mean, a number\nfills that constant, ``False`` fails on a sparse table. Omit to leave it unstated.",
          "title": "Impute"
        }
      },
      "required": [
        "basis",
        "property"
      ],
      "title": "_ReadPropertyAggregationOperand",
      "type": "object"
    }
  },
  "description": "The result of applying builder operations to a draft design model config.",
  "properties": {
    "modelConfig": {
      "$ref": "#/$defs/DesignModelConfig",
      "description": "The resulting design model config. The wire field is ``modelConfig``; it is named\ndifferently here because ``model_config`` is reserved by the model base class."
    },
    "validation": {
      "anyOf": [
        {
          "$ref": "#/$defs/DesignModelConfigValidationResponse"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The check result, present when one was asked for."
    },
    "preview": {
      "anyOf": [
        {
          "$ref": "#/$defs/DesignModelConfigFeaturePreview"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The feature preview, present when one was asked for."
    },
    "resolvedFeatures": {
      "anyOf": [
        {
          "$ref": "#/$defs/DesignModelConfigResolvedFeatures"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The resolved features, present when they were asked for."
    },
    "warnings": {
      "description": "Non-blocking findings. Empty when there are none.",
      "items": {
        "$ref": "#/$defs/DesignModelConfigViolation"
      },
      "title": "Warnings",
      "type": "array"
    }
  },
  "required": [
    "modelConfig"
  ],
  "title": "DesignModelConfigApplyResponse",
  "type": "object"
}

Fields:

design_model_config

design_model_config: DesignModelConfig

The resulting design model config. The wire field is modelConfig; it is named differently here because model_config is reserved by the model base class.

validation

validation: DesignModelConfigValidationResponse | None = (
    None
)

The check result, present when one was asked for.

preview

preview: DesignModelConfigFeaturePreview | None = None

The feature preview, present when one was asked for.

resolved_features

resolved_features: (
    DesignModelConfigResolvedFeatures | None
) = None

The resolved features, present when they were asked for.

warnings

Non-blocking findings. Empty when there are none.

SetOutputOperation

Bases: _DesignSpaceOperationBase

Upsert one target's whole wiring.

Show JSON schema:
{
  "$defs": {
    "AggregationBasis": {
      "description": "How an aggregation combines the member values of its scope.",
      "enum": [
        "mean",
        "sum"
      ],
      "title": "AggregationBasis",
      "type": "string"
    },
    "FamilySelector": {
      "additionalProperties": false,
      "description": "A mask entry matching every default feature of one family.",
      "properties": {
        "type": {
          "description": "Which family to match: all ingredient amounts, label fractions, ingredient\nproperty aggregations, or parameters.",
          "enum": [
            "allIngredientAmounts",
            "allLabelFractions",
            "allIngredientProperties",
            "allParameters"
          ],
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "FamilySelector",
      "type": "object"
    },
    "FeatureMask": {
      "additionalProperties": false,
      "description": "Which features an output uses: exactly one of ``include`` or ``exclude``.\n\nEach is a non-empty list of mask entries. An output with no mask uses all features.",
      "properties": {
        "include": {
          "anyOf": [
            {
              "items": {
                "discriminator": {
                  "mapping": {
                    "allIngredientAmounts": "#/$defs/FamilySelector",
                    "allIngredientProperties": "#/$defs/FamilySelector",
                    "allLabelFractions": "#/$defs/FamilySelector",
                    "allParameters": "#/$defs/FamilySelector",
                    "ingredientAmount": "#/$defs/IngredientAmountOperand",
                    "labelFraction": "#/$defs/LabelFractionOperand",
                    "parameter": "#/$defs/ParameterOperand",
                    "propertyAggregation": "#/$defs/PropertyAggregationOperand"
                  },
                  "propertyName": "type"
                },
                "oneOf": [
                  {
                    "$ref": "#/$defs/FamilySelector"
                  },
                  {
                    "$ref": "#/$defs/IngredientAmountOperand"
                  },
                  {
                    "$ref": "#/$defs/LabelFractionOperand"
                  },
                  {
                    "$ref": "#/$defs/ParameterOperand"
                  },
                  {
                    "$ref": "#/$defs/PropertyAggregationOperand"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Use only the features these entries match.",
          "title": "Include"
        },
        "exclude": {
          "anyOf": [
            {
              "items": {
                "discriminator": {
                  "mapping": {
                    "allIngredientAmounts": "#/$defs/FamilySelector",
                    "allIngredientProperties": "#/$defs/FamilySelector",
                    "allLabelFractions": "#/$defs/FamilySelector",
                    "allParameters": "#/$defs/FamilySelector",
                    "ingredientAmount": "#/$defs/IngredientAmountOperand",
                    "labelFraction": "#/$defs/LabelFractionOperand",
                    "parameter": "#/$defs/ParameterOperand",
                    "propertyAggregation": "#/$defs/PropertyAggregationOperand"
                  },
                  "propertyName": "type"
                },
                "oneOf": [
                  {
                    "$ref": "#/$defs/FamilySelector"
                  },
                  {
                    "$ref": "#/$defs/IngredientAmountOperand"
                  },
                  {
                    "$ref": "#/$defs/LabelFractionOperand"
                  },
                  {
                    "$ref": "#/$defs/ParameterOperand"
                  },
                  {
                    "$ref": "#/$defs/PropertyAggregationOperand"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Use every feature except those these entries match.",
          "title": "Exclude"
        }
      },
      "title": "FeatureMask",
      "type": "object"
    },
    "IngredientAmountOperand": {
      "additionalProperties": false,
      "description": "The amount of one ingredient in the formulation.",
      "properties": {
        "type": {
          "const": "ingredientAmount",
          "default": "ingredientAmount",
          "description": "Descriptor kind; fixed to ``ingredientAmount``.",
          "title": "Type",
          "type": "string"
        },
        "ingredient": {
          "description": "The inventory ID (format ``INV...``) of the ingredient.",
          "title": "Ingredient",
          "type": "string"
        }
      },
      "required": [
        "ingredient"
      ],
      "title": "IngredientAmountOperand",
      "type": "object"
    },
    "LabelFractionOperand": {
      "additionalProperties": false,
      "description": "The summed fraction of a label's member ingredients.",
      "properties": {
        "type": {
          "const": "labelFraction",
          "default": "labelFraction",
          "description": "Descriptor kind; fixed to ``labelFraction``.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "A platform tag (format ``TAG...``) or a local label key (``local:...``).",
          "title": "Label",
          "type": "string"
        }
      },
      "required": [
        "label"
      ],
      "title": "LabelFractionOperand",
      "type": "object"
    },
    "OutputDataType": {
      "description": "The kind of prediction task an output is.",
      "enum": [
        "numeric",
        "categorical"
      ],
      "title": "OutputDataType",
      "type": "string"
    },
    "OutputEntry": {
      "additionalProperties": true,
      "description": "One predicted target's wiring, keyed by target ID in a config's ``outputs``.\n\nFields the SDK does not model are kept as extra fields and sent back unchanged.",
      "properties": {
        "dataType": {
          "$ref": "#/$defs/OutputDataType",
          "description": "Whether the target is numeric or categorical."
        },
        "outputTransform": {
          "anyOf": [
            {
              "$ref": "#/$defs/OutputTransform"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Transform for a numeric output. A transform other than ``none`` on a categorical\noutput is rejected when applied (``invalid_settings``). Omit for no transform."
        },
        "features": {
          "anyOf": [
            {
              "$ref": "#/$defs/FeatureMask"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Which features this output uses. Omit to use all features."
        }
      },
      "required": [
        "dataType"
      ],
      "title": "OutputEntry",
      "type": "object"
    },
    "OutputTransform": {
      "description": "A transform applied to a numeric output before modelling.",
      "enum": [
        "none",
        "log",
        "asinh",
        "yeoJohnson",
        "boxCox"
      ],
      "title": "OutputTransform",
      "type": "string"
    },
    "ParameterOperand": {
      "additionalProperties": false,
      "description": "The value of one parameter, addressed by its composite key.",
      "properties": {
        "type": {
          "const": "parameter",
          "default": "parameter",
          "description": "Descriptor kind; fixed to ``parameter``.",
          "title": "Type",
          "type": "string"
        },
        "parameter": {
          "description": "The composite parameter key, ``{DAT|PRG}#PRM[#UNI]``.",
          "title": "Parameter",
          "type": "string"
        }
      },
      "required": [
        "parameter"
      ],
      "title": "ParameterOperand",
      "type": "object"
    },
    "PropertyAggregationOperand": {
      "additionalProperties": false,
      "description": "An aggregation of one inventory property over a scope of ingredients.",
      "properties": {
        "type": {
          "const": "propertyAggregation",
          "default": "propertyAggregation",
          "description": "Descriptor kind; fixed to ``propertyAggregation``.",
          "title": "Type",
          "type": "string"
        },
        "basis": {
          "$ref": "#/$defs/AggregationBasis",
          "description": "How the member values combine: ``mean`` or ``sum``."
        },
        "property": {
          "description": "Name of the aggregated inventory property.",
          "title": "Property",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Restrict the aggregation to a label's members. Omit to scope to all ingredients.",
          "title": "Label"
        },
        "impute": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "How missing property values are handled: ``True`` fills the column mean, a number\nfills that constant, ``False`` fails on a sparse table. Omit to leave it unstated.",
          "title": "Impute"
        }
      },
      "required": [
        "basis",
        "property"
      ],
      "title": "PropertyAggregationOperand",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "description": "Upsert one target's whole wiring.",
  "properties": {
    "op": {
      "const": "setOutput",
      "default": "setOutput",
      "description": "Operation kind; fixed to ``setOutput``.",
      "title": "Op",
      "type": "string"
    },
    "key": {
      "description": "The target ID (format ``TAR...``) to upsert.",
      "title": "Key",
      "type": "string"
    },
    "value": {
      "$ref": "#/$defs/OutputEntry",
      "description": "The target's full wiring: data type, transform and feature mask."
    }
  },
  "required": [
    "key",
    "value"
  ],
  "title": "SetOutputOperation",
  "type": "object"
}

Config:

  • extra: forbid

Fields:

op

op: Literal['setOutput'] = 'setOutput'

Operation kind; fixed to setOutput.

key

key: TargetId

The target ID (format TAR...) to upsert.

value

value: OutputEntry

The target's full wiring: data type, transform and feature mask.

CreateDesignModelConfigRequest

Bases: BaseAlbertModel

The details needed to create a draft design model config.

Show JSON schema:
{
  "additionalProperties": false,
  "description": "The details needed to create a draft design model config.",
  "properties": {
    "name": {
      "description": "Display name of the config.",
      "minLength": 1,
      "title": "Name",
      "type": "string"
    },
    "parentId": {
      "description": "The project (format ``PRO...``) that owns the config.",
      "title": "Parentid",
      "type": "string"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Free-text description of the config's intent.",
      "title": "Description"
    },
    "smartDatasetId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Smart dataset (format ``SDT...``) to derive the first draft from.",
      "title": "Smartdatasetid"
    }
  },
  "required": [
    "name",
    "parentId"
  ],
  "title": "CreateDesignModelConfigRequest",
  "type": "object"
}

Config:

  • extra: forbid

Fields:

model_config

model_config = ConfigDict(extra='forbid')

name

name: str

Display name of the config.

parent_id

parent_id: ProjectId

The project (format PRO...) that owns the config.

description

description: str | None = None

Free-text description of the config's intent.

smart_dataset_id

smart_dataset_id: SmartDatasetId | None = None

Smart dataset (format SDT...) to derive the first draft from.

DesignModelConfigForkRequest

Bases: BaseAlbertModel

The details of a design model config fork.

Show JSON schema:
{
  "additionalProperties": false,
  "description": "The details of a design model config fork.",
  "properties": {
    "parentId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Target project (format ``PRO...``) for the fork. ``None`` keeps the source's project.",
      "title": "Parentid"
    }
  },
  "title": "DesignModelConfigForkRequest",
  "type": "object"
}

Config:

  • extra: forbid

Fields:

model_config

model_config = ConfigDict(extra='forbid')

parent_id

parent_id: ProjectId | None = None

Target project (format PRO...) for the fork. None keeps the source's project.

DesignModelConfigValidationRequest

Bases: BaseAlbertModel

The dataset to check a design model config against.

Show JSON schema:
{
  "additionalProperties": false,
  "description": "The dataset to check a design model config against.",
  "properties": {
    "smartDatasetId": {
      "description": "Smart dataset (format ``SDT...``) to check against.",
      "title": "Smartdatasetid",
      "type": "string"
    }
  },
  "required": [
    "smartDatasetId"
  ],
  "title": "DesignModelConfigValidationRequest",
  "type": "object"
}

Config:

  • extra: forbid

Fields:

model_config

model_config = ConfigDict(extra='forbid')

smart_dataset_id

smart_dataset_id: SmartDatasetId

Smart dataset (format SDT...) to check against.

DesignModelConfigPreviewRequest

Bases: BaseAlbertModel

A feature preview folded into an apply result.

Show JSON schema:
{
  "additionalProperties": false,
  "description": "A feature preview folded into an apply result.",
  "properties": {
    "numRows": {
      "anyOf": [
        {
          "exclusiveMinimum": 0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Rows to return; ``None`` for every row. Omitted, the server returns 10.",
      "title": "Numrows"
    },
    "maxColumns": {
      "anyOf": [
        {
          "exclusiveMinimum": 0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Keyed feature columns whose values are returned; ``None`` for all. Omitted, 50.",
      "title": "Maxcolumns"
    }
  },
  "title": "DesignModelConfigPreviewRequest",
  "type": "object"
}

Config:

  • extra: forbid

Fields:

model_config

model_config = ConfigDict(extra='forbid')

num_rows

num_rows: PositiveInt | None = None

Rows to return; None for every row. Omitted, the server returns 10.

max_columns

max_columns: PositiveInt | None = None

Keyed feature columns whose values are returned; None for all. Omitted, 50.

DesignModelConfigOperationsRequest

Bases: BaseAlbertModel

An ordered list of builder operations to apply to a draft design model config.

Show JSON schema:
{
  "$defs": {
    "AggregationBasis": {
      "description": "How an aggregation combines the member values of its scope.",
      "enum": [
        "mean",
        "sum"
      ],
      "title": "AggregationBasis",
      "type": "string"
    },
    "DesignModelConfigPreviewRequest": {
      "additionalProperties": false,
      "description": "A feature preview folded into an apply result.",
      "properties": {
        "numRows": {
          "anyOf": [
            {
              "exclusiveMinimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Rows to return; ``None`` for every row. Omitted, the server returns 10.",
          "title": "Numrows"
        },
        "maxColumns": {
          "anyOf": [
            {
              "exclusiveMinimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Keyed feature columns whose values are returned; ``None`` for all. Omitted, 50.",
          "title": "Maxcolumns"
        }
      },
      "title": "DesignModelConfigPreviewRequest",
      "type": "object"
    },
    "FamilySelector": {
      "additionalProperties": false,
      "description": "A mask entry matching every default feature of one family.",
      "properties": {
        "type": {
          "description": "Which family to match: all ingredient amounts, label fractions, ingredient\nproperty aggregations, or parameters.",
          "enum": [
            "allIngredientAmounts",
            "allLabelFractions",
            "allIngredientProperties",
            "allParameters"
          ],
          "title": "Type",
          "type": "string"
        }
      },
      "required": [
        "type"
      ],
      "title": "FamilySelector",
      "type": "object"
    },
    "FeatureMask": {
      "additionalProperties": false,
      "description": "Which features an output uses: exactly one of ``include`` or ``exclude``.\n\nEach is a non-empty list of mask entries. An output with no mask uses all features.",
      "properties": {
        "include": {
          "anyOf": [
            {
              "items": {
                "discriminator": {
                  "mapping": {
                    "allIngredientAmounts": "#/$defs/FamilySelector",
                    "allIngredientProperties": "#/$defs/FamilySelector",
                    "allLabelFractions": "#/$defs/FamilySelector",
                    "allParameters": "#/$defs/FamilySelector",
                    "ingredientAmount": "#/$defs/IngredientAmountOperand",
                    "labelFraction": "#/$defs/LabelFractionOperand",
                    "parameter": "#/$defs/ParameterOperand",
                    "propertyAggregation": "#/$defs/PropertyAggregationOperand"
                  },
                  "propertyName": "type"
                },
                "oneOf": [
                  {
                    "$ref": "#/$defs/FamilySelector"
                  },
                  {
                    "$ref": "#/$defs/IngredientAmountOperand"
                  },
                  {
                    "$ref": "#/$defs/LabelFractionOperand"
                  },
                  {
                    "$ref": "#/$defs/ParameterOperand"
                  },
                  {
                    "$ref": "#/$defs/PropertyAggregationOperand"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Use only the features these entries match.",
          "title": "Include"
        },
        "exclude": {
          "anyOf": [
            {
              "items": {
                "discriminator": {
                  "mapping": {
                    "allIngredientAmounts": "#/$defs/FamilySelector",
                    "allIngredientProperties": "#/$defs/FamilySelector",
                    "allLabelFractions": "#/$defs/FamilySelector",
                    "allParameters": "#/$defs/FamilySelector",
                    "ingredientAmount": "#/$defs/IngredientAmountOperand",
                    "labelFraction": "#/$defs/LabelFractionOperand",
                    "parameter": "#/$defs/ParameterOperand",
                    "propertyAggregation": "#/$defs/PropertyAggregationOperand"
                  },
                  "propertyName": "type"
                },
                "oneOf": [
                  {
                    "$ref": "#/$defs/FamilySelector"
                  },
                  {
                    "$ref": "#/$defs/IngredientAmountOperand"
                  },
                  {
                    "$ref": "#/$defs/LabelFractionOperand"
                  },
                  {
                    "$ref": "#/$defs/ParameterOperand"
                  },
                  {
                    "$ref": "#/$defs/PropertyAggregationOperand"
                  }
                ]
              },
              "minItems": 1,
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Use every feature except those these entries match.",
          "title": "Exclude"
        }
      },
      "title": "FeatureMask",
      "type": "object"
    },
    "IngredientAmountOperand": {
      "additionalProperties": false,
      "description": "The amount of one ingredient in the formulation.",
      "properties": {
        "type": {
          "const": "ingredientAmount",
          "default": "ingredientAmount",
          "description": "Descriptor kind; fixed to ``ingredientAmount``.",
          "title": "Type",
          "type": "string"
        },
        "ingredient": {
          "description": "The inventory ID (format ``INV...``) of the ingredient.",
          "title": "Ingredient",
          "type": "string"
        }
      },
      "required": [
        "ingredient"
      ],
      "title": "IngredientAmountOperand",
      "type": "object"
    },
    "LabelFractionOperand": {
      "additionalProperties": false,
      "description": "The summed fraction of a label's member ingredients.",
      "properties": {
        "type": {
          "const": "labelFraction",
          "default": "labelFraction",
          "description": "Descriptor kind; fixed to ``labelFraction``.",
          "title": "Type",
          "type": "string"
        },
        "label": {
          "description": "A platform tag (format ``TAG...``) or a local label key (``local:...``).",
          "title": "Label",
          "type": "string"
        }
      },
      "required": [
        "label"
      ],
      "title": "LabelFractionOperand",
      "type": "object"
    },
    "OutputDataType": {
      "description": "The kind of prediction task an output is.",
      "enum": [
        "numeric",
        "categorical"
      ],
      "title": "OutputDataType",
      "type": "string"
    },
    "OutputEntry": {
      "additionalProperties": true,
      "description": "One predicted target's wiring, keyed by target ID in a config's ``outputs``.\n\nFields the SDK does not model are kept as extra fields and sent back unchanged.",
      "properties": {
        "dataType": {
          "$ref": "#/$defs/OutputDataType",
          "description": "Whether the target is numeric or categorical."
        },
        "outputTransform": {
          "anyOf": [
            {
              "$ref": "#/$defs/OutputTransform"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Transform for a numeric output. A transform other than ``none`` on a categorical\noutput is rejected when applied (``invalid_settings``). Omit for no transform."
        },
        "features": {
          "anyOf": [
            {
              "$ref": "#/$defs/FeatureMask"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Which features this output uses. Omit to use all features."
        }
      },
      "required": [
        "dataType"
      ],
      "title": "OutputEntry",
      "type": "object"
    },
    "OutputTransform": {
      "description": "A transform applied to a numeric output before modelling.",
      "enum": [
        "none",
        "log",
        "asinh",
        "yeoJohnson",
        "boxCox"
      ],
      "title": "OutputTransform",
      "type": "string"
    },
    "ParameterOperand": {
      "additionalProperties": false,
      "description": "The value of one parameter, addressed by its composite key.",
      "properties": {
        "type": {
          "const": "parameter",
          "default": "parameter",
          "description": "Descriptor kind; fixed to ``parameter``.",
          "title": "Type",
          "type": "string"
        },
        "parameter": {
          "description": "The composite parameter key, ``{DAT|PRG}#PRM[#UNI]``.",
          "title": "Parameter",
          "type": "string"
        }
      },
      "required": [
        "parameter"
      ],
      "title": "ParameterOperand",
      "type": "object"
    },
    "PropertyAggregationOperand": {
      "additionalProperties": false,
      "description": "An aggregation of one inventory property over a scope of ingredients.",
      "properties": {
        "type": {
          "const": "propertyAggregation",
          "default": "propertyAggregation",
          "description": "Descriptor kind; fixed to ``propertyAggregation``.",
          "title": "Type",
          "type": "string"
        },
        "basis": {
          "$ref": "#/$defs/AggregationBasis",
          "description": "How the member values combine: ``mean`` or ``sum``."
        },
        "property": {
          "description": "Name of the aggregated inventory property.",
          "title": "Property",
          "type": "string"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "Restrict the aggregation to a label's members. Omit to scope to all ingredients.",
          "title": "Label"
        },
        "impute": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "How missing property values are handled: ``True`` fills the column mean, a number\nfills that constant, ``False`` fails on a sparse table. Omit to leave it unstated.",
          "title": "Impute"
        }
      },
      "required": [
        "basis",
        "property"
      ],
      "title": "PropertyAggregationOperand",
      "type": "object"
    },
    "RemoveComponentOperation": {
      "additionalProperties": false,
      "description": "Remove an ingredient or parameter from a design space by its path.",
      "properties": {
        "op": {
          "const": "removeComponent",
          "default": "removeComponent",
          "description": "Operation kind; fixed to ``removeComponent``.",
          "title": "Op",
          "type": "string"
        },
        "path": {
          "description": "Component path, ``<collection>/<key>`` (e.g. ``\"ingredients/INV004\"``).",
          "title": "Path",
          "type": "string"
        }
      },
      "required": [
        "path"
      ],
      "title": "RemoveComponentOperation",
      "type": "object"
    },
    "SetOutputOperation": {
      "additionalProperties": false,
      "description": "Upsert one target's whole wiring.",
      "properties": {
        "op": {
          "const": "setOutput",
          "default": "setOutput",
          "description": "Operation kind; fixed to ``setOutput``.",
          "title": "Op",
          "type": "string"
        },
        "key": {
          "description": "The target ID (format ``TAR...``) to upsert.",
          "title": "Key",
          "type": "string"
        },
        "value": {
          "$ref": "#/$defs/OutputEntry",
          "description": "The target's full wiring: data type, transform and feature mask."
        }
      },
      "required": [
        "key",
        "value"
      ],
      "title": "SetOutputOperation",
      "type": "object"
    },
    "UpdateComponentOperation": {
      "additionalProperties": false,
      "description": "Change one field of a design-space component in place.",
      "properties": {
        "op": {
          "const": "updateComponent",
          "default": "updateComponent",
          "description": "Operation kind; fixed to ``updateComponent``.",
          "title": "Op",
          "type": "string"
        },
        "path": {
          "description": "Component path, ``<collection>/<key>`` (e.g. ``\"ingredients/INV004\"``).",
          "title": "Path",
          "type": "string"
        },
        "field": {
          "description": "The component field to change (e.g. ``\"max\"``).",
          "title": "Field",
          "type": "string"
        },
        "value": {
          "description": "The new value for the field.",
          "title": "Value"
        }
      },
      "required": [
        "path",
        "field",
        "value"
      ],
      "title": "UpdateComponentOperation",
      "type": "object"
    }
  },
  "additionalProperties": false,
  "description": "An ordered list of builder operations to apply to a draft design model config.",
  "properties": {
    "operations": {
      "description": "The operations to apply, in order. Applied atomically.",
      "items": {
        "discriminator": {
          "mapping": {
            "removeComponent": "#/$defs/RemoveComponentOperation",
            "setOutput": "#/$defs/SetOutputOperation",
            "updateComponent": "#/$defs/UpdateComponentOperation"
          },
          "propertyName": "op"
        },
        "oneOf": [
          {
            "$ref": "#/$defs/SetOutputOperation"
          },
          {
            "$ref": "#/$defs/RemoveComponentOperation"
          },
          {
            "$ref": "#/$defs/UpdateComponentOperation"
          }
        ]
      },
      "minItems": 1,
      "title": "Operations",
      "type": "array"
    },
    "validate": {
      "default": false,
      "description": "Whether to fold a check into the result.",
      "title": "Validate",
      "type": "boolean"
    },
    "preview": {
      "anyOf": [
        {
          "$ref": "#/$defs/DesignModelConfigPreviewRequest"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "A feature preview to fold into the result. Needs ``smart_dataset_id``."
    },
    "resolve": {
      "default": false,
      "description": "Whether to fold the resolved features into the result. Needs ``smart_dataset_id``.",
      "title": "Resolve",
      "type": "boolean"
    },
    "dryRun": {
      "default": false,
      "description": "Compute the would-be result without saving it.",
      "title": "Dryrun",
      "type": "boolean"
    },
    "smartDatasetId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Smart dataset (format ``SDT...``) for the folded checks.",
      "title": "Smartdatasetid"
    }
  },
  "required": [
    "operations"
  ],
  "title": "DesignModelConfigOperationsRequest",
  "type": "object"
}

Config:

  • extra: forbid

Fields:

model_config

model_config = ConfigDict(extra='forbid')

operations

The operations to apply, in order. Applied atomically.

validate_

validate_: bool = False

Whether to fold a check into the result.

preview

preview: DesignModelConfigPreviewRequest | None = None

A feature preview to fold into the result. Needs smart_dataset_id.

resolve

resolve: bool = False

Whether to fold the resolved features into the result. Needs smart_dataset_id.

dry_run

dry_run: bool = False

Compute the would-be result without saving it.

smart_dataset_id

smart_dataset_id: SmartDatasetId | None = None

Smart dataset (format SDT...) for the folded checks.