Skip to content

Commit 542c778

Browse files
shnizzedygkiar
andcommitted
📝 Add user docs for random state
Ref FCP-INDI/C-PAC#1496 Co-authored-by: Greg Kiar <[email protected]>
1 parent 10e1303 commit 542c778

File tree

3 files changed

+51
-14
lines changed

3 files changed

+51
-14
lines changed

docs/_sources/user/pipelines/design_a_pipeline.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ Design A Pipeline
1313

1414
C-PAC offers a graphical interface you can use to quickly and easily modify the default pipeline or create your own from scratch: `https://fcp-indi.github.io/C-PAC_GUI/ <https://fcp-indi.github.io/C-PAC_GUI/>`_
1515

16-
.. note::
16+
.. note::
17+
18+
Currently the GUI creates a C-PAC v1.6.0 pipeline configuration file. This syntax persisted through v1.7.2 but is deprecated with the release of v1.8.0.
1719

18-
Currently the GUI creates a C-PAC v1.6.0 pipeline configuration file. This syntax persisted through v1.7.2 but is deprecated with the release of v1.8.0.
20+
If given a pipeline file in the older syntax, C-PAC v1.8 will attempt to convert the pipeline configuration file to the new syntax, saving the converted file in your output directory.
1921

20-
If given a pipeline file in the older syntax, C-PAC v1.8 will attempt to convert the pipeline configuration file to the new syntax, saving the converted file in your output directory.
22+
An update to the GUI to create v1.8.0 syntax configuration files is underway.
2123

22-
An update to the GUI to create v1.8.0 syntax configuration files is underway.
24+
The newer (v1.8) syntax will not work with older versions of C-PAC.
2325

24-
The newer (v1.8) syntax will not work with older versions of C-PAC.
26+
See :ref:`using_a_text_editor` for configuring a custom pipeline without the GUI.
27+
28+
.. seealso::
2529

26-
See :ref:`using_a_text_editor` for configuring a custom pipeline without the GUI.
27-
28-
.. seealso::
29-
30-
:doc:`Details about mapping the older syntax to the new. </user/pipelines/1.7-1.8-nesting-mappings>`
30+
:doc:`Details about mapping the older syntax to the new. </user/pipelines/1.7-1.8-nesting-mappings>`
3131

3232
.. figure:: /_images/gui_home1.png
3333

docs/_sources/user/pipelines/pipeline_config.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,15 @@ Definitions
3939

4040
.. rubric:: Reference
4141

42-
.. bibliography:: /references/glossary.bib
43-
:style: cpac_docs_style
44-
:cited:
45-
:keyprefix: glossary-
42+
.. bibliography:: /references/glossary.bib
43+
:style: cpac_docs_style
44+
:cited:
45+
:keyprefix: glossary-
46+
4647

4748
.. include:: design_a_pipeline.rst
4849

50+
4951
.. _using_a_text_editor:
5052

5153
Using a Text Editor
@@ -109,6 +111,7 @@ Data Management and Environment Settings
109111

110112
* :doc:`Computer Settings </user/compute_config>`
111113
* :doc:`Output Settings </user/output_config>`
114+
* :doc:`Random State </user/pipelines/random_state>`
112115

113116
Pre- and post-processing
114117
'''''''''''''''''''''''''
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Random State
2+
============
3+
4+
When performing reproducibility/variability experiments, it is important to isolate sources of variability. One such source is random state.
5+
6+
Random seed can be set in pipeline config
7+
8+
.. literalinclude:: /references/default_pipeline.yml
9+
:language: YAML
10+
:start-at: pipeline_setup:
11+
:lines: 1
12+
13+
.. literalinclude:: /references/default_pipeline.yml
14+
:language: YAML
15+
:start-at: system_config:
16+
:end-before: # Select Off if you intend to run CPAC on a single machine.
17+
18+
or on the command line with ``--random_seed $SEED``.
19+
20+
Valid options are positive integers up to 2,147,483,647 or the word 'random' (which will set an integer in that range). If not specified, a seed will not be set, and each relevant process will run with an undocumented random seed.
21+
22+
When a seed is set, a ``random.log`` file, including the constant seed and each node the seed was applied to, will be generated in the logging directory.
23+
24+
The following processes currently support this feature:
25+
26+
.. exec::
27+
from CPAC.pipeline.random_state.seed import random_seed_flags, \
28+
set_up_random_state
29+
set_up_random_state('random')
30+
processes = random_seed_flags()
31+
for interface in processes['interfaces'].keys():
32+
print(interface._cmd)
33+
for fxn in processes['functions'].keys():
34+
print('.'.join([fxn.__module__, fxn.__name__]))

0 commit comments

Comments
 (0)