DACBench icon indicating copy to clipboard operation
DACBench copied to clipboard

Unified Way of Serializing Spaces and Samples from Spaces

Open maximilianreimer opened this issue 3 years ago • 2 comments

Currently gym.Spaces as well as the sample drawn from them are serialized to JSON in different ways producing duplicated code and incompatible formats at a different places of the program.

Known serialization code locations:

  • dacbench.abstract_benchmark.AbstractBenchmark.load_config(...)
  • dacbench.abstract_env.AbstractEnv.__init__(...)
  • dacbench.container.container_utils.Encoder and dacbench.container.container_utils.Decoder

Related to #91 and #80

maximilianreimer avatar Nov 02 '21 16:11 maximilianreimer

Serialization of Dict Spaces done by AbstractBenchmark does not work properly. See falling tests in https://github.com/automl/DACBench/tree/container_draft/tests/benchmarks

Should be replace by serialization from dacbench.container.container_utils.Encoderanddacbench.container.container_utils.Decoder` and code should be move somewhere else.

The way of storing spaces will change which requires conversion of existing serialized benchmark configs. We should provide a small script that takes care of this.

Summary:

  • [ ] Change serialization of spaces in benchmark configs to the one in Encoder / Decoder, maybe extend the classes to handle the whole benchmark config?
  • [ ] Add scrip for conversion of old config format to new
  • [ ] Convert old benchmark configs.

maximilianreimer avatar Nov 04 '21 14:11 maximilianreimer

We should implement #80 before we tackle this

TheEimer avatar Dec 02 '21 13:12 TheEimer