E-IG0100 — Unsupported value for a data generation hint

Error Type

Instance Generation Error

Phase

configuring random instance generation (the default= / options= arguments of Problem.generate_random_dataset / Problem.generate_random_instance)

Python exception

ValueError (builtin)

Message

Unsupported value of type `{type_name}` for a data generation hint.

Possible fix: pass a dict with optional `size`, `value`, and `keys` entries, such as `{"value": (0.0, 1.0)}`.

({type_name} is the Python type name of the rejected value)

Cause

The default= argument, or one of the per-placeholder entries in the options= dictionary, of Problem.generate_random_dataset (or Problem.generate_random_instance) was not a dictionary. Each generation hint must be a dict with up to three optional entries: size (a range of collection sizes), value (a range of element values), and keys (a list of strings, for dictionary placeholders keyed by category labels). Passing a range directly — for example options={"c": (0.0, 1.0)} or default=range(1, 6) — triggers this error, because it is ambiguous whether the range is meant as a size or a value range.

Fix

Wrap the range in a hint dictionary under the intended entry:

problem.generate_random_dataset(
    options={
        "N": {"value": range(10, 20)},
        "c": {"size": range(1, 6), "value": (0.0, 1.0)},
    },
)

All three entries are optional; omit an entry (or the whole hint) to fall back to the defaults.