Nipype gives you many liberties on how to create workflows, but the execution of them uses a lot of default parameters. But you have of course all the freedom to change them as you like.
Nipype looks for the configuration options in the local folder under the name nipype.cfg
and in ~/.nipype/nipype.cfg
(in this order). It can be divided into Logging and Execution options. A few of the possible options are the following:
For the full list, see Configuration File.
In [ ]:
from nipype import config, logging
config_dict={'execution': {'remove_unnecessary_outputs': 'true',
'keep_inputs': 'false',
'poll_sleep_duration': '60',
'stop_on_first_rerun': 'false',
'hash_method': 'timestamp',
'local_hash_check': 'true',
'create_report': 'true',
'crashdump_dir': '/home/user/crash_folder',
'use_relative_paths': 'false',
'job_finished_timeout': '5'},
'logging': {'workflow_level': 'INFO',
'filemanip_level': 'INFO',
'interface_level': 'INFO',
'log_directory': '/home/user/log_folder',
'log_to_file': 'true'}}
config.update_config(config_dict)
logging.update_logging(config)
In [ ]:
# Change execution parameters
wf.config['execution']['stop_on_first_crash'] = 'true'
# Change logging parameters
wf.config['logging'] = {'workflow_level' : 'DEBUG',
'filemanip_level' : 'DEBUG',
'interface_level' : 'DEBUG',
'log_to_file' : 'True',
'log_directory' : '/home/user/log_folder'}
In [ ]:
bet.config = {'execution': {'keep_unnecessary_outputs': 'false'}}