MLOS icon indicating copy to clipboard operation
MLOS copied to clipboard

mlos_bench: error handling improvement: track config source for environment/service

Open bpkroth opened this issue 2 years ago • 0 comments
trafficstars

When errors are encountered during config loading and setup it can sometimes be hard to identify which config they came from.

For instance, often time we just have a simple KeyError referencing something a few stacks deep for some LocalEnv or RemoteEnv, which could be from any number of places.

As an improvement, when we create an Environment or Service, it would be cool if we also kept track of the location of the config file (if it exists) that helped produce it.

Additionally, although this may clutter the code a little bit, it would be helpful if during setup when we reference portions of those configs (e.g. $tunable_params_map_name) that we first check if it exists and then throw a more human readable error that prints the location of the config that likely produced the source of that error.

bpkroth avatar Jul 25 '23 21:07 bpkroth