Hello, is there an easier way to convert config ma...
# ask-community
p
Hello, is there an easier way to convert config mapping to include partitions? My current code is here:
Copy code
class ClientConfig(Config):
    client_name: str


@config_mapping
def initial_client_setup_mapping(val: ClientConfig) -> RunConfig:
    return RunConfig(
        ops={
             "op1": val
        }
    )
using static_partitioned_config:
Copy code
@static_partitioned_config(partition_keys=get_client_list())
def partitioned_initial_client_setup_mapping(partition_key: str):
    env = get_client_info_attributes(partition_key).env
    val = ClientConfig(client_name=partition_key, env=env, force_rebuild=False)
    return {

        "ops": {
                "op1": val
        }
Gives me Object of type ClientConfig is not JSON serializable.. is there any way to use the pythonic configs for this?