Skip to content

Commit 856c147

Browse files
committed
Comment-out pre-RNN diagnostics
Added by @ge-dong in #49 (refactored in #50). It is the only MPI-specific code within builder.py
1 parent 057535f commit 856c147

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

plasma/models/builder.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -276,17 +276,18 @@ def slicer_output_shape(input_shape, indices):
276276
activity_regularizer=l2(dense_regularization))(pre_rnn)
277277

278278
pre_rnn_model = Model(inputs=pre_rnn_input, outputs=pre_rnn)
279-
from mpi4py import MPI
280-
comm = MPI.COMM_WORLD
281-
task_index = comm.Get_rank()
282-
if not predict and task_index == 0:
283-
print('Printing out pre_rnn model...')
284-
fr = open('model_architecture.log', 'w')
285-
ori = sys.stdout
286-
sys.stdout = fr
287-
pre_rnn_model.summary()
288-
sys.stdout = ori
289-
fr.close()
279+
# TODO(KGF): uncomment following lines to get summary of pre-RNN model
280+
# from mpi4py import MPI
281+
# comm = MPI.COMM_WORLD
282+
# task_index = comm.Get_rank()
283+
# if not predict and task_index == 0:
284+
# print('Printing out pre_rnn model...')
285+
# fr = open('model_architecture.log', 'w')
286+
# ori = sys.stdout
287+
# sys.stdout = fr
288+
# pre_rnn_model.summary()
289+
# sys.stdout = ori
290+
# fr.close()
290291
# pre_rnn_model.summary()
291292
x_input = Input(batch_shape=batch_input_shape)
292293
# TODO(KGF): Ge moved this inside a new conditional in Dec 2019. check

0 commit comments

Comments
 (0)