Skip to content

Commit ffe30da

Browse files
committed
Removed unexpected indentation from resource scheduler and profiler user docs
1 parent 8f1b104 commit ffe30da

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

doc/users/resource_sched_profiler.rst

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ thread and memory usage: ``num_threads`` and ``estimated_memory_gb``. If a
1616
particular node is expected to use 8 threads and 2 GB of memory:
1717

1818
::
19+
1920
import nipype.pipeline.engine as pe
2021
node = pe.Node()
2122
node.interface.num_threads = 8
@@ -34,6 +35,7 @@ the workflow. The plugin utilizes the plugin arguments ``n_procs`` and
3435
workflow to using 4 cores and 6 GB of RAM:
3536

3637
::
38+
3739
args_dict = {'n_procs' : 4, 'memory_gb' : 6}
3840
workflow.run(plugin='MultiProc', plugin_args=args_dict)
3941

@@ -79,14 +81,15 @@ by setting the ``status_callback`` parameter to point to this function in the
7981
``plugin_args`` when using the ``MultiProc`` plugin.
8082

8183
::
84+
8285
from nipype.pipeline.plugins.callback_log import log_nodes_cb
83-
args_dict = {'n_procs' : 4, 'memory_gb' : 6,
84-
'status_callback' : log_nodes_cb}
86+
args_dict = {'n_procs' : 4, 'memory_gb' : 6, 'status_callback' : log_nodes_cb}
8587

8688
To set the filepath for the callback log the ``'callback'`` logger must be
8789
configured.
8890

8991
::
92+
9093
# Set path to log file
9194
import logging
9295
callback_log_path = '/home/user/run_stats.log'
@@ -98,13 +101,15 @@ configured.
98101
Finally, the workflow can be run.
99102

100103
::
104+
101105
workflow.run(plugin='MultiProc', plugin_args=args_dict)
102106

103107
After the workflow finishes executing, the log file at
104108
"/home/user/run_stats.log" can be parsed for the runtime statistics. Here is an
105109
example of what the contents would look like:
106110

107111
::
112+
108113
{"name":"resample_node","id":"resample_node",
109114
"start":"2016-03-11 21:43:41.682258",
110115
"estimated_memory_gb":2,"num_threads":1}
@@ -135,16 +140,16 @@ The pandas_ Python package is required to use this feature.
135140
.. _pandas: http://pandas.pydata.org/
136141

137142
::
143+
138144
from nipype.pipeline.plugins.callback_log import log_nodes_cb
139-
args_dict = {'n_procs' : 4, 'memory_gb' : 6,
140-
'status_callback' : log_nodes_cb}
145+
args_dict = {'n_procs' : 4, 'memory_gb' : 6, 'status_callback' : log_nodes_cb}
141146
workflow.run(plugin='MultiProc', plugin_args=args_dict)
142147
143148
# ...workflow finishes and writes callback log to '/home/user/run_stats.log'
144149
145150
from nipype.utils.draw_gantt_chart import generate_gantt_chart
146151
generate_gantt_chart('/home/user/run_stats.log', cores=4)
147-
# ...creates gantt chart in '/home/user/run_stats.log.html'
152+
# ...creates gantt chart in '/home/user/run_stats.log.html'
148153

149154
The `generate_gantt_chart`` function will create an html file that can be viewed
150155
in a browser. Below is an example of the gantt chart displayed in a web browser.

0 commit comments

Comments
 (0)