@@ -277,6 +277,10 @@ class SweepProfile(AsyncProfile):
277
277
)
278
278
rate : float = - 1
279
279
rate_type : Literal ["constant" , "poisson" ] = "constant"
280
+ max_rate_adjustment : float = Field (
281
+ default = 1.1 ,
282
+ description = "Multiplier to over-estimate the measured throughput." ,
283
+ )
280
284
281
285
@property
282
286
def strategy_types (self ) -> list [StrategyType ]:
@@ -297,8 +301,10 @@ def next_strategy(self) -> Optional[SchedulingStrategy]:
297
301
)
298
302
299
303
min_rate = self .measured_rates [0 ]
300
- max_rate = self .measured_rates [1 ]
301
- rates = np .linspace (min_rate , max_rate , self .sweep_size - 1 )[1 :]
304
+ max_rate = self .measured_rates [1 ] * self .max_rate_adjustment
305
+
306
+ halving_fractions = 0.5 ** np .arrange (self .sweep_size - 1 )
307
+ rates = ((max_rate - min_rate ) * halving_fractions + min_rate )[1 :]
302
308
303
309
if self .rate_type == "constant" :
304
310
return AsyncConstantStrategy (
@@ -360,6 +366,9 @@ def from_standard_args( # type: ignore[override]
360
366
if "strategy_type" not in kwargs :
361
367
kwargs ["strategy_type" ] = "constant"
362
368
369
+ if "max_rate_percent_adjustment" not in kwargs :
370
+ kwargs ["max_rate_percent_adjustment" ] = 25.0
371
+
363
372
return SweepProfile (sweep_size = int (rate ), random_seed = random_seed , ** kwargs )
364
373
365
374
0 commit comments