MCPcopy
hub / github.com/FedML-AI/FedML / load

Method load

python/fedml/model/nlp/model_args.py:106–113  ·  view source on GitHub ↗
(self, input_dir)

Source from the content-addressed store, hash-verified

104 json.dump(self.get_args_for_saving(), f)
105
106 def load(self, input_dir):
107 if input_dir:
108 model_args_file = os.path.join(input_dir, "model_args.json")
109 if os.path.isfile(model_args_file):
110 with open(model_args_file, "r") as f:
111 model_args = json.load(f)
112
113 self.update_from_dict(model_args)
114
115
116@dataclass

Callers 15

from_fileMethod · 0.80
from_directoryMethod · 0.80
get_dataFunction · 0.80
torch_client.pyFile · 0.80
torch_server.pyFile · 0.80
load_pretrained_weightsFunction · 0.80
process_data_fileMethod · 0.80
read_dataFunction · 0.80
mainFunction · 0.80
load_dataFunction · 0.80

Calls 1

update_from_dictMethod · 0.95

Tested by 5

testFunction · 0.64
test_attack_mnistFunction · 0.64
test_defenseFunction · 0.64
test_data_loaderFunction · 0.64