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 example for training FSRS from CSV file #7

Merged
merged 5 commits into from
Nov 4, 2024

Conversation

L-M-Sherlock
Copy link
Member

with open("./revlog.csv", "r") as file:
records = list(csv.DictReader(file))

print(f"revlogs.len() = {len(records)}")
Copy link
Collaborator

@asukaminato0721 asukaminato0721 Nov 4, 2024

Choose a reason for hiding this comment

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

print(f"{len(records) = }")

print(f"Full training time: {end_time - start_time:.2f}s\n")


def group_reviews_by_card(records: List[Dict]) -> Dict[str, List[Tuple[datetime, int]]]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

examples/train_csv.py Outdated Show resolved Hide resolved
examples/train_csv.py Outdated Show resolved Hide resolved
@asukaminato0721 asukaminato0721 merged commit edf48f4 into main Nov 4, 2024
14 of 15 checks passed
@asukaminato0721 asukaminato0721 deleted the add-example-for-training-FSRS-from-csv-file branch November 4, 2024 13:23
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