MCPcopy Create free account
hub / github.com/OpenGVLab/InternVL / store

Method store

classification/ema_deepspeed.py:66–75  ·  view source on GitHub ↗

Save the current parameters for restoring later. Args: model: A model that parameters will be stored

(self, model)

Source from the content-addressed store, hash-verified

64 assert key not in self.m_name2s_name
65
66 def store(self, model):
67 """
68 Save the current parameters for restoring later.
69 Args:
70 model: A model that parameters will be stored
71 """
72 with GatheredParameters(model.parameters()):
73 if deepspeed.comm.get_rank() == 0:
74 parameters = model.parameters()
75 self.collected_params = [param.clone() for param in parameters]
76
77 def restore(self, model):
78 """

Callers 5

activateMethod · 0.95
_fwd_kernelFunction · 0.80
_bwd_preprocess_do_o_dotFunction · 0.80
_bwd_store_dk_dvFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected