MCPcopy Create free account
hub / github.com/awslabs/gap-text2sql / restore_part

Method restore_part

rat-sql-gap/seq2struct/utils/saver.py:135–144  ·  view source on GitHub ↗

Restores part of the model from other directory. Useful to initialize part of the model with another pretrained model. Args: other_model_dir: Model directory to load from. remap: dict, remapping current parameters to the other model's.

(self, other_model_dir, remap)

Source from the content-addressed store, hash-verified

133 keep_every_n=self._keep_every_n)
134
135 def restore_part(self, other_model_dir, remap):
136 """Restores part of the model from other directory.
137
138 Useful to initialize part of the model with another pretrained model.
139
140 Args:
141 other_model_dir: Model directory to load from.
142 remap: dict, remapping current parameters to the other model's.
143 """
144 load_and_map_checkpoint(self._items["model"], other_model_dir, remap)

Callers

nothing calls this directly

Calls 1

load_and_map_checkpointFunction · 0.85

Tested by

no test coverage detected