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

Add '--rating-history-db' to save ratings in a DB #65

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dexonsmith
Copy link
Contributor

Add --rating-history-db command-line option to save ratings in an sqlite3 database.

This adds a method to InMemoryStorage to save the rating history. It takes a category string for future use with rating grids, where there's a different InMemoryStorage for each rating category, but for now only OneGameAtATime has been updated.

An aborted implementation used a new storage type OnDiskStorage instead of InMemoryStorage, but it was way too slow to build the table incrementally. Instead, this implementation writes the values in bulk at the end, using a generator expression to visit the rating history.

Add `--rating-history-db` command-line option to save ratings in an sqlite3
database.

This adds a method to InMemoryStorage to save the rating history. It takes a
`category` string for future use with rating grids, where there's a different
InMemoryStorage for each rating category, but for now only `OneGameAtATime` has
been updated.

An aborted implementation used a new storage type OnDiskStorage instead of
InMemoryStorage, but it was way too slow to build the table incrementally.
Instead, this implementation writes the values in bulk at the end, using a
generator expression to visit the rating history.
@dexonsmith dexonsmith requested a review from anoek March 26, 2024 18:35
@anoek
Copy link
Member

anoek commented Apr 28, 2024

Revisiting this - did you have other purposes for this other than the experiment to infer starting ranks? Happy to merge if so, but for that experiment the thing that catches my eye with this is that we're storing the end ratings instead of what they were when they started, for example what their rating was after say 10 games or whatever. If it was just for the experiment, maybe we just close it out, I think we got what we needed already?

@anoek anoek marked this pull request as draft June 2, 2024 10:38
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.

2 participants