File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 2323import argparse
2424import datetime
2525import os
26+ import pprint
2627
2728import toast
2829import toast .config
@@ -80,6 +81,13 @@ def main(opts=None):
8081 default = "main" ,
8182 help = "The operator to run as the 'main'" ,
8283 )
84+ parser .add_argument (
85+ "--dry_run" ,
86+ required = False ,
87+ default = False ,
88+ action = "store_true" ,
89+ help = "If True, log the job config and exit" ,
90+ )
8391
8492 # The operators and templates we want to configure from the command line
8593 # or a parameter file.
@@ -112,6 +120,11 @@ def main(opts=None):
112120 group_size = 1
113121 else :
114122 group_size = comm .size
123+
124+ if otherargs .dry_run :
125+ pprint .pprint (job )
126+ return
127+
115128 toast_comm = toast .Comm (world = comm , groupsize = group_size )
116129 data = toast .Data (comm = toast_comm )
117130
@@ -129,6 +142,7 @@ def main(opts=None):
129142 log .info_rank (f"End of the workflow: { mem } " , comm = comm )
130143 log .info_rank ("Workflow completed in" , comm = comm , timer = timer )
131144
145+ # Cleanup
132146 data .clear ()
133147 del data
134148 toast_comm .close ()
You can’t perform that action at this time.
0 commit comments