diff --git a/tests/test_plugins/test_design.py b/tests/test_plugins/test_design.py index 455cb640ad..8de8c83ee2 100644 --- a/tests/test_plugins/test_design.py +++ b/tests/test_plugins/test_design.py @@ -16,7 +16,7 @@ monte_carlo=tdd.MethodMonteCarlo(num_points=5, rng_seed=1), bay_opt=tdd.MethodBayOpt(initial_iter=5, n_iter=2, rng_seed=1), gen_alg=tdd.MethodGenAlg( - solutions_per_pop=4, + solutions_per_pop=6, n_generations=2, n_parents_mating=4, rng_seed=1, @@ -354,6 +354,7 @@ def test_sweep(sweep_method, monkeypatch): # Test multiple return statements for pre and post # Currently not supporting this and intercepting attempts within _extract_output + # Note this requires a "tag1" tag to be in the prediction space with pytest.raises(ValueError): non_td_multi_return = design_space.run(non_td_pre_multi_return, non_td_post_multi_return) @@ -366,7 +367,9 @@ def test_sweep(sweep_method, monkeypatch): # Try with batch output from pre td_batch = design_space.run(scs_pre_batch, scs_post_batch) - td_batch_run_batch = design_space.run_batch(scs_pre_batch, scs_post_batch, path_dir="") + td_batch_run_batch = design_space.run_batch( + scs_pre_batch, scs_post_batch, path_dir="", batch_kwargs={"fake_kwarg": None} + ) # # Test user specified batching works with combined function td_batch_combined = design_space.run(scs_combined_batch) diff --git a/tidy3d/plugins/design/design.py b/tidy3d/plugins/design/design.py index 88efff7aa5..d7d8479869 100644 --- a/tidy3d/plugins/design/design.py +++ b/tidy3d/plugins/design/design.py @@ -466,6 +466,13 @@ def summarize(self, fn_pre: Callable = None) -> dict[str, Any]: # Include additional notes/warnings notes = [] + if isinstance(self.method, MethodGenAlg): + notes.append( + "The maximum run count for MethodGenAlg is difficult to predict." + "Repeated solutions are not executed, reducing the total number of simulations." + "High crossover and mutation probabilities may result in an increased number of simulations, potentially exceeding the predicted maximum run count." + ) + if isinstance(self.method, (MethodBayOpt, MethodGenAlg, MethodParticleSwarm)): if any(isinstance(param, ParameterInt) for param in self.parameters): if any(isinstance(param, ParameterAny) for param in self.parameters):