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

Method activate

classification/ema_deepspeed.py:94–100  ·  view source on GitHub ↗
(self, model)

Source from the content-addressed store, hash-verified

92
93 @contextmanager
94 def activate(self, model):
95 try:
96 self.store(model)
97 self.copy_to(model)
98 yield
99 finally:
100 self.restore(model)

Callers 1

trainFunction · 0.95

Calls 3

storeMethod · 0.95
copy_toMethod · 0.95
restoreMethod · 0.95

Tested by

no test coverage detected