MCPcopy Index your code
hub / github.com/openai/guided-diffusion / load

Method load

evaluations/evaluator.py:499–502  ·  view source on GitHub ↗
(cls, path: str, arr_name: str)

Source from the content-addressed store, hash-verified

497
498 @classmethod
499 def load(cls, path: str, arr_name: str):
500 with open(path, "rb") as f:
501 arr = np.load(f)[arr_name]
502 return cls(arr)
503
504 def read_batch(self, batch_size: int) -> Optional[np.ndarray]:
505 if self.idx >= self.arr.shape[0]:

Callers 5

read_statisticsMethod · 0.80
open_npz_arrayFunction · 0.80
load_state_dictFunction · 0.80
__getitem__Method · 0.80
load_data_for_workerFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected