We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 72d65c1 commit 3e94f60Copy full SHA for 3e94f60
sklbench/utils/measurement.py
@@ -92,16 +92,20 @@ def measure_time(
92
f"exceeded time limit ({time_limit} seconds)"
93
)
94
break
95
- from mpi4py import MPI
96
-
97
- if MPI.COMM_WORLD.Get_rank() == 0:
98
- logger.debug(
99
- "iters across n runs: "
100
- + str(iters)
101
- + ", inner iters across n runs: "
102
- + str(inners)
103
- )
104
- logger.debug(times)
+
+ try:
+ from mpi4py import MPI
+ if MPI.COMM_WORLD.Get_rank() == 0:
+ logger.debug(
+ "iters across n runs: "
+ + str(iters)
+ + ", inner iters across n runs: "
+ + str(inners)
105
+ )
106
+ logger.debug(times)
107
+ except ModuleNotFoundError:
108
+ pass
109
# mean, std = box_filter(times)
110
# if std / mean > std_mean_ratio:
111
# logger.warning(
0 commit comments