build_config#

build_config(x: dict | list[dict | rastervision.pipeline.config.Config] | rastervision.pipeline.config.Config) rastervision.pipeline.config.Config | list[rastervision.pipeline.config.Config][source]#

Build a Config from various types of input.

This is useful for deserializing from JSON. It implements polymorphic deserialization by using the type_hint in each dict to get the corresponding Config class from the registry.

Parameters:

x (dict | list[dict | rastervision.pipeline.config.Config] | rastervision.pipeline.config.Config) – some representation of Config(s)

Returns:

The corresponding Config(s).

Return type:

rastervision.pipeline.config.Config | list[rastervision.pipeline.config.Config]