MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / __init__

Method __init__

models/transformer/wan/text_encoding_batch.py:9–13  ·  view source on GitHub ↗
(self, json_file, text_key)

Source from the content-addressed store, hash-verified

7
8class TextDataset(torch.utils.data.Dataset):
9 def __init__(self, json_file, text_key):
10
11 self.data_list = json.load(open(json_file, 'r'))
12 self.data_list = [data for data in self.data_list if data[text_key] is not None]
13 self.text_key = text_key
14
15 def __getitem__(self, data_id):
16 data = self.data_list[data_id]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected