@@ -917,22 +917,27 @@ def _build_fake_samples(model, parameter_vector, log_likelihood):
917917 """
918918 Build a minimal list of fake Sample objects for test mode bypass.
919919
920- Creates two samples: the "best" at the prior median and a second
921- with slightly perturbed parameters and worse likelihood, so that
922- SamplesPDF methods like median_pdf work correctly.
920+ Creates a small deterministic sample set: the "best" at the prior
921+ median and additional slightly perturbed parameters with worse
922+ likelihoods. Four samples keeps bypass mode cheap while allowing
923+ downstream structural checks to exercise multi-batch sample handling.
923924 """
924925 from autofit .non_linear .samples .sample import Sample
925926
926- perturbed = [
927- p * 1.001 if p != 0.0 else 0.001 for p in parameter_vector
928- ]
927+ parameter_lists = [parameter_vector ]
928+ for scale in (1.001 , 0.999 , 1.002 ):
929+ parameter_lists .append (
930+ [p * scale if p != 0.0 else scale - 1.0 for p in parameter_vector ]
931+ )
929932
930933 return Sample .from_lists (
931934 model = model ,
932- parameter_lists = [parameter_vector , perturbed ],
933- log_likelihood_list = [log_likelihood , log_likelihood - 1.0 ],
934- log_prior_list = [0.0 , 0.0 ],
935- weight_list = [1.0 , 0.5 ],
935+ parameter_lists = parameter_lists ,
936+ log_likelihood_list = [
937+ log_likelihood - offset for offset in range (len (parameter_lists ))
938+ ],
939+ log_prior_list = [0.0 ] * len (parameter_lists ),
940+ weight_list = [1.0 , 0.5 , 0.25 , 0.125 ],
936941 )
937942
938943 @abstractmethod
0 commit comments