Skip to content

Commit 6114652

Browse files
committed
CHORE: warn if compact batching is used without momentum in LSQML
1 parent 93ab089 commit 6114652

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/ptychi/api/options/lsqml.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ def check(self, options: "LSQMLOptions"):
8585
"`rescale_probe_intensity_in_first_epoch` and `ProbeOptions.power_constraint` "
8686
"are both enabled, which may lead to unexpected results."
8787
)
88+
if self.batching_mode == enums.BatchingModes.COMPACT and self.momentum_acceleration_gain == 0:
89+
logger.warning(
90+
"`batching_mode` is set to COMPACT but `momentum_acceleration_gain` is 0. "
91+
"Momentum acceleration is strongly recommended for compact batching mode. "
92+
"Start with 0.5."
93+
)
8894

8995
def get_reconstructor_type(self) -> enums.Reconstructors:
9096
return enums.Reconstructors.LSQML

0 commit comments

Comments
 (0)