Design Spaces (🧪Beta)
albert.resources.design_spaces
Attributes:
| Name | Type | Description |
|---|---|---|
ParameterConstraint |
The allowed values of a design-space parameter: a continuous range, a discrete set |
|
ParameterConstraintRead |
A parameter constraint as read from the service. A known kind parses to its model (an |
|
DesignSpaceOperation |
A builder operation on a draft design space. |
ParameterConstraint
ParameterConstraint = Annotated[
ContinuousConstraint
| DiscreteConstraint
| CategoricalConstraint,
Field(discriminator="type"),
]
The allowed values of a design-space parameter: a continuous range, a discrete set of numbers, or a set of categories.
ParameterConstraintRead
ParameterConstraintRead = Annotated[
Annotated[
_ReadContinuousConstraint
| _ReadDiscreteConstraint
| _ReadCategoricalConstraint,
Field(discriminator="type"),
]
| UnknownParameterConstraint,
Field(union_mode="left_to_right"),
]
A parameter constraint as read from the service. A known kind parses to its model (an
instance of ContinuousConstraint, DiscreteConstraint or CategoricalConstraint)
and keeps fields this version does not model; an unknown kind parses to
UnknownParameterConstraint.
DesignSpaceOperation
DesignSpaceOperation = Annotated[
SetIngredientOperation
| SetParameterOperation
| SetCountBoundsOperation
| RemoveComponentOperation
| UpdateComponentOperation,
Field(discriminator="op"),
]
A builder operation on a draft design space.
DesignSpaceState
IngredientAction
Bases: StrEnum
How an ingredient participates in formulations drawn from a design space.
Attributes:
| Name | Type | Description |
|---|---|---|
MUST_INCLUDE |
|
|
MAY_INCLUDE |
|
|
EXCLUDE |
|
ParameterDataType
Bases: StrEnum
The kind of values a design-space parameter takes.
Attributes:
| Name | Type | Description |
|---|---|---|
NUMERIC |
|
|
CATEGORICAL |
|
DesignSpaceViolationCode
Bases: StrEnum
Machine-readable category of a design-space validation finding.
Attributes:
ContinuousConstraint
Bases: _ParameterConstraintBase
A numeric parameter restricted to a range. Either bound may be omitted.
Show JSON schema:
{
"additionalProperties": false,
"description": "A numeric parameter restricted to a range. Either bound may be omitted.",
"properties": {
"type": {
"const": "continuous",
"default": "continuous",
"description": "Constraint kind; fixed to ``continuous``.",
"title": "Type",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Smallest allowed value. Omit for no lower bound.",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Largest allowed value. Omit for no upper bound.",
"title": "Max"
}
},
"title": "ContinuousConstraint",
"type": "object"
}
Fields:
DiscreteConstraint
Bases: _ParameterConstraintBase
A numeric parameter restricted to an explicit set of numbers.
Show JSON schema:
{
"additionalProperties": false,
"description": "A numeric parameter restricted to an explicit set of numbers.",
"properties": {
"type": {
"const": "discrete",
"default": "discrete",
"description": "Constraint kind; fixed to ``discrete``.",
"title": "Type",
"type": "string"
},
"values": {
"description": "The allowed values.",
"items": {
"type": "number"
},
"minItems": 1,
"title": "Values",
"type": "array"
}
},
"required": [
"values"
],
"title": "DiscreteConstraint",
"type": "object"
}
Fields:
CategoricalConstraint
Bases: _ParameterConstraintBase
A parameter restricted to an explicit set of category labels.
Show JSON schema:
{
"additionalProperties": false,
"description": "A parameter restricted to an explicit set of category labels.",
"properties": {
"type": {
"const": "categorical",
"default": "categorical",
"description": "Constraint kind; fixed to ``categorical``.",
"title": "Type",
"type": "string"
},
"values": {
"description": "The allowed category labels.",
"items": {
"type": "string"
},
"minItems": 1,
"title": "Values",
"type": "array"
}
},
"required": [
"values"
],
"title": "CategoricalConstraint",
"type": "object"
}
Fields:
UnknownParameterConstraint
Bases: BaseAlbertModel
A parameter constraint of a kind this SDK version does not know yet.
Only appears in design spaces read from the service: a space written by a newer release parses with this model in place of the constraint instead of failing, and the constraint keeps every key it carried. Requests never accept it.
Show JSON schema:
{
"additionalProperties": true,
"description": "A parameter constraint of a kind this SDK version does not know yet.\n\nOnly appears in design spaces read from the service: a space written by a newer\nrelease parses with this model in place of the constraint instead of failing, and the\nconstraint keeps every key it carried. Requests never accept it.",
"properties": {
"type": {
"description": "The kind the service reported.",
"title": "Type",
"type": "string"
}
},
"required": [
"type"
],
"title": "UnknownParameterConstraint",
"type": "object"
}
Config:
extra:allow
Fields:
Validators:
-
_only_unknown_kinds→type
IngredientEntry
Bases: BaseAlbertModel
An ingredient dimension of a design space: its action plus fraction bounds.
Show JSON schema:
{
"$defs": {
"IngredientAction": {
"description": "How an ingredient participates in formulations drawn from a design space.",
"enum": [
"mustInclude",
"mayInclude",
"exclude"
],
"title": "IngredientAction",
"type": "string"
}
},
"description": "An ingredient dimension of a design space: its action plus fraction bounds.",
"properties": {
"action": {
"$ref": "#/$defs/IngredientAction",
"description": "``mustInclude`` pins the ingredient into every formulation, ``mayInclude`` leaves\nit optional, and ``exclude`` bans it. An excluded ingredient keeps its ``min`` and\n``max``, but they are not applied while it is excluded; they apply again once the\naction changes back to ``mayInclude`` or ``mustInclude``."
},
"min": {
"anyOf": [
{
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Fraction lower bound (0 to 1).",
"title": "Min"
},
"max": {
"anyOf": [
{
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Fraction upper bound (0 to 1).",
"title": "Max"
}
},
"required": [
"action"
],
"title": "IngredientEntry",
"type": "object"
}
Fields:
action
action: IngredientAction
mustInclude pins the ingredient into every formulation, mayInclude leaves
it optional, and exclude bans it. An excluded ingredient keeps its min and
max, but they are not applied while it is excluded; they apply again once the
action changes back to mayInclude or mustInclude.
ParameterRef
Bases: BaseAlbertModel
The structured identity of a parameter: where it lives, and in what unit.
Show JSON schema:
{
"description": "The structured identity of a parameter: where it lives, and in what unit.",
"properties": {
"parameterId": {
"description": "The parameter (format ``PRM...``).",
"title": "Parameterid",
"type": "string"
},
"dataTemplateId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The data template (format ``DAT...``) the parameter belongs to. Exactly one of\n``data_template_id`` / ``parameter_group_id`` is set.",
"title": "Datatemplateid"
},
"parameterGroupId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The parameter group (format ``PRG...``) the parameter belongs to. Exactly one of\n``data_template_id`` / ``parameter_group_id`` is set.",
"title": "Parametergroupid"
},
"unitId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The unit (format ``UNI...``) the parameter is expressed in; ``None`` when the\nparameter is unit-less.",
"title": "Unitid"
}
},
"required": [
"parameterId"
],
"title": "ParameterRef",
"type": "object"
}
Fields:
-
parameter_id(ParameterId) -
data_template_id(DataTemplateId | None) -
parameter_group_id(ParameterGroupId | None) -
unit_id(UnitId | None)
data_template_id
data_template_id: DataTemplateId | None = None
The data template (format DAT...) the parameter belongs to. Exactly one of
data_template_id / parameter_group_id is set.
parameter_group_id
parameter_group_id: ParameterGroupId | None = None
The parameter group (format PRG...) the parameter belongs to. Exactly one of
data_template_id / parameter_group_id is set.
unit_id
unit_id: UnitId | None = None
The unit (format UNI...) the parameter is expressed in; None when the
parameter is unit-less.
ParameterEntry
Bases: BaseAlbertModel
A parameter dimension of a design space: its identity plus allowed values.
Read from the service only (requests use ParameterAssignment). Fields this version
does not model are kept as extra fields.
Show JSON schema:
{
"$defs": {
"ParameterDataType": {
"description": "The kind of values a design-space parameter takes.",
"enum": [
"numeric",
"categorical"
],
"title": "ParameterDataType",
"type": "string"
},
"ParameterRef": {
"description": "The structured identity of a parameter: where it lives, and in what unit.",
"properties": {
"parameterId": {
"description": "The parameter (format ``PRM...``).",
"title": "Parameterid",
"type": "string"
},
"dataTemplateId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The data template (format ``DAT...``) the parameter belongs to. Exactly one of\n``data_template_id`` / ``parameter_group_id`` is set.",
"title": "Datatemplateid"
},
"parameterGroupId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The parameter group (format ``PRG...``) the parameter belongs to. Exactly one of\n``data_template_id`` / ``parameter_group_id`` is set.",
"title": "Parametergroupid"
},
"unitId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The unit (format ``UNI...``) the parameter is expressed in; ``None`` when the\nparameter is unit-less.",
"title": "Unitid"
}
},
"required": [
"parameterId"
],
"title": "ParameterRef",
"type": "object"
},
"UnknownParameterConstraint": {
"additionalProperties": true,
"description": "A parameter constraint of a kind this SDK version does not know yet.\n\nOnly appears in design spaces read from the service: a space written by a newer\nrelease parses with this model in place of the constraint instead of failing, and the\nconstraint keeps every key it carried. Requests never accept it.",
"properties": {
"type": {
"description": "The kind the service reported.",
"title": "Type",
"type": "string"
}
},
"required": [
"type"
],
"title": "UnknownParameterConstraint",
"type": "object"
},
"_ReadCategoricalConstraint": {
"additionalProperties": true,
"description": "A categorical constraint read from the service, keeping unknown fields.",
"properties": {
"type": {
"const": "categorical",
"default": "categorical",
"description": "Constraint kind; fixed to ``categorical``.",
"title": "Type",
"type": "string"
},
"values": {
"description": "The allowed category labels.",
"items": {
"type": "string"
},
"minItems": 1,
"title": "Values",
"type": "array"
}
},
"required": [
"values"
],
"title": "_ReadCategoricalConstraint",
"type": "object"
},
"_ReadContinuousConstraint": {
"additionalProperties": true,
"description": "A continuous constraint read from the service, keeping unknown fields.",
"properties": {
"type": {
"const": "continuous",
"default": "continuous",
"description": "Constraint kind; fixed to ``continuous``.",
"title": "Type",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Smallest allowed value. Omit for no lower bound.",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Largest allowed value. Omit for no upper bound.",
"title": "Max"
}
},
"title": "_ReadContinuousConstraint",
"type": "object"
},
"_ReadDiscreteConstraint": {
"additionalProperties": true,
"description": "A discrete constraint read from the service, keeping unknown fields.",
"properties": {
"type": {
"const": "discrete",
"default": "discrete",
"description": "Constraint kind; fixed to ``discrete``.",
"title": "Type",
"type": "string"
},
"values": {
"description": "The allowed values.",
"items": {
"type": "number"
},
"minItems": 1,
"title": "Values",
"type": "array"
}
},
"required": [
"values"
],
"title": "_ReadDiscreteConstraint",
"type": "object"
}
},
"additionalProperties": true,
"description": "A parameter dimension of a design space: its identity plus allowed values.\n\nRead from the service only (requests use ``ParameterAssignment``). Fields this version\ndoes not model are kept as extra fields.",
"properties": {
"ref": {
"$ref": "#/$defs/ParameterRef",
"description": "The parameter's structured identity."
},
"dataType": {
"$ref": "#/$defs/ParameterDataType",
"description": "Whether the parameter is numeric or categorical."
},
"constraint": {
"anyOf": [
{
"discriminator": {
"mapping": {
"categorical": "#/$defs/_ReadCategoricalConstraint",
"continuous": "#/$defs/_ReadContinuousConstraint",
"discrete": "#/$defs/_ReadDiscreteConstraint"
},
"propertyName": "type"
},
"oneOf": [
{
"$ref": "#/$defs/_ReadContinuousConstraint"
},
{
"$ref": "#/$defs/_ReadDiscreteConstraint"
},
{
"$ref": "#/$defs/_ReadCategoricalConstraint"
}
]
},
{
"$ref": "#/$defs/UnknownParameterConstraint"
}
],
"description": "The values the parameter may take inside the space. A kind this version does not\nknow yet parses to ``UnknownParameterConstraint``.",
"title": "Constraint"
}
},
"required": [
"ref",
"dataType",
"constraint"
],
"title": "ParameterEntry",
"type": "object"
}
Config:
extra:allow
Fields:
constraint
constraint: ParameterConstraintRead
The values the parameter may take inside the space. A kind this version does not
know yet parses to UnknownParameterConstraint.
DesignSpace
Bases: _DesignRecord
A design space: the bounded envelope a design run samples formulations from.
Also called the search space or simply the bounds: which ingredients may or must appear, the fraction range of each, the allowed values of parameters, and how many ingredients one formulation may carry.
A space is created as a draft, edited with builder operations, checked for feasibility, and published. A published space is frozen; editing one means forking it into a new draft.
Fields this version does not model are kept as extra fields when a space is read.
Show JSON schema:
{
"$defs": {
"AuditFields": {
"description": "The audit fields for a resource",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
}
},
"title": "AuditFields",
"type": "object"
},
"DesignSpaceState": {
"description": "Lifecycle of a design space. Orthogonal to its soft-delete ``status``.",
"enum": [
"draft",
"published"
],
"title": "DesignSpaceState",
"type": "string"
},
"IngredientAction": {
"description": "How an ingredient participates in formulations drawn from a design space.",
"enum": [
"mustInclude",
"mayInclude",
"exclude"
],
"title": "IngredientAction",
"type": "string"
},
"IngredientEntry": {
"description": "An ingredient dimension of a design space: its action plus fraction bounds.",
"properties": {
"action": {
"$ref": "#/$defs/IngredientAction",
"description": "``mustInclude`` pins the ingredient into every formulation, ``mayInclude`` leaves\nit optional, and ``exclude`` bans it. An excluded ingredient keeps its ``min`` and\n``max``, but they are not applied while it is excluded; they apply again once the\naction changes back to ``mayInclude`` or ``mustInclude``."
},
"min": {
"anyOf": [
{
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Fraction lower bound (0 to 1).",
"title": "Min"
},
"max": {
"anyOf": [
{
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Fraction upper bound (0 to 1).",
"title": "Max"
}
},
"required": [
"action"
],
"title": "IngredientEntry",
"type": "object"
},
"ParameterDataType": {
"description": "The kind of values a design-space parameter takes.",
"enum": [
"numeric",
"categorical"
],
"title": "ParameterDataType",
"type": "string"
},
"ParameterEntry": {
"additionalProperties": true,
"description": "A parameter dimension of a design space: its identity plus allowed values.\n\nRead from the service only (requests use ``ParameterAssignment``). Fields this version\ndoes not model are kept as extra fields.",
"properties": {
"ref": {
"$ref": "#/$defs/ParameterRef",
"description": "The parameter's structured identity."
},
"dataType": {
"$ref": "#/$defs/ParameterDataType",
"description": "Whether the parameter is numeric or categorical."
},
"constraint": {
"anyOf": [
{
"discriminator": {
"mapping": {
"categorical": "#/$defs/_ReadCategoricalConstraint",
"continuous": "#/$defs/_ReadContinuousConstraint",
"discrete": "#/$defs/_ReadDiscreteConstraint"
},
"propertyName": "type"
},
"oneOf": [
{
"$ref": "#/$defs/_ReadContinuousConstraint"
},
{
"$ref": "#/$defs/_ReadDiscreteConstraint"
},
{
"$ref": "#/$defs/_ReadCategoricalConstraint"
}
]
},
{
"$ref": "#/$defs/UnknownParameterConstraint"
}
],
"description": "The values the parameter may take inside the space. A kind this version does not\nknow yet parses to ``UnknownParameterConstraint``.",
"title": "Constraint"
}
},
"required": [
"ref",
"dataType",
"constraint"
],
"title": "ParameterEntry",
"type": "object"
},
"ParameterRef": {
"description": "The structured identity of a parameter: where it lives, and in what unit.",
"properties": {
"parameterId": {
"description": "The parameter (format ``PRM...``).",
"title": "Parameterid",
"type": "string"
},
"dataTemplateId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The data template (format ``DAT...``) the parameter belongs to. Exactly one of\n``data_template_id`` / ``parameter_group_id`` is set.",
"title": "Datatemplateid"
},
"parameterGroupId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The parameter group (format ``PRG...``) the parameter belongs to. Exactly one of\n``data_template_id`` / ``parameter_group_id`` is set.",
"title": "Parametergroupid"
},
"unitId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The unit (format ``UNI...``) the parameter is expressed in; ``None`` when the\nparameter is unit-less.",
"title": "Unitid"
}
},
"required": [
"parameterId"
],
"title": "ParameterRef",
"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"
},
"UnknownParameterConstraint": {
"additionalProperties": true,
"description": "A parameter constraint of a kind this SDK version does not know yet.\n\nOnly appears in design spaces read from the service: a space written by a newer\nrelease parses with this model in place of the constraint instead of failing, and the\nconstraint keeps every key it carried. Requests never accept it.",
"properties": {
"type": {
"description": "The kind the service reported.",
"title": "Type",
"type": "string"
}
},
"required": [
"type"
],
"title": "UnknownParameterConstraint",
"type": "object"
},
"_ReadCategoricalConstraint": {
"additionalProperties": true,
"description": "A categorical constraint read from the service, keeping unknown fields.",
"properties": {
"type": {
"const": "categorical",
"default": "categorical",
"description": "Constraint kind; fixed to ``categorical``.",
"title": "Type",
"type": "string"
},
"values": {
"description": "The allowed category labels.",
"items": {
"type": "string"
},
"minItems": 1,
"title": "Values",
"type": "array"
}
},
"required": [
"values"
],
"title": "_ReadCategoricalConstraint",
"type": "object"
},
"_ReadContinuousConstraint": {
"additionalProperties": true,
"description": "A continuous constraint read from the service, keeping unknown fields.",
"properties": {
"type": {
"const": "continuous",
"default": "continuous",
"description": "Constraint kind; fixed to ``continuous``.",
"title": "Type",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Smallest allowed value. Omit for no lower bound.",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Largest allowed value. Omit for no upper bound.",
"title": "Max"
}
},
"title": "_ReadContinuousConstraint",
"type": "object"
},
"_ReadDiscreteConstraint": {
"additionalProperties": true,
"description": "A discrete constraint read from the service, keeping unknown fields.",
"properties": {
"type": {
"const": "discrete",
"default": "discrete",
"description": "Constraint kind; fixed to ``discrete``.",
"title": "Type",
"type": "string"
},
"values": {
"description": "The allowed values.",
"items": {
"type": "number"
},
"minItems": 1,
"title": "Values",
"type": "array"
}
},
"required": [
"values"
],
"title": "_ReadDiscreteConstraint",
"type": "object"
}
},
"additionalProperties": true,
"description": "A design space: the bounded envelope a design run samples formulations from.\n\nAlso called the search space or simply the bounds: which ingredients may or must\nappear, the fraction range of each, the allowed values of parameters, and how many\ningredients one formulation may carry.\n\nA space is created as a draft, edited with builder operations, checked for\nfeasibility, and published. A published space is frozen; editing one means forking\nit into a new draft.\n\nFields this version does not model are kept as extra fields when a space 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 design space."
},
"updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the last update of the design space."
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The unique identifier of the design space (format ``DSP...``).",
"title": "Id"
},
"schemaVersion": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Which document shape the record follows. Not a concurrency counter.",
"title": "Schemaversion"
},
"name": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Display name of the design space.",
"title": "Name"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Free-text description of the space's intent.",
"title": "Description"
},
"parentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The project (format ``PRO...``) that owns the space and controls access to it.",
"title": "Parentid"
},
"state": {
"anyOf": [
{
"$ref": "#/$defs/DesignSpaceState"
},
{
"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 space was published; ``None`` while it is a draft.",
"title": "Publishedat"
},
"forkedFromId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The published design space 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 space does not track the dataset afterwards.",
"title": "Derivedfromid"
},
"minCount": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Least ingredients in one formulation. ``None`` leaves the count unbounded below.",
"title": "Mincount"
},
"maxCount": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Most ingredients in one formulation. ``None`` leaves the count unbounded above.",
"title": "Maxcount"
},
"ingredients": {
"anyOf": [
{
"additionalProperties": {
"$ref": "#/$defs/IngredientEntry"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Ingredient dimensions, keyed by inventory ID (format ``INV...``). Empty when absent.",
"title": "Ingredients"
},
"parameters": {
"anyOf": [
{
"additionalProperties": {
"$ref": "#/$defs/ParameterEntry"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Parameter dimensions, keyed by the composite parameter key. Empty when absent.",
"title": "Parameters"
},
"version": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Optimistic-concurrency counter, checked on every write.",
"title": "Version"
}
},
"title": "DesignSpace",
"type": "object"
}
Fields:
-
status(Status | None) -
id(DesignSpaceId | None) -
schema_version(int | None) -
name(str | None) -
description(str | None) -
parent_id(ProjectId | None) -
state(DesignSpaceState | None) -
published_at(datetime | None) -
forked_from_id(DesignSpaceId | None) -
derived_from_id(SmartDatasetId | None) -
min_count(int | None) -
max_count(int | None) -
ingredients(dict[InventoryId, IngredientEntry] | None) -
parameters(dict[str, ParameterEntry] | None) -
version(int | None) -
created(AuditFields | None) -
updated(AuditFields | None)
schema_version
schema_version: int | None = None
Which document shape the record follows. Not a concurrency counter.
parent_id
parent_id: ProjectId | None = None
The project (format PRO...) that owns the space and controls access to it.
state
state: DesignSpaceState | None = None
Lifecycle state: draft (editable) or published (frozen).
published_at
published_at: datetime | None = None
When the space was published; None while it is a draft.
forked_from_id
forked_from_id: DesignSpaceId | None = None
The published design space 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 space does not track the dataset afterwards.
min_count
min_count: int | None = None
Least ingredients in one formulation. None leaves the count unbounded below.
max_count
max_count: int | None = None
Most ingredients in one formulation. None leaves the count unbounded above.
ingredients
ingredients: dict[InventoryId, IngredientEntry] | None = (
None
)
Ingredient dimensions, keyed by inventory ID (format INV...). Empty when absent.
parameters
parameters: dict[str, ParameterEntry] | None = None
Parameter dimensions, keyed by the composite parameter key. Empty when absent.
DesignSpaceViolation
Bases: BaseAlbertModel
A single design-space validation finding.
Show JSON schema:
{
"$defs": {
"DesignSpaceViolationCode": {
"description": "Machine-readable category of a design-space validation finding.",
"enum": [
"infeasible_design_space",
"unknown_reference",
"invalid_constraint",
"feasibility_indeterminate",
"dimension_not_in_dataset",
"dimension_not_modelled",
"duplicate_constraint_subject",
"variable_not_derived",
"internal",
"unsupported_operand"
],
"title": "DesignSpaceViolationCode",
"type": "string"
}
},
"description": "A single design-space validation finding.",
"properties": {
"code": {
"anyOf": [
{
"$ref": "#/$defs/DesignSpaceViolationCode"
},
{
"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 component or dimension 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\nSet on findings from [`apply`][albert.collections.design_spaces.DesignSpaceCollection.apply];\n``None`` when the finding is not tied to an operation.",
"title": "Opindex"
}
},
"required": [
"code",
"message"
],
"title": "DesignSpaceViolation",
"type": "object"
}
Fields:
-
code(DesignSpaceViolationCode | str) -
message(str) -
target_id(str | None) -
components(list[str] | None) -
op_index(int | None)
code
code: DesignSpaceViolationCode | str
Machine-readable category of the finding. A code this version does not know yet is kept as a plain string.
target_id
target_id: str | None = None
The component or dimension the finding is scoped to, when applicable.
components
Component paths (<collection>/<key>) the finding is attributed to.
DesignSpaceCreated
Bases: DesignSpace
A newly created draft design space, with any findings from seeding it.
Show JSON schema:
{
"$defs": {
"AuditFields": {
"description": "The audit fields for a resource",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
}
},
"title": "AuditFields",
"type": "object"
},
"DesignSpaceState": {
"description": "Lifecycle of a design space. Orthogonal to its soft-delete ``status``.",
"enum": [
"draft",
"published"
],
"title": "DesignSpaceState",
"type": "string"
},
"DesignSpaceViolation": {
"description": "A single design-space validation finding.",
"properties": {
"code": {
"anyOf": [
{
"$ref": "#/$defs/DesignSpaceViolationCode"
},
{
"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 component or dimension 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\nSet on findings from [`apply`][albert.collections.design_spaces.DesignSpaceCollection.apply];\n``None`` when the finding is not tied to an operation.",
"title": "Opindex"
}
},
"required": [
"code",
"message"
],
"title": "DesignSpaceViolation",
"type": "object"
},
"DesignSpaceViolationCode": {
"description": "Machine-readable category of a design-space validation finding.",
"enum": [
"infeasible_design_space",
"unknown_reference",
"invalid_constraint",
"feasibility_indeterminate",
"dimension_not_in_dataset",
"dimension_not_modelled",
"duplicate_constraint_subject",
"variable_not_derived",
"internal",
"unsupported_operand"
],
"title": "DesignSpaceViolationCode",
"type": "string"
},
"IngredientAction": {
"description": "How an ingredient participates in formulations drawn from a design space.",
"enum": [
"mustInclude",
"mayInclude",
"exclude"
],
"title": "IngredientAction",
"type": "string"
},
"IngredientEntry": {
"description": "An ingredient dimension of a design space: its action plus fraction bounds.",
"properties": {
"action": {
"$ref": "#/$defs/IngredientAction",
"description": "``mustInclude`` pins the ingredient into every formulation, ``mayInclude`` leaves\nit optional, and ``exclude`` bans it. An excluded ingredient keeps its ``min`` and\n``max``, but they are not applied while it is excluded; they apply again once the\naction changes back to ``mayInclude`` or ``mustInclude``."
},
"min": {
"anyOf": [
{
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Fraction lower bound (0 to 1).",
"title": "Min"
},
"max": {
"anyOf": [
{
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Fraction upper bound (0 to 1).",
"title": "Max"
}
},
"required": [
"action"
],
"title": "IngredientEntry",
"type": "object"
},
"ParameterDataType": {
"description": "The kind of values a design-space parameter takes.",
"enum": [
"numeric",
"categorical"
],
"title": "ParameterDataType",
"type": "string"
},
"ParameterEntry": {
"additionalProperties": true,
"description": "A parameter dimension of a design space: its identity plus allowed values.\n\nRead from the service only (requests use ``ParameterAssignment``). Fields this version\ndoes not model are kept as extra fields.",
"properties": {
"ref": {
"$ref": "#/$defs/ParameterRef",
"description": "The parameter's structured identity."
},
"dataType": {
"$ref": "#/$defs/ParameterDataType",
"description": "Whether the parameter is numeric or categorical."
},
"constraint": {
"anyOf": [
{
"discriminator": {
"mapping": {
"categorical": "#/$defs/_ReadCategoricalConstraint",
"continuous": "#/$defs/_ReadContinuousConstraint",
"discrete": "#/$defs/_ReadDiscreteConstraint"
},
"propertyName": "type"
},
"oneOf": [
{
"$ref": "#/$defs/_ReadContinuousConstraint"
},
{
"$ref": "#/$defs/_ReadDiscreteConstraint"
},
{
"$ref": "#/$defs/_ReadCategoricalConstraint"
}
]
},
{
"$ref": "#/$defs/UnknownParameterConstraint"
}
],
"description": "The values the parameter may take inside the space. A kind this version does not\nknow yet parses to ``UnknownParameterConstraint``.",
"title": "Constraint"
}
},
"required": [
"ref",
"dataType",
"constraint"
],
"title": "ParameterEntry",
"type": "object"
},
"ParameterRef": {
"description": "The structured identity of a parameter: where it lives, and in what unit.",
"properties": {
"parameterId": {
"description": "The parameter (format ``PRM...``).",
"title": "Parameterid",
"type": "string"
},
"dataTemplateId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The data template (format ``DAT...``) the parameter belongs to. Exactly one of\n``data_template_id`` / ``parameter_group_id`` is set.",
"title": "Datatemplateid"
},
"parameterGroupId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The parameter group (format ``PRG...``) the parameter belongs to. Exactly one of\n``data_template_id`` / ``parameter_group_id`` is set.",
"title": "Parametergroupid"
},
"unitId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The unit (format ``UNI...``) the parameter is expressed in; ``None`` when the\nparameter is unit-less.",
"title": "Unitid"
}
},
"required": [
"parameterId"
],
"title": "ParameterRef",
"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"
},
"UnknownParameterConstraint": {
"additionalProperties": true,
"description": "A parameter constraint of a kind this SDK version does not know yet.\n\nOnly appears in design spaces read from the service: a space written by a newer\nrelease parses with this model in place of the constraint instead of failing, and the\nconstraint keeps every key it carried. Requests never accept it.",
"properties": {
"type": {
"description": "The kind the service reported.",
"title": "Type",
"type": "string"
}
},
"required": [
"type"
],
"title": "UnknownParameterConstraint",
"type": "object"
},
"_ReadCategoricalConstraint": {
"additionalProperties": true,
"description": "A categorical constraint read from the service, keeping unknown fields.",
"properties": {
"type": {
"const": "categorical",
"default": "categorical",
"description": "Constraint kind; fixed to ``categorical``.",
"title": "Type",
"type": "string"
},
"values": {
"description": "The allowed category labels.",
"items": {
"type": "string"
},
"minItems": 1,
"title": "Values",
"type": "array"
}
},
"required": [
"values"
],
"title": "_ReadCategoricalConstraint",
"type": "object"
},
"_ReadContinuousConstraint": {
"additionalProperties": true,
"description": "A continuous constraint read from the service, keeping unknown fields.",
"properties": {
"type": {
"const": "continuous",
"default": "continuous",
"description": "Constraint kind; fixed to ``continuous``.",
"title": "Type",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Smallest allowed value. Omit for no lower bound.",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Largest allowed value. Omit for no upper bound.",
"title": "Max"
}
},
"title": "_ReadContinuousConstraint",
"type": "object"
},
"_ReadDiscreteConstraint": {
"additionalProperties": true,
"description": "A discrete constraint read from the service, keeping unknown fields.",
"properties": {
"type": {
"const": "discrete",
"default": "discrete",
"description": "Constraint kind; fixed to ``discrete``.",
"title": "Type",
"type": "string"
},
"values": {
"description": "The allowed values.",
"items": {
"type": "number"
},
"minItems": 1,
"title": "Values",
"type": "array"
}
},
"required": [
"values"
],
"title": "_ReadDiscreteConstraint",
"type": "object"
}
},
"additionalProperties": true,
"description": "A newly created draft design space, 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 design space."
},
"updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the last update of the design space."
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The unique identifier of the design space (format ``DSP...``).",
"title": "Id"
},
"schemaVersion": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Which document shape the record follows. Not a concurrency counter.",
"title": "Schemaversion"
},
"name": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Display name of the design space.",
"title": "Name"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Free-text description of the space's intent.",
"title": "Description"
},
"parentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The project (format ``PRO...``) that owns the space and controls access to it.",
"title": "Parentid"
},
"state": {
"anyOf": [
{
"$ref": "#/$defs/DesignSpaceState"
},
{
"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 space was published; ``None`` while it is a draft.",
"title": "Publishedat"
},
"forkedFromId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The published design space 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 space does not track the dataset afterwards.",
"title": "Derivedfromid"
},
"minCount": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Least ingredients in one formulation. ``None`` leaves the count unbounded below.",
"title": "Mincount"
},
"maxCount": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Most ingredients in one formulation. ``None`` leaves the count unbounded above.",
"title": "Maxcount"
},
"ingredients": {
"anyOf": [
{
"additionalProperties": {
"$ref": "#/$defs/IngredientEntry"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Ingredient dimensions, keyed by inventory ID (format ``INV...``). Empty when absent.",
"title": "Ingredients"
},
"parameters": {
"anyOf": [
{
"additionalProperties": {
"$ref": "#/$defs/ParameterEntry"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Parameter dimensions, keyed by the composite parameter key. Empty when absent.",
"title": "Parameters"
},
"version": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Optimistic-concurrency counter, checked on every write.",
"title": "Version"
},
"warnings": {
"description": "Non-blocking findings from seeding the draft from a smart dataset: one\n``variable_not_derived`` per dataset variable left out, with the reason in\n``message``. Always present; empty for an empty draft.",
"items": {
"$ref": "#/$defs/DesignSpaceViolation"
},
"title": "Warnings",
"type": "array"
}
},
"title": "DesignSpaceCreated",
"type": "object"
}
Fields:
-
status(Status | None) -
created(AuditFields | None) -
updated(AuditFields | None) -
id(DesignSpaceId | None) -
schema_version(int | None) -
name(str | None) -
description(str | None) -
parent_id(ProjectId | None) -
state(DesignSpaceState | None) -
published_at(datetime | None) -
forked_from_id(DesignSpaceId | None) -
derived_from_id(SmartDatasetId | None) -
min_count(int | None) -
max_count(int | None) -
ingredients(dict[InventoryId, IngredientEntry] | None) -
parameters(dict[str, ParameterEntry] | None) -
version(int | None) -
warnings(list[DesignSpaceViolation])
warnings
warnings: list[DesignSpaceViolation]
Non-blocking findings from seeding the draft from a smart dataset: one
variable_not_derived per dataset variable left out, with the reason in
message. Always present; empty for an empty draft.
DesignSpaceValidationResponse
Bases: BaseAlbertModel
Feasibility result for a design space.
Show JSON schema:
{
"$defs": {
"DesignSpaceViolation": {
"description": "A single design-space validation finding.",
"properties": {
"code": {
"anyOf": [
{
"$ref": "#/$defs/DesignSpaceViolationCode"
},
{
"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 component or dimension 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\nSet on findings from [`apply`][albert.collections.design_spaces.DesignSpaceCollection.apply];\n``None`` when the finding is not tied to an operation.",
"title": "Opindex"
}
},
"required": [
"code",
"message"
],
"title": "DesignSpaceViolation",
"type": "object"
},
"DesignSpaceViolationCode": {
"description": "Machine-readable category of a design-space validation finding.",
"enum": [
"infeasible_design_space",
"unknown_reference",
"invalid_constraint",
"feasibility_indeterminate",
"dimension_not_in_dataset",
"dimension_not_modelled",
"duplicate_constraint_subject",
"variable_not_derived",
"internal",
"unsupported_operand"
],
"title": "DesignSpaceViolationCode",
"type": "string"
}
},
"description": "Feasibility result for a design space.",
"properties": {
"valid": {
"description": "Whether the space can produce valid formulations.",
"title": "Valid",
"type": "boolean"
},
"violations": {
"description": "Blocking and non-blocking findings. Empty when the space is feasible.",
"items": {
"$ref": "#/$defs/DesignSpaceViolation"
},
"title": "Violations",
"type": "array"
}
},
"required": [
"valid"
],
"title": "DesignSpaceValidationResponse",
"type": "object"
}
Fields:
violations
violations: list[DesignSpaceViolation]
Blocking and non-blocking findings. Empty when the space is feasible.
DesignSpaceSample
Bases: BaseAlbertModel
A preview sample of formulations drawn from a design space.
Show JSON schema:
Config:
extra:allow
DesignSpaceReferences
Bases: BaseAlbertModel
What references a component of a design space. Powers safe removal.
Show JSON schema:
{
"additionalProperties": true,
"description": "What references a component of a design space. Powers safe removal.",
"properties": {
"references": {
"description": "Component paths (``<collection>/<key>``) that point at the requested component.\nEmpty when nothing does.",
"items": {
"type": "string"
},
"title": "References",
"type": "array"
}
},
"title": "DesignSpaceReferences",
"type": "object"
}
Config:
extra:allow
Fields:
-
references(list[str])
DesignSpaceApplyResponse
Bases: BaseAlbertModel
The result of applying builder operations to a draft design space.
Show JSON schema:
{
"$defs": {
"AuditFields": {
"description": "The audit fields for a resource",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
}
},
"title": "AuditFields",
"type": "object"
},
"DesignSpace": {
"additionalProperties": true,
"description": "A design space: the bounded envelope a design run samples formulations from.\n\nAlso called the search space or simply the bounds: which ingredients may or must\nappear, the fraction range of each, the allowed values of parameters, and how many\ningredients one formulation may carry.\n\nA space is created as a draft, edited with builder operations, checked for\nfeasibility, and published. A published space is frozen; editing one means forking\nit into a new draft.\n\nFields this version does not model are kept as extra fields when a space 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 design space."
},
"updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the last update of the design space."
},
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The unique identifier of the design space (format ``DSP...``).",
"title": "Id"
},
"schemaVersion": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Which document shape the record follows. Not a concurrency counter.",
"title": "Schemaversion"
},
"name": {
"anyOf": [
{
"minLength": 1,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Display name of the design space.",
"title": "Name"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Free-text description of the space's intent.",
"title": "Description"
},
"parentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The project (format ``PRO...``) that owns the space and controls access to it.",
"title": "Parentid"
},
"state": {
"anyOf": [
{
"$ref": "#/$defs/DesignSpaceState"
},
{
"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 space was published; ``None`` while it is a draft.",
"title": "Publishedat"
},
"forkedFromId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The published design space 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 space does not track the dataset afterwards.",
"title": "Derivedfromid"
},
"minCount": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Least ingredients in one formulation. ``None`` leaves the count unbounded below.",
"title": "Mincount"
},
"maxCount": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Most ingredients in one formulation. ``None`` leaves the count unbounded above.",
"title": "Maxcount"
},
"ingredients": {
"anyOf": [
{
"additionalProperties": {
"$ref": "#/$defs/IngredientEntry"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Ingredient dimensions, keyed by inventory ID (format ``INV...``). Empty when absent.",
"title": "Ingredients"
},
"parameters": {
"anyOf": [
{
"additionalProperties": {
"$ref": "#/$defs/ParameterEntry"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "Parameter dimensions, keyed by the composite parameter key. Empty when absent.",
"title": "Parameters"
},
"version": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Optimistic-concurrency counter, checked on every write.",
"title": "Version"
}
},
"title": "DesignSpace",
"type": "object"
},
"DesignSpaceState": {
"description": "Lifecycle of a design space. Orthogonal to its soft-delete ``status``.",
"enum": [
"draft",
"published"
],
"title": "DesignSpaceState",
"type": "string"
},
"DesignSpaceValidationResponse": {
"description": "Feasibility result for a design space.",
"properties": {
"valid": {
"description": "Whether the space can produce valid formulations.",
"title": "Valid",
"type": "boolean"
},
"violations": {
"description": "Blocking and non-blocking findings. Empty when the space is feasible.",
"items": {
"$ref": "#/$defs/DesignSpaceViolation"
},
"title": "Violations",
"type": "array"
}
},
"required": [
"valid"
],
"title": "DesignSpaceValidationResponse",
"type": "object"
},
"DesignSpaceViolation": {
"description": "A single design-space validation finding.",
"properties": {
"code": {
"anyOf": [
{
"$ref": "#/$defs/DesignSpaceViolationCode"
},
{
"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 component or dimension 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\nSet on findings from [`apply`][albert.collections.design_spaces.DesignSpaceCollection.apply];\n``None`` when the finding is not tied to an operation.",
"title": "Opindex"
}
},
"required": [
"code",
"message"
],
"title": "DesignSpaceViolation",
"type": "object"
},
"DesignSpaceViolationCode": {
"description": "Machine-readable category of a design-space validation finding.",
"enum": [
"infeasible_design_space",
"unknown_reference",
"invalid_constraint",
"feasibility_indeterminate",
"dimension_not_in_dataset",
"dimension_not_modelled",
"duplicate_constraint_subject",
"variable_not_derived",
"internal",
"unsupported_operand"
],
"title": "DesignSpaceViolationCode",
"type": "string"
},
"IngredientAction": {
"description": "How an ingredient participates in formulations drawn from a design space.",
"enum": [
"mustInclude",
"mayInclude",
"exclude"
],
"title": "IngredientAction",
"type": "string"
},
"IngredientEntry": {
"description": "An ingredient dimension of a design space: its action plus fraction bounds.",
"properties": {
"action": {
"$ref": "#/$defs/IngredientAction",
"description": "``mustInclude`` pins the ingredient into every formulation, ``mayInclude`` leaves\nit optional, and ``exclude`` bans it. An excluded ingredient keeps its ``min`` and\n``max``, but they are not applied while it is excluded; they apply again once the\naction changes back to ``mayInclude`` or ``mustInclude``."
},
"min": {
"anyOf": [
{
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Fraction lower bound (0 to 1).",
"title": "Min"
},
"max": {
"anyOf": [
{
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Fraction upper bound (0 to 1).",
"title": "Max"
}
},
"required": [
"action"
],
"title": "IngredientEntry",
"type": "object"
},
"ParameterDataType": {
"description": "The kind of values a design-space parameter takes.",
"enum": [
"numeric",
"categorical"
],
"title": "ParameterDataType",
"type": "string"
},
"ParameterEntry": {
"additionalProperties": true,
"description": "A parameter dimension of a design space: its identity plus allowed values.\n\nRead from the service only (requests use ``ParameterAssignment``). Fields this version\ndoes not model are kept as extra fields.",
"properties": {
"ref": {
"$ref": "#/$defs/ParameterRef",
"description": "The parameter's structured identity."
},
"dataType": {
"$ref": "#/$defs/ParameterDataType",
"description": "Whether the parameter is numeric or categorical."
},
"constraint": {
"anyOf": [
{
"discriminator": {
"mapping": {
"categorical": "#/$defs/_ReadCategoricalConstraint",
"continuous": "#/$defs/_ReadContinuousConstraint",
"discrete": "#/$defs/_ReadDiscreteConstraint"
},
"propertyName": "type"
},
"oneOf": [
{
"$ref": "#/$defs/_ReadContinuousConstraint"
},
{
"$ref": "#/$defs/_ReadDiscreteConstraint"
},
{
"$ref": "#/$defs/_ReadCategoricalConstraint"
}
]
},
{
"$ref": "#/$defs/UnknownParameterConstraint"
}
],
"description": "The values the parameter may take inside the space. A kind this version does not\nknow yet parses to ``UnknownParameterConstraint``.",
"title": "Constraint"
}
},
"required": [
"ref",
"dataType",
"constraint"
],
"title": "ParameterEntry",
"type": "object"
},
"ParameterRef": {
"description": "The structured identity of a parameter: where it lives, and in what unit.",
"properties": {
"parameterId": {
"description": "The parameter (format ``PRM...``).",
"title": "Parameterid",
"type": "string"
},
"dataTemplateId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The data template (format ``DAT...``) the parameter belongs to. Exactly one of\n``data_template_id`` / ``parameter_group_id`` is set.",
"title": "Datatemplateid"
},
"parameterGroupId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The parameter group (format ``PRG...``) the parameter belongs to. Exactly one of\n``data_template_id`` / ``parameter_group_id`` is set.",
"title": "Parametergroupid"
},
"unitId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The unit (format ``UNI...``) the parameter is expressed in; ``None`` when the\nparameter is unit-less.",
"title": "Unitid"
}
},
"required": [
"parameterId"
],
"title": "ParameterRef",
"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"
},
"UnknownParameterConstraint": {
"additionalProperties": true,
"description": "A parameter constraint of a kind this SDK version does not know yet.\n\nOnly appears in design spaces read from the service: a space written by a newer\nrelease parses with this model in place of the constraint instead of failing, and the\nconstraint keeps every key it carried. Requests never accept it.",
"properties": {
"type": {
"description": "The kind the service reported.",
"title": "Type",
"type": "string"
}
},
"required": [
"type"
],
"title": "UnknownParameterConstraint",
"type": "object"
},
"_ReadCategoricalConstraint": {
"additionalProperties": true,
"description": "A categorical constraint read from the service, keeping unknown fields.",
"properties": {
"type": {
"const": "categorical",
"default": "categorical",
"description": "Constraint kind; fixed to ``categorical``.",
"title": "Type",
"type": "string"
},
"values": {
"description": "The allowed category labels.",
"items": {
"type": "string"
},
"minItems": 1,
"title": "Values",
"type": "array"
}
},
"required": [
"values"
],
"title": "_ReadCategoricalConstraint",
"type": "object"
},
"_ReadContinuousConstraint": {
"additionalProperties": true,
"description": "A continuous constraint read from the service, keeping unknown fields.",
"properties": {
"type": {
"const": "continuous",
"default": "continuous",
"description": "Constraint kind; fixed to ``continuous``.",
"title": "Type",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Smallest allowed value. Omit for no lower bound.",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Largest allowed value. Omit for no upper bound.",
"title": "Max"
}
},
"title": "_ReadContinuousConstraint",
"type": "object"
},
"_ReadDiscreteConstraint": {
"additionalProperties": true,
"description": "A discrete constraint read from the service, keeping unknown fields.",
"properties": {
"type": {
"const": "discrete",
"default": "discrete",
"description": "Constraint kind; fixed to ``discrete``.",
"title": "Type",
"type": "string"
},
"values": {
"description": "The allowed values.",
"items": {
"type": "number"
},
"minItems": 1,
"title": "Values",
"type": "array"
}
},
"required": [
"values"
],
"title": "_ReadDiscreteConstraint",
"type": "object"
}
},
"description": "The result of applying builder operations to a draft design space.",
"properties": {
"designSpace": {
"$ref": "#/$defs/DesignSpace",
"description": "The resulting design space."
},
"validation": {
"anyOf": [
{
"$ref": "#/$defs/DesignSpaceValidationResponse"
},
{
"type": "null"
}
],
"default": null,
"description": "The feasibility check, present when one was asked for."
},
"warnings": {
"description": "Non-blocking findings. Always present; empty when there are none.",
"items": {
"$ref": "#/$defs/DesignSpaceViolation"
},
"title": "Warnings",
"type": "array"
},
"preview": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"description": "A sample of formulations, present when a preview was asked for.",
"title": "Preview"
}
},
"required": [
"designSpace"
],
"title": "DesignSpaceApplyResponse",
"type": "object"
}
Fields:
-
design_space(DesignSpace) -
validation(DesignSpaceValidationResponse | None) -
warnings(list[DesignSpaceViolation]) -
preview(dict[str, Any] | None)
validation
validation: DesignSpaceValidationResponse | None = None
The feasibility check, present when one was asked for.
warnings
warnings: list[DesignSpaceViolation]
Non-blocking findings. Always present; empty when there are none.
SetIngredientOperation
Bases: _DesignSpaceOperationBase
Upsert an ingredient dimension, carrying its action and fraction bounds.
Show JSON schema:
{
"$defs": {
"IngredientAction": {
"description": "How an ingredient participates in formulations drawn from a design space.",
"enum": [
"mustInclude",
"mayInclude",
"exclude"
],
"title": "IngredientAction",
"type": "string"
},
"IngredientEntry": {
"description": "An ingredient dimension of a design space: its action plus fraction bounds.",
"properties": {
"action": {
"$ref": "#/$defs/IngredientAction",
"description": "``mustInclude`` pins the ingredient into every formulation, ``mayInclude`` leaves\nit optional, and ``exclude`` bans it. An excluded ingredient keeps its ``min`` and\n``max``, but they are not applied while it is excluded; they apply again once the\naction changes back to ``mayInclude`` or ``mustInclude``."
},
"min": {
"anyOf": [
{
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Fraction lower bound (0 to 1).",
"title": "Min"
},
"max": {
"anyOf": [
{
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Fraction upper bound (0 to 1).",
"title": "Max"
}
},
"required": [
"action"
],
"title": "IngredientEntry",
"type": "object"
}
},
"additionalProperties": false,
"description": "Upsert an ingredient dimension, carrying its action and fraction bounds.",
"properties": {
"op": {
"const": "setIngredient",
"default": "setIngredient",
"description": "Operation kind; fixed to ``setIngredient``.",
"title": "Op",
"type": "string"
},
"key": {
"description": "The inventory ID (format ``INV...``) of the ingredient to upsert.",
"title": "Key",
"type": "string"
},
"value": {
"$ref": "#/$defs/IngredientEntry",
"description": "The ingredient's action and fraction bounds."
}
},
"required": [
"key",
"value"
],
"title": "SetIngredientOperation",
"type": "object"
}
Fields:
-
op(Literal['setIngredient']) -
key(InventoryId) -
value(IngredientEntry)
ParameterAssignment
Bases: BaseAlbertModel
The values a setParameter operation allows on a parameter.
Show JSON schema:
{
"$defs": {
"CategoricalConstraint": {
"additionalProperties": false,
"description": "A parameter restricted to an explicit set of category labels.",
"properties": {
"type": {
"const": "categorical",
"default": "categorical",
"description": "Constraint kind; fixed to ``categorical``.",
"title": "Type",
"type": "string"
},
"values": {
"description": "The allowed category labels.",
"items": {
"type": "string"
},
"minItems": 1,
"title": "Values",
"type": "array"
}
},
"required": [
"values"
],
"title": "CategoricalConstraint",
"type": "object"
},
"ContinuousConstraint": {
"additionalProperties": false,
"description": "A numeric parameter restricted to a range. Either bound may be omitted.",
"properties": {
"type": {
"const": "continuous",
"default": "continuous",
"description": "Constraint kind; fixed to ``continuous``.",
"title": "Type",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Smallest allowed value. Omit for no lower bound.",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Largest allowed value. Omit for no upper bound.",
"title": "Max"
}
},
"title": "ContinuousConstraint",
"type": "object"
},
"DiscreteConstraint": {
"additionalProperties": false,
"description": "A numeric parameter restricted to an explicit set of numbers.",
"properties": {
"type": {
"const": "discrete",
"default": "discrete",
"description": "Constraint kind; fixed to ``discrete``.",
"title": "Type",
"type": "string"
},
"values": {
"description": "The allowed values.",
"items": {
"type": "number"
},
"minItems": 1,
"title": "Values",
"type": "array"
}
},
"required": [
"values"
],
"title": "DiscreteConstraint",
"type": "object"
},
"ParameterDataType": {
"description": "The kind of values a design-space parameter takes.",
"enum": [
"numeric",
"categorical"
],
"title": "ParameterDataType",
"type": "string"
}
},
"additionalProperties": false,
"description": "The values a ``setParameter`` operation allows on a parameter.",
"properties": {
"dataType": {
"$ref": "#/$defs/ParameterDataType",
"description": "Whether the parameter is numeric or categorical."
},
"constraint": {
"description": "The values the parameter may take inside the space.",
"discriminator": {
"mapping": {
"categorical": "#/$defs/CategoricalConstraint",
"continuous": "#/$defs/ContinuousConstraint",
"discrete": "#/$defs/DiscreteConstraint"
},
"propertyName": "type"
},
"oneOf": [
{
"$ref": "#/$defs/ContinuousConstraint"
},
{
"$ref": "#/$defs/DiscreteConstraint"
},
{
"$ref": "#/$defs/CategoricalConstraint"
}
],
"title": "Constraint"
}
},
"required": [
"dataType",
"constraint"
],
"title": "ParameterAssignment",
"type": "object"
}
Config:
extra:forbid
Fields:
SetParameterOperation
Bases: _DesignSpaceOperationBase
Upsert a parameter dimension, taking the parts of its identity as fields.
Exactly one of data_template_id / parameter_group_id is set.
Show JSON schema:
{
"$defs": {
"CategoricalConstraint": {
"additionalProperties": false,
"description": "A parameter restricted to an explicit set of category labels.",
"properties": {
"type": {
"const": "categorical",
"default": "categorical",
"description": "Constraint kind; fixed to ``categorical``.",
"title": "Type",
"type": "string"
},
"values": {
"description": "The allowed category labels.",
"items": {
"type": "string"
},
"minItems": 1,
"title": "Values",
"type": "array"
}
},
"required": [
"values"
],
"title": "CategoricalConstraint",
"type": "object"
},
"ContinuousConstraint": {
"additionalProperties": false,
"description": "A numeric parameter restricted to a range. Either bound may be omitted.",
"properties": {
"type": {
"const": "continuous",
"default": "continuous",
"description": "Constraint kind; fixed to ``continuous``.",
"title": "Type",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Smallest allowed value. Omit for no lower bound.",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Largest allowed value. Omit for no upper bound.",
"title": "Max"
}
},
"title": "ContinuousConstraint",
"type": "object"
},
"DiscreteConstraint": {
"additionalProperties": false,
"description": "A numeric parameter restricted to an explicit set of numbers.",
"properties": {
"type": {
"const": "discrete",
"default": "discrete",
"description": "Constraint kind; fixed to ``discrete``.",
"title": "Type",
"type": "string"
},
"values": {
"description": "The allowed values.",
"items": {
"type": "number"
},
"minItems": 1,
"title": "Values",
"type": "array"
}
},
"required": [
"values"
],
"title": "DiscreteConstraint",
"type": "object"
},
"ParameterAssignment": {
"additionalProperties": false,
"description": "The values a ``setParameter`` operation allows on a parameter.",
"properties": {
"dataType": {
"$ref": "#/$defs/ParameterDataType",
"description": "Whether the parameter is numeric or categorical."
},
"constraint": {
"description": "The values the parameter may take inside the space.",
"discriminator": {
"mapping": {
"categorical": "#/$defs/CategoricalConstraint",
"continuous": "#/$defs/ContinuousConstraint",
"discrete": "#/$defs/DiscreteConstraint"
},
"propertyName": "type"
},
"oneOf": [
{
"$ref": "#/$defs/ContinuousConstraint"
},
{
"$ref": "#/$defs/DiscreteConstraint"
},
{
"$ref": "#/$defs/CategoricalConstraint"
}
],
"title": "Constraint"
}
},
"required": [
"dataType",
"constraint"
],
"title": "ParameterAssignment",
"type": "object"
},
"ParameterDataType": {
"description": "The kind of values a design-space parameter takes.",
"enum": [
"numeric",
"categorical"
],
"title": "ParameterDataType",
"type": "string"
}
},
"additionalProperties": false,
"description": "Upsert a parameter dimension, taking the parts of its identity as fields.\n\nExactly one of ``data_template_id`` / ``parameter_group_id`` is set.",
"properties": {
"op": {
"const": "setParameter",
"default": "setParameter",
"description": "Operation kind; fixed to ``setParameter``.",
"title": "Op",
"type": "string"
},
"parameterId": {
"description": "The parameter (format ``PRM...``) to upsert.",
"title": "Parameterid",
"type": "string"
},
"dataTemplateId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The data template (format ``DAT...``) the parameter belongs to, or ``None``.",
"title": "Datatemplateid"
},
"parameterGroupId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The parameter group (format ``PRG...``) the parameter belongs to, or ``None``.",
"title": "Parametergroupid"
},
"unitId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The unit (format ``UNI...``) the parameter is expressed in, or ``None``.",
"title": "Unitid"
},
"value": {
"$ref": "#/$defs/ParameterAssignment",
"description": "The parameter's data type and allowed values."
}
},
"required": [
"parameterId",
"dataTemplateId",
"parameterGroupId",
"unitId",
"value"
],
"title": "SetParameterOperation",
"type": "object"
}
Fields:
-
op(Literal['setParameter']) -
parameter_id(ParameterId) -
data_template_id(DataTemplateId | None) -
parameter_group_id(ParameterGroupId | None) -
unit_id(UnitId | None) -
value(ParameterAssignment)
data_template_id
data_template_id: DataTemplateId | None
The data template (format DAT...) the parameter belongs to, or None.
parameter_group_id
parameter_group_id: ParameterGroupId | None
The parameter group (format PRG...) the parameter belongs to, or None.
SetCountBoundsOperation
Bases: _DesignSpaceOperationBase
Set or clear a design space's ingredient-count bounds.
Pass None for a bound to clear it; leave a bound unset to keep it unchanged.
Show JSON schema:
{
"additionalProperties": false,
"description": "Set or clear a design space's ingredient-count bounds.\n\nPass ``None`` for a bound to clear it; leave a bound unset to keep it unchanged.",
"properties": {
"op": {
"const": "setCountBounds",
"default": "setCountBounds",
"description": "Operation kind; fixed to ``setCountBounds``.",
"title": "Op",
"type": "string"
},
"minCount": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Least ingredients in one formulation; ``None`` clears the bound.",
"title": "Mincount"
},
"maxCount": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Most ingredients in one formulation; ``None`` clears the bound.",
"title": "Maxcount"
}
},
"title": "SetCountBoundsOperation",
"type": "object"
}
Fields:
Validators:
-
_at_least_one_bound
RemoveComponentOperation
Bases: _DesignSpaceOperationBase
Remove an ingredient or parameter from a design space by its path.
Show JSON schema:
{
"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"
}
Fields:
UpdateComponentOperation
Bases: _DesignSpaceOperationBase
Change one field of a design-space component in place.
Show JSON schema:
{
"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"
}
Fields:
CreateDesignSpaceRequest
Bases: BaseAlbertModel
The details needed to create a draft design space.
Show JSON schema:
{
"additionalProperties": false,
"description": "The details needed to create a draft design space.",
"properties": {
"name": {
"description": "Display name of the design space.",
"minLength": 1,
"title": "Name",
"type": "string"
},
"parentId": {
"description": "The project (format ``PRO...``) that owns the space.",
"title": "Parentid",
"type": "string"
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Free-text description of the space's intent.",
"title": "Description"
},
"smartDatasetId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Smart dataset (format ``SDT...``) whose contents seed the first draft.",
"title": "Smartdatasetid"
}
},
"required": [
"name",
"parentId"
],
"title": "CreateDesignSpaceRequest",
"type": "object"
}
Config:
extra:forbid
Fields:
-
name(str) -
parent_id(ProjectId) -
description(str | None) -
smart_dataset_id(SmartDatasetId | None)
smart_dataset_id
smart_dataset_id: SmartDatasetId | None = None
Smart dataset (format SDT...) whose contents seed the first draft.
DesignSpaceForkRequest
Bases: BaseAlbertModel
The details of a design-space fork.
Show JSON schema:
{
"additionalProperties": false,
"description": "The details of a design-space 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": "DesignSpaceForkRequest",
"type": "object"
}
Config:
extra:forbid
Fields:
parent_id
parent_id: ProjectId | None = None
Target project (format PRO...) for the fork. None keeps the source's project.
DesignSpaceValidationRequest
Bases: BaseAlbertModel
Optional extra context for a design-space feasibility check.
Show JSON schema:
{
"additionalProperties": false,
"description": "Optional extra context for a design-space feasibility check.",
"properties": {
"smartDatasetId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Smart dataset (format ``SDT...``) to check the space against; not applied yet.",
"title": "Smartdatasetid"
},
"designModelConfigId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Design model config to check the space against; not applied yet.",
"title": "Designmodelconfigid"
}
},
"title": "DesignSpaceValidationRequest",
"type": "object"
}
Config:
extra:forbid
Fields:
-
smart_dataset_id(SmartDatasetId | None) -
design_model_config_id(str | None)
smart_dataset_id
smart_dataset_id: SmartDatasetId | None = None
Smart dataset (format SDT...) to check the space against; not applied yet.
design_model_config_id
design_model_config_id: str | None = None
Design model config to check the space against; not applied yet.
DesignSpaceSampleRequest
Bases: BaseAlbertModel
The size of a design-space sample preview.
Show JSON schema:
{
"additionalProperties": false,
"description": "The size of a design-space sample preview.",
"properties": {
"numSamples": {
"default": 10,
"description": "Number of formulations to draw (1 to 25).",
"maximum": 25,
"minimum": 1,
"title": "Numsamples",
"type": "integer"
}
},
"title": "DesignSpaceSampleRequest",
"type": "object"
}
Config:
extra:forbid
Fields:
DesignSpacePreviewRequest
Bases: BaseAlbertModel
A sample preview folded into an apply result.
Show JSON schema:
{
"additionalProperties": false,
"description": "A sample preview folded into an apply result.",
"properties": {
"numSamples": {
"default": 10,
"description": "Number of formulations to draw (1 to 25).",
"maximum": 25,
"minimum": 1,
"title": "Numsamples",
"type": "integer"
}
},
"title": "DesignSpacePreviewRequest",
"type": "object"
}
Config:
extra:forbid
Fields:
DesignSpaceOperationsRequest
Bases: BaseAlbertModel
An ordered list of builder operations to apply to a draft design space.
Show JSON schema:
{
"$defs": {
"CategoricalConstraint": {
"additionalProperties": false,
"description": "A parameter restricted to an explicit set of category labels.",
"properties": {
"type": {
"const": "categorical",
"default": "categorical",
"description": "Constraint kind; fixed to ``categorical``.",
"title": "Type",
"type": "string"
},
"values": {
"description": "The allowed category labels.",
"items": {
"type": "string"
},
"minItems": 1,
"title": "Values",
"type": "array"
}
},
"required": [
"values"
],
"title": "CategoricalConstraint",
"type": "object"
},
"ContinuousConstraint": {
"additionalProperties": false,
"description": "A numeric parameter restricted to a range. Either bound may be omitted.",
"properties": {
"type": {
"const": "continuous",
"default": "continuous",
"description": "Constraint kind; fixed to ``continuous``.",
"title": "Type",
"type": "string"
},
"min": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Smallest allowed value. Omit for no lower bound.",
"title": "Min"
},
"max": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Largest allowed value. Omit for no upper bound.",
"title": "Max"
}
},
"title": "ContinuousConstraint",
"type": "object"
},
"DesignSpacePreviewRequest": {
"additionalProperties": false,
"description": "A sample preview folded into an apply result.",
"properties": {
"numSamples": {
"default": 10,
"description": "Number of formulations to draw (1 to 25).",
"maximum": 25,
"minimum": 1,
"title": "Numsamples",
"type": "integer"
}
},
"title": "DesignSpacePreviewRequest",
"type": "object"
},
"DiscreteConstraint": {
"additionalProperties": false,
"description": "A numeric parameter restricted to an explicit set of numbers.",
"properties": {
"type": {
"const": "discrete",
"default": "discrete",
"description": "Constraint kind; fixed to ``discrete``.",
"title": "Type",
"type": "string"
},
"values": {
"description": "The allowed values.",
"items": {
"type": "number"
},
"minItems": 1,
"title": "Values",
"type": "array"
}
},
"required": [
"values"
],
"title": "DiscreteConstraint",
"type": "object"
},
"IngredientAction": {
"description": "How an ingredient participates in formulations drawn from a design space.",
"enum": [
"mustInclude",
"mayInclude",
"exclude"
],
"title": "IngredientAction",
"type": "string"
},
"IngredientEntry": {
"description": "An ingredient dimension of a design space: its action plus fraction bounds.",
"properties": {
"action": {
"$ref": "#/$defs/IngredientAction",
"description": "``mustInclude`` pins the ingredient into every formulation, ``mayInclude`` leaves\nit optional, and ``exclude`` bans it. An excluded ingredient keeps its ``min`` and\n``max``, but they are not applied while it is excluded; they apply again once the\naction changes back to ``mayInclude`` or ``mustInclude``."
},
"min": {
"anyOf": [
{
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Fraction lower bound (0 to 1).",
"title": "Min"
},
"max": {
"anyOf": [
{
"maximum": 1,
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Fraction upper bound (0 to 1).",
"title": "Max"
}
},
"required": [
"action"
],
"title": "IngredientEntry",
"type": "object"
},
"ParameterAssignment": {
"additionalProperties": false,
"description": "The values a ``setParameter`` operation allows on a parameter.",
"properties": {
"dataType": {
"$ref": "#/$defs/ParameterDataType",
"description": "Whether the parameter is numeric or categorical."
},
"constraint": {
"description": "The values the parameter may take inside the space.",
"discriminator": {
"mapping": {
"categorical": "#/$defs/CategoricalConstraint",
"continuous": "#/$defs/ContinuousConstraint",
"discrete": "#/$defs/DiscreteConstraint"
},
"propertyName": "type"
},
"oneOf": [
{
"$ref": "#/$defs/ContinuousConstraint"
},
{
"$ref": "#/$defs/DiscreteConstraint"
},
{
"$ref": "#/$defs/CategoricalConstraint"
}
],
"title": "Constraint"
}
},
"required": [
"dataType",
"constraint"
],
"title": "ParameterAssignment",
"type": "object"
},
"ParameterDataType": {
"description": "The kind of values a design-space parameter takes.",
"enum": [
"numeric",
"categorical"
],
"title": "ParameterDataType",
"type": "string"
},
"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"
},
"SetCountBoundsOperation": {
"additionalProperties": false,
"description": "Set or clear a design space's ingredient-count bounds.\n\nPass ``None`` for a bound to clear it; leave a bound unset to keep it unchanged.",
"properties": {
"op": {
"const": "setCountBounds",
"default": "setCountBounds",
"description": "Operation kind; fixed to ``setCountBounds``.",
"title": "Op",
"type": "string"
},
"minCount": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Least ingredients in one formulation; ``None`` clears the bound.",
"title": "Mincount"
},
"maxCount": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Most ingredients in one formulation; ``None`` clears the bound.",
"title": "Maxcount"
}
},
"title": "SetCountBoundsOperation",
"type": "object"
},
"SetIngredientOperation": {
"additionalProperties": false,
"description": "Upsert an ingredient dimension, carrying its action and fraction bounds.",
"properties": {
"op": {
"const": "setIngredient",
"default": "setIngredient",
"description": "Operation kind; fixed to ``setIngredient``.",
"title": "Op",
"type": "string"
},
"key": {
"description": "The inventory ID (format ``INV...``) of the ingredient to upsert.",
"title": "Key",
"type": "string"
},
"value": {
"$ref": "#/$defs/IngredientEntry",
"description": "The ingredient's action and fraction bounds."
}
},
"required": [
"key",
"value"
],
"title": "SetIngredientOperation",
"type": "object"
},
"SetParameterOperation": {
"additionalProperties": false,
"description": "Upsert a parameter dimension, taking the parts of its identity as fields.\n\nExactly one of ``data_template_id`` / ``parameter_group_id`` is set.",
"properties": {
"op": {
"const": "setParameter",
"default": "setParameter",
"description": "Operation kind; fixed to ``setParameter``.",
"title": "Op",
"type": "string"
},
"parameterId": {
"description": "The parameter (format ``PRM...``) to upsert.",
"title": "Parameterid",
"type": "string"
},
"dataTemplateId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The data template (format ``DAT...``) the parameter belongs to, or ``None``.",
"title": "Datatemplateid"
},
"parameterGroupId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The parameter group (format ``PRG...``) the parameter belongs to, or ``None``.",
"title": "Parametergroupid"
},
"unitId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "The unit (format ``UNI...``) the parameter is expressed in, or ``None``.",
"title": "Unitid"
},
"value": {
"$ref": "#/$defs/ParameterAssignment",
"description": "The parameter's data type and allowed values."
}
},
"required": [
"parameterId",
"dataTemplateId",
"parameterGroupId",
"unitId",
"value"
],
"title": "SetParameterOperation",
"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 space.",
"properties": {
"operations": {
"description": "The operations to apply, in order. Applied atomically.",
"items": {
"discriminator": {
"mapping": {
"removeComponent": "#/$defs/RemoveComponentOperation",
"setCountBounds": "#/$defs/SetCountBoundsOperation",
"setIngredient": "#/$defs/SetIngredientOperation",
"setParameter": "#/$defs/SetParameterOperation",
"updateComponent": "#/$defs/UpdateComponentOperation"
},
"propertyName": "op"
},
"oneOf": [
{
"$ref": "#/$defs/SetIngredientOperation"
},
{
"$ref": "#/$defs/SetParameterOperation"
},
{
"$ref": "#/$defs/SetCountBoundsOperation"
},
{
"$ref": "#/$defs/RemoveComponentOperation"
},
{
"$ref": "#/$defs/UpdateComponentOperation"
}
]
},
"minItems": 1,
"title": "Operations",
"type": "array"
},
"validate": {
"default": false,
"description": "Whether to fold a feasibility check into the result.",
"title": "Validate",
"type": "boolean"
},
"preview": {
"anyOf": [
{
"$ref": "#/$defs/DesignSpacePreviewRequest"
},
{
"type": "null"
}
],
"default": null,
"description": "A sample preview to fold into the result."
},
"dryRun": {
"default": false,
"description": "Compute the would-be result without saving it.",
"title": "Dryrun",
"type": "boolean"
}
},
"required": [
"operations"
],
"title": "DesignSpaceOperationsRequest",
"type": "object"
}
Config:
extra:forbid
Fields:
-
operations(list[DesignSpaceOperation]) -
validate_(bool) -
preview(DesignSpacePreviewRequest | None) -
dry_run(bool)
operations
operations: list[DesignSpaceOperation]
The operations to apply, in order. Applied atomically.