E-IG0106 — Value range with inverted bounds
Error Type |
|
|---|---|
Phase |
configuring random instance generation (the |
Python exception |
|
Message
The value range `{range}` has a lower bound greater than its upper bound, or a bound that is not a number.
Possible fix: adjust the bounds so that the lower bound does not exceed the upper bound and neither bound is `NaN`.
({range} shows the range in mathematical interval notation, e.g. [7, 5))
Cause
The value entry of a random-generation hint was recognized, but its lower bound is greater than its upper bound, so the range could never contain any number — for example (7.0, 5.0) or jm.generation.value.closed(1.0, -1.0).
A bound of float("nan") paired with another numeric bound is also rejected here, because nan cannot be ordered against the other endpoint.
Ranges that are empty but ordered, such as jm.generation.value.open(1.0, 1.0), are accepted at this point; if such a range is actually used, generation later fails with E-IG0002.
Fix
Swap or widen the bounds so that the lower bound does not exceed the upper bound, and replace any nan endpoint with a real number:
problem.generate_random_dataset(
options={"c": {"value": (-1.0, 1.0)}}, # not (1.0, -1.0)
)
For a one-sided range, use jm.generation.value.at_least(0.0) or jm.generation.value.at_most(1.0) rather than a nan placeholder bound.