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

Integrate with Game and Puzzle datasets #32

Merged
merged 5 commits into from
Jul 4, 2024
Merged

Integrate with Game and Puzzle datasets #32

merged 5 commits into from
Jul 4, 2024

Conversation

Xmaster6y
Copy link
Owner

@Xmaster6y Xmaster6y commented Jul 4, 2024

Closes #31

Summary by Sourcery

This pull request integrates the Game and Puzzle datasets, introduces new classes for handling chess puzzles and random sampling, and adds scripts for dataset generation. It also includes refactoring of existing classes and new unit tests to ensure functionality.

  • New Features:
    • Introduced a new Puzzle class with methods for parsing and evaluating chess puzzles.
    • Added RandomSampler class for generating random moves in chess games.
    • Created scripts for generating datasets from Lichess and TCEC sources, with options to push to the Hugging Face hub.
  • Enhancements:
    • Refactored Game class to include class methods for dictionary conversion and board state generation.
    • Enhanced Sampler class with new methods for utility calculation and move selection.
  • Tests:
    • Added unit tests for the RandomSampler class.
    • Introduced unit tests for the Puzzle class to validate puzzle evaluation.
  • Chores:
    • Updated __init__.py to include the new puzzle module.
    • Added a constants file for managing script-related secrets.

Copy link
Contributor

sourcery-ai bot commented Jul 4, 2024

Reviewer's Guide by Sourcery

This pull request integrates the Game and Puzzle datasets by refactoring existing classes and adding new ones. It includes methods for data conversion and evaluation, scripts for dataset generation, and unit tests for the new functionality.

File-Level Changes

Files Changes
src/lczerolens/play/game.py
src/lczerolens/play/puzzle.py
src/lczerolens/play/sampling.py
Refactored existing classes and added new classes for handling Game and Puzzle datasets, including methods for data conversion and evaluation.
scripts/datasets/make_lichess_dataset.py
scripts/datasets/make_tcec_dataset.py
Added scripts for generating and optionally pushing Lichess and TCEC datasets to the hub.
tests/unit/core/test_sampling.py
tests/unit/core/test_puzzle.py
Added unit tests for new and existing functionality in sampling and puzzle modules.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @Xmaster6y - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 3 issues found
  • 🟢 Security: all looks good
  • 🟡 Testing: 4 issues found
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

src/lczerolens/play/puzzle.py Show resolved Hide resolved
src/lczerolens/play/sampling.py Show resolved Hide resolved
scripts/constants.py Show resolved Hide resolved
tests/unit/core/test_puzzle.py Show resolved Hide resolved
tests/unit/core/test_puzzle.py Show resolved Hide resolved
tests/unit/core/test_sampling.py Show resolved Hide resolved
tests/unit/core/test_sampling.py Show resolved Hide resolved
src/lczerolens/play/game.py Show resolved Hide resolved
@Xmaster6y Xmaster6y merged commit aa833d1 into main Jul 4, 2024
1 check passed
@Xmaster6y Xmaster6y deleted the datasets branch July 5, 2024 11:06
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.

Integrate with Game and Puzzle datasets
1 participant