本文整理汇总了Python中nipype.Workflow.config['execution']['remove_unnecessary_files']方法的典型用法代码示例。如果您正苦于以下问题:Python Workflow.config['execution']['remove_unnecessary_files']方法的具体用法?Python Workflow.config['execution']['remove_unnecessary_files']怎么用?Python Workflow.config['execution']['remove_unnecessary_files']使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nipype.Workflow
的用法示例。
在下文中一共展示了Workflow.config['execution']['remove_unnecessary_files']方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: StringIO
# 需要导入模块: from nipype import Workflow [as 别名]
# 或者: from nipype.Workflow import config['execution']['remove_unnecessary_files'] [as 别名]
else:
from io import StringIO
data = StringIO(r.content.decode())
df = pd.read_csv(data)
max_subjects = df.shape[0]
if args.num_subjects:
max_subjects = args.num_subjects
elif ('CIRCLECI' in os.environ and os.environ['CIRCLECI'] == 'true'):
max_subjects = 1
meta_wf = Workflow('metaflow')
count = 0
for row in df.iterrows():
wf = create_workflow(row[1].Subject, sink_dir, row[1]['File Path'])
meta_wf.add_nodes([wf])
print('Added workflow for: {}'.format(row[1].Subject))
count = count + 1
# run this for only one person on CircleCI
if count >= max_subjects:
break
meta_wf.base_dir = work_dir
meta_wf.config['execution']['remove_unnecessary_files'] = False
meta_wf.config['execution']['poll_sleep_duration'] = 2
meta_wf.config['execution']['crashdump_dir'] = work_dir
if args.plugin_args:
meta_wf.run(args.plugin, plugin_args=eval(args.plugin_args))
else:
meta_wf.run(args.plugin)