cs = { 'paths': { 'ilastik': '.', }, 'input': { 'directory': 'Y:/TREC_STOP_26_Porto/MobileLab/LSM900/231026_automic/20231026-152512_lowzoom_data/LowZoom', 'files': [ ], 'pattern': '.czi', }, 'setup': [ { 'description': 'Load an ilastik pixel classifier for segmentation', 'method': 'PUT', 'endpoint': 'ilastik/seg/load/', 'params': { 'model_id': 'px_seg_mod', }, 'body': { 'project_file': 'ilastik/px-2d-cAF405-10x.ilp', 'duplicate': False, }, }, ], 'analyze': [ { 'description': 'Run segmentation with ilastik model', 'method': 'PUT', 'endpoint': 'chaeo/with_derived_channels/infer', 'body': { 'api': False, 'keep_interm': True, 'model_id': 'px_seg_mod', 'channel': 0, }, }, ], 'teardown': [ ], } if __name__ == '__main__': import json from pathlib import Path root = Path('C:\\Users\\rhodes\\projects\\proj0015-model-server\\dev\\dev_serverside_batch') fp = root / 'conf.json' with open(fp, 'w') as fh: json.dump(cs, fh, ensure_ascii=True)