designspace.SubspaceInfo#

class designspace.SubspaceInfo(prefix: str, kind: str, member_paths: tuple[str, ...], condition: BoolExpr | None, variant_name: str | None = None)#

Bases: object

One nested region of a space, from Space.subspaces.

A struct, or a choice variant that carries parameters. Either way its members live under a shared path prefix and share one activation condition.

prefix#

The path prefix its members share, such as “opt.sgd.”.

Type:

str

kind#

“struct” or “variant”.

Type:

str

member_paths#

The parameters inside it.

Type:

tuple[str, …]

condition#

When the whole subspace is active, as one expression. For a variant this includes the discriminator equality; None means unconditionally active.

Type:

BoolExpr | None

variant_name#

The variant’s name, for kind == “variant”; otherwise None.

Type:

str | None