Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix easy days causing load balancer to disproportionately schedule graduates to the furthest day #3643

Merged
merged 2 commits into from
Dec 18, 2024

Conversation

jakeprobst
Copy link
Contributor

@jakeprobst jakeprobst commented Dec 17, 2024

In the case where easy days is effectively disabled (all days are set to the same ease), do not call its corresponding routines.

Take this case of graduating intervals:

Here are the intervals with only the load balancer operating
(format is interval: cards_due_on_day, normalized_weight (raw_weight)):

   10: 86 0.15 (0.000013520822)
   11: 81 0.15 (0.000013855983)
   12: 76 0.16 (0.000014427517)
   13: 73 0.16 (0.000014434805)
   14: 73 0.15 (0.000013403748)
*  15: 58 0.22 (0.000019817679)

However after the easy days logic gets run (but all days are all set to Normal), the intervals become

   10: 86 0.00 (0)
   11: 81 0.00 (0)
   12: 76 0.00 (0)
   13: 73 0.06 (0.000021652208)
   14: 73 0.05 (0.000020105623)
*  15: 58 0.89 (0.0003269917)

We're effectively back to the old problem of graduates getting disproportionately placed on the furthest day due to the inherent dip that is created at that point.

Interestingly, having at least one day changed does provide a reasonable-enough load balance:
monday minimal:

   10: 86 0.04 (0.000045970817)
   11: 81 0.10 (0.00011639028)
   12: 76 0.16 (0.00019332876)
   13: 73 0.19 (0.00023673082)
   14: 73 0.00 (0)
*  15: 58 0.51 (0.0006222751)

tuesday minimal:

   10: 86 0.06 (0.000045970817)
   11: 81 0.14 (0.00011639028)
   12: 76 0.24 (0.00019332876)
   13: 73 0.29 (0.00023673082)
*  14: 73 0.27 (0.0002198215)
   15: 58 0.00 (0)

@jakeprobst jakeprobst changed the title Fix easy days causing load balancer to not load balance Fix easy days causing load balancer to disproportionately schedule graduates at the furthest day Dec 17, 2024
@jakeprobst jakeprobst changed the title Fix easy days causing load balancer to disproportionately schedule graduates at the furthest day Fix easy days causing load balancer to disproportionately schedule graduates to the furthest day Dec 17, 2024
Copy link
Contributor

@L-M-Sherlock L-M-Sherlock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dae
Copy link
Member

dae commented Dec 18, 2024

Thank you both!

@dae dae merged commit 69e699d into ankitects:main Dec 18, 2024
1 check was pending
@jakeprobst jakeprobst mentioned this pull request Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants