MCPcopy
hub / github.com/OpenMotionLab/MotionGPT / build_data

Function build_data

mGPT/data/build_data.py:6–15  ·  view source on GitHub ↗
(cfg, phase="train")

Source from the content-addressed store, hash-verified

4
5
6def build_data(cfg, phase="train"):
7 data_config = OmegaConf.to_container(cfg.DATASET, resolve=True)
8 data_config['params'] = {'cfg': cfg, 'phase': phase}
9 if isinstance(data_config['target'], str):
10 return instantiate_from_config(data_config)
11 elif isinstance(data_config['target'], list):
12 data_config_tmp = data_config.copy()
13 data_config_tmp['params']['dataModules'] = data_config['target']
14 data_config_tmp['target'] = 'mGPT.data.Concat.ConcatDataModule'
15 return instantiate_from_config(data_config)

Callers 5

mainFunction · 0.90
mainFunction · 0.90
app.pyFile · 0.90
mainFunction · 0.90
mainFunction · 0.90

Calls 1

instantiate_from_configFunction · 0.90

Tested by 1

mainFunction · 0.72