-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Feat/Desired retention warning improvements #3995
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
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
37b932f
Feat/90% desired retention warning
Luc-Mcgrady 3e1d95b
Merge branch 'main' into Feat/90%-dr-message
Luc-Mcgrady c0f1e26
Update ftl/core/deck-config.ftl
Luc-Mcgrady 51d9ab5
show on newly enabled
Luc-Mcgrady 8171fae
Show warning on focus
Luc-Mcgrady 989494c
Never hide warning
Luc-Mcgrady 6538645
Display relative change
Luc-Mcgrady 4641b1d
Add: Separate warning for too long and short
Luc-Mcgrady 8d13f63
Merge branch 'main' into Feat/90%-dr-message
Luc-Mcgrady 8f6224f
Revert unchanged text changes
Luc-Mcgrady 5376b5a
interval -> workload
Luc-Mcgrady b1488e4
Remove dead code
Luc-Mcgrady d9dd4d4
fsrs-rs/@L-M-Sherlock's workload calculation
Luc-Mcgrady ee1419b
Added: delay
Luc-Mcgrady c6eeaa0
CONSTANT_CASE
Luc-Mcgrady 03b42a9
Fix: optimized state
Luc-Mcgrady 46ce8af
Removed "Processing"
Luc-Mcgrady ee711d9
Remove dead code
Luc-Mcgrady c0cd197
1 digit precision
Luc-Mcgrady 4b70930
bump fsrs-rs
Luc-Mcgrady 1fbcbf7
typo
Luc-Mcgrady 1da93b6
Apply suggestions from code review
Luc-Mcgrady 65a31b7
Improve rounding
Luc-Mcgrady c709cef
improve comment
Luc-Mcgrady 0ba35cb
rounding <1%
Luc-Mcgrady 6272145
decrease rounding precision
Luc-Mcgrady a49d852
bump ts-fsrs
Luc-Mcgrady 8282a1e
use actual cost values
Luc-Mcgrady f51e914
./check
Luc-Mcgrady 817386c
typo
Luc-Mcgrady 2bd9c34
include relearning
Luc-Mcgrady 2a5fe77
change factor wording
Luc-Mcgrady 247453a
simplify sql
Luc-Mcgrady cb74dec
./check
Luc-Mcgrady dc1489f
Apply suggestions from code review
Luc-Mcgrady ae30fa9
Fix: missing search_cids
Luc-Mcgrady cc3eb83
Merge remote-tracking branch 'upstream/main' into Feat/90%-dr-message
Luc-Mcgrady ea13c74
@dae's style patch
Luc-Mcgrady bb59156
Fix: Doesn't update on arrow keys change
Luc-Mcgrady 4ec35ce
force two lines
Luc-Mcgrady e2a95c7
center two lines
Luc-Mcgrady File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
WITH searched_revlogs AS ( | ||
SELECT * | ||
FROM revlog | ||
Luc-Mcgrady marked this conversation as resolved.
Show resolved
Hide resolved
|
||
WHERE ease > 0 | ||
AND cid IN search_cids | ||
ORDER BY id DESC -- Use the last 10_000 reviews | ||
LIMIT 10000 | ||
), average_pass AS ( | ||
SELECT AVG(time) | ||
FROM searched_revlogs | ||
WHERE ease > 1 | ||
), | ||
lapse_count AS ( | ||
SELECT COUNT(time) AS lapse_count | ||
FROM searched_revlogs | ||
WHERE ease = 1 | ||
AND type = 1 | ||
), | ||
fail_sum AS ( | ||
SELECT SUM(time) AS total_fail_time | ||
FROM searched_revlogs | ||
WHERE ( | ||
ease = 1 | ||
AND type = 1 | ||
) | ||
OR type = 2 | ||
), | ||
-- (sum(Relearning) + sum(Lapses)) / count(Lapses) | ||
average_fail AS ( | ||
SELECT total_fail_time * 1.0 / NULLIF(lapse_count, 0) AS avg_fail_time | ||
FROM fail_sum, | ||
lapse_count | ||
), | ||
-- Can lead to cards with partial learn histories skewing the time | ||
summed_learns AS ( | ||
SELECT cid, | ||
SUM(time) AS total_time | ||
FROM searched_revlogs | ||
WHERE searched_revlogs.type = 0 | ||
GROUP BY cid | ||
), | ||
average_learn AS ( | ||
SELECT AVG(total_time) AS avg_learn_time | ||
FROM summed_learns | ||
) | ||
SELECT * | ||
FROM average_pass, | ||
average_fail, | ||
average_learn; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.