MCPcopy Create free account
hub / github.com/NVIDIA/FasterTransformer / default

Method default

examples/pytorch/gpt/bloom_lambada.py:33–36  ·  view source on GitHub ↗
(self, obj)

Source from the content-addressed store, hash-verified

31
32class TensorEncoder(json.JSONEncoder):
33 def default(self, obj):
34 if isinstance(obj, torch.Tensor):
35 return obj.tolist()
36 return super().default(obj)
37
38
39class LambadaDataset(torch.utils.data.Dataset):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected