fix(server): serialize nested dict config values as JSON (#28094)
Signed-off-by: Ting Sun <suntcrick@gmail.com>
This commit is contained in:
@@ -4,6 +4,7 @@ Handles merging of YAML configuration files with command-line arguments.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import logging
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, List
|
||||
@@ -151,6 +152,8 @@ class ConfigArgumentMerger:
|
||||
self._add_boolean_arg(args, key, value)
|
||||
elif isinstance(value, list):
|
||||
self._add_list_arg(args, key, value)
|
||||
elif isinstance(value, dict):
|
||||
self._add_scalar_arg(args, key, json.dumps(value))
|
||||
else:
|
||||
self._add_scalar_arg(args, key, value)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user