MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / _save_model

Function _save_model

fastdeploy/model_executor/load_weight_utils.py:165–169  ·  view source on GitHub ↗
(model_dict, weight_cache_dir)

Source from the content-addressed store, hash-verified

163def save_model(model_arg_name="model", config_arg_name="fd_config"):
164 @measure_time("Model saving")
165 def _save_model(model_dict, weight_cache_dir):
166 # Note: ProcessGroupNCCL do not support deepcopy protocol, we made modifications here.
167 paddle.distributed.communication.group.Group.__deepcopy__ = lambda self, _: self
168 paddle.distributed.communication.group.Group.to_json = lambda self: repr(self)
169 paddle.save(model_dict, weight_cache_dir)
170
171 def decorator(func):
172 @wraps(func)

Callers 1

wrapperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected