def build_config(dataset, datasets_dir, phase, problem=None, output_dir='<STR_LIT>'):
if problem:<EOL><INDENT>full_phase = phase + '<STR_LIT:_>' + problem<EOL><DEDENT>else:<EOL><INDENT>full_phase = phase<EOL><DEDENT>root_dir = os.path.join(datasets_dir, dataset, full_phase)<EOL>problem_root = os.path.join(root_dir, '<STR_LIT>' + phase)<EOL>data_root = os.path.join(root_dir, '<STR_LIT>' + phase)<EOL>config = {<EOL>'<STR_LIT>': problem_root,<EOL>'<STR_LIT>': os.path.join(problem_root, '<STR_LIT>'),<EOL>'<STR_LIT>': os.path.join(data_root, '<STR_LIT>'),<EOL>'<STR_LIT>': os.path.join(output_dir, '<STR_LIT>'),<EOL>'<STR_LIT>': os.path.join(output_dir, '<STR_LIT>'),<EOL>}<EOL>if phase == '<STR_LIT>':<EOL><INDENT>config['<STR_LIT>'] = data_root<EOL>config['<STR_LIT>'] = os.path.join(output_dir, '<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>config['<STR_LIT>'] = data_root<EOL>config['<STR_LIT>'] = os.path.join(output_dir, '<STR_LIT>')<EOL><DEDENT>return config<EOL>
root@d3m-example-pod:/# cat /input/185_baseball/test_config.json
{
  "problem_schema": "/input/TEST/problem_TEST/problemDoc.json",
  "problem_root": "/input/TEST/problem_TEST",
  "dataset_schema": "/input/TEST/dataset_TEST/datasetDoc.json",
  "test_data_root": "/input/TEST/dataset_TEST",
  "results_root": "/output/predictions",
  "executables_root": "/output/executables",
  "temp_storage_root": "/output/supporting_files"
}
root@d3m-example-pod:/# cat /input/185_baseball/search_config.json
{
  "problem_schema": "/input/TRAIN/problem_TRAIN/problemDoc.json",
  "problem_root": "/input/TRAIN/problem_TRAIN",
  "dataset_schema": "/input/TRAIN/dataset_TRAIN/datasetDoc.json",
  "training_data_root": "/input/TRAIN/dataset_TRAIN",
  "pipeline_logs_root": "/output/pipelines",
  "executables_root": "/output/executables",
  "user_problems_root": "/output/user_problems",
  "temp_storage_root": "/output/supporting_files"
}