Skip to content

bug(core): error for invalid PropertyDomain of DISCRETE_VARIABLE_TYPE is missing the property identifier #1272

Description

@VassilisVassiliadis

Issue Description

I built a custom experiment which contained a malformed propertyDomain for one of the DISCRETE_VARIABLE_TYPE constitutive properties. When I attempted to create a space that uses this experiment I got an error message. Ado complained that one of my DISCRETE_VARIABLE_TYPES had neither values nor an interval specified type.

However, ado did not report the identifier of the offending constitutive property.

To fix the problem, I went over all my DISCRETE_VARIABLE_TYPE constitutive properties and discovered that one of them was missing the propertyDomain.interval definition.

How to reproduce

Steps to reproduce the behavior:

Create a custom experiment with the constitutive property:

```python
total_steps_prop = ConstitutiveProperty(
    identifier="total_steps",
    metadata={"description": "Number of annealing steps per start."},
    propertyDomain=PropertyDomain(
        variableType=VariableTypeEnum.DISCRETE_VARIABLE_TYPE,
        domainRange=[1, 100_000],
       # interval=1, # <-- to fix, uncomment this line
    ),
)

Then create a space for it and observe an exception.

Expected behaviour

Ado should tell me which of my constitutive properties is malformed.

Screenshots/Logs

These are the full logs I got from ado at the default INFO log-level.

% ado create space --new-sample-store -f permopt_emd_experiments/examples/space-multistart_emdqap.yaml
INFO:   A new sample store was requested.
        Sample store default referenced in the space definition will be ignored.
⠹ Initializing DiscoverySpace2026-07-24 10:05:40,049 WARNING   MainThread           load_custom_experiments: load_custom_experiments_from_entry_points: Error when creating custom experiments defined in permopt_emd_experiments.multistart_emd_qap: 1 validation error for PropertyDomain
variableType
  Value error, A DISCRETE_VARIABLE_TYPE had neither values nor interval specified [type=value_error, input_value=<VariableTypeEnum.DISCRET...DISCRETE_VARIABLE_TYPE'>, input_type=VariableTypeEnum]
    For further information visit https://errors.pydantic.dev/2.13/v/value_error
ERROR:  An exception occurred when creating the discovery space: The custom_experiments actuator was found but a match to custom_experiments.multistart_emd_qap_experiment was not found using mode fully_qualified_version.
ERROR:  The following experiment was not found: The custom_experiments actuator was found but a match to custom_experiments.multistart_emd_qap_experiment was not found using mode fully_qualified_version.
HINT:   Check available experiments with ado get experiments

Python/ado/system info

Please include the output of:

python --version = 3.11.10
ado version = 2.0.0
MacOS

Metadata

Metadata

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions