MCPcopy Index your code
hub / github.com/modelscope/FunASR / deep_update

Function deep_update

funasr/utils/misc.py:90–106  ·  view source on GitHub ↗

Recursively merge update dict into original dict (in-place). For nested dicts, merges recursively. For other types, overwrites. Args: original (dict): Target dict to be updated in-place. update (dict): Source dict with new values.

(original, update)

Source from the content-addressed store, hash-verified

88
89
90def deep_update(original, update):
91
92 """Recursively merge update dict into original dict (in-place).
93
94 For nested dicts, merges recursively. For other types, overwrites.
95
96 Args:
97 original (dict): Target dict to be updated in-place.
98 update (dict): Source dict with new values.
99 """
100 for key, value in update.items():
101 if isinstance(value, dict) and key in original:
102 if len(value) == 0:
103 original[key] = value
104 deep_update(original[key], value)
105 else:
106 original[key] = value
107
108
109def prepare_model_dir(**kwargs):

Callers 6

build_modelMethod · 0.90
__call__Method · 0.90
generateMethod · 0.90
inferenceMethod · 0.90
inference_with_vadMethod · 0.90
exportMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…