Skip to content

Commit 6e360d2

Browse files
committed
ENH: extends configuration example
1 parent 8069a82 commit 6e360d2

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

notebooks/basic_configuration.ipynb

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,25 @@
6262
},
6363
"outputs": [],
6464
"source": [
65-
"from nipype import config\n",
66-
"config.set('execution', 'poll_sleep_duration', '2')"
65+
"from nipype import config, logging\n",
66+
"\n",
67+
"config_dict={'execution': {'remove_unnecessary_outputs': 'true',\n",
68+
" 'keep_inputs': 'false',\n",
69+
" 'poll_sleep_duration': '60',\n",
70+
" 'stop_on_first_rerun': 'false',\n",
71+
" 'hash_method': 'timestamp',\n",
72+
" 'local_hash_check': 'true',\n",
73+
" 'create_report': 'true',\n",
74+
" 'crashdump_dir': '/home/user/crash_folder',\n",
75+
" 'use_relative_paths': 'false',\n",
76+
" 'job_finished_timeout': '5'},\n",
77+
" 'logging': {'workflow_level': 'INFO',\n",
78+
" 'filemanip_level': 'INFO',\n",
79+
" 'interface_level': 'INFO',\n",
80+
" 'log_directory': '/home/user/log_folder',\n",
81+
" 'log_to_file': 'true'}}\n",
82+
"config.update_config(config_dict)\n",
83+
"logging.update_logging(config)"
6784
]
6885
},
6986
{
@@ -86,7 +103,15 @@
86103
},
87104
"outputs": [],
88105
"source": [
89-
"wf.config['execution']['stop_on_first_crash'] = 'true'"
106+
"# Change execution parameters\n",
107+
"wf.config['execution']['stop_on_first_crash'] = 'true'\n",
108+
"\n",
109+
"# Change logging parameters\n",
110+
"wf.config['logging'] = {'workflow_level' : 'DEBUG',\n",
111+
" 'filemanip_level' : 'DEBUG',\n",
112+
" 'interface_level' : 'DEBUG',\n",
113+
" 'log_to_file' : 'True',\n",
114+
" 'log_directory' : '/home/user/log_folder'}"
90115
]
91116
},
92117
{

0 commit comments

Comments
 (0)