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

Method read_model_config

fastdeploy/config.py:787–801  ·  view source on GitHub ↗

Read configuration from file.

(self)

Source from the content-addressed store, hash-verified

785 self.reset()
786
787 def read_model_config(self):
788 """
789 Read configuration from file.
790 """
791 self.model_config = {}
792 if not self.enabled_speculative_decoding():
793 return
794
795 self.is_unified_ckpt = check_unified_ckpt(self.model)
796 if self.model is None:
797 return
798
799 self.config_path = os.path.join(self.model, "config.json")
800 if os.path.exists(self.config_path):
801 self.model_config = json.load(open(self.config_path, "r", encoding="utf-8"))
802
803 def reset(self):
804 """

Callers 1

__init__Method · 0.95

Calls 5

check_unified_ckptFunction · 0.90
joinMethod · 0.80
existsMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected