MCPcopy Create free account
hub / github.com/eric-mitchell/direct-preference-optimization / __exit__

Method __exit__

utils.py:172–175  ·  view source on GitHub ↗
(self, exc_type, exc_value, traceback)

Source from the content-addressed store, hash-verified

170 np.random.seed(self.seed)
171
172 def __exit__(self, exc_type, exc_value, traceback):
173 # Restore the random state
174 random.setstate(self.stored_state)
175 np.random.set_state(self.stored_np_state)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected