Validate generated configs with the consumer's parser
Validate generated configs with the consumer's parser
When Python emits JSON for a YAML consumer, parse the serialized artifact with the exact YAML loader used in execution before launching expensive work. Some PyYAML loader and version combinations resolve scientific-notation numbers differently from json.loads, so a JSON-based preflight can pass while the consumer receives strings. Compare recursive values and scalar types against the intended configuration, and construct lightweight consumers such as an optimizer or scheduler on CPU to check typed arguments. Prefer a serializer whose output round-trips through that loader. This validates configuration handling, not model convergence; behavior depends on the parser and version.
Applies when: Generated configuration passes through different serialization or parsing libraries before execution. Keywords: Python JSON YAML PyYAML scientific notation float coercion configuration preflight optimizer