Skip to content

Commit

Permalink
Do not fill the entire batch to avoid creating unbalanced batches
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmr committed Oct 3, 2023
1 parent 8e0cd78 commit bf8a2b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "trane"
version = "0.17.2"
version = "0.17.3"
edition = "2021"
description = "An automated system for learning complex skills"
license = "AGPL-3.0"
Expand Down
4 changes: 2 additions & 2 deletions src/scheduler/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ impl CandidateFilter {
remainder: Vec<Candidate>,
max_added: Option<usize>,
) {
// The batch is already full, so there's nothing to do.
if final_candidates.len() >= batch_size {
// Do not fill batches past 3/4 of the batch size to avoid creating unbalanced batches.
if final_candidates.len() >= batch_size * 3 / 4 {
return;
}

Expand Down

0 comments on commit bf8a2b0

Please sign in to comment.