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

release/0.1.2 #42

Merged
merged 1 commit into from
Apr 29, 2024
Merged

release/0.1.2 #42

merged 1 commit into from
Apr 29, 2024

Conversation

shenxiangzhuang
Copy link
Owner

@shenxiangzhuang shenxiangzhuang commented Apr 29, 2024

Summary by CodeRabbit

  • New Features
    • Enhanced performance in ngram counts and prediction-references statistics calculation.
  • Bug Fixes
    • Updated the bleuscore project description for accuracy regarding its speed.
  • Documentation
    • Minor modifications in project documentation to reflect current functionalities.
  • Refactor
    • Improved compute_score function efficiency by using references.
  • Chores
    • Updated software version in Cargo.toml to 0.1.2.

@shenxiangzhuang shenxiangzhuang added the enhancement New feature or request label Apr 29, 2024
@shenxiangzhuang shenxiangzhuang added this to the 0.1.2 milestone Apr 29, 2024
@shenxiangzhuang shenxiangzhuang self-assigned this Apr 29, 2024
Copy link
Contributor

coderabbitai bot commented Apr 29, 2024

Walkthrough

Version 0.1.2 of the bleuscore project brings enhanced efficiency in ngram counting and performance improvements through the use of ahash and rayon. The update also includes a more accurate description of the project's speed in the README and a minor adjustment in the function signature for better Rust practices.

Changes

Files Change Summary
CHANGELOG.md Implemented more efficient ngram counts, updated function signatures, parallelized statistics calculation, and enhanced performance. Minor description update.
Cargo.toml Updated version from "0.1.1" to "0.1.2".
README.md Corrected and updated project description concerning its speed.

🐇💻
To the code that leaps,
Through fields of logic deep,
Version point one-two,
Where speed and function creep.
A hop, a skip, in Rust we trust,
Enhanced, refined, robust.


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between b0fb3f4 and 2c4dba8.
Files selected for processing (3)
  • CHANGELOG.md (1 hunks)
  • Cargo.toml (1 hunks)
  • README.md (1 hunks)
Files skipped from review due to trivial changes (1)
  • Cargo.toml
Additional Context Used
LanguageTool (62)
CHANGELOG.md (5)

Near line 5: Only proper nouns start with an uppercase character (there are exceptions for headlines).
Context: ... in this file. The format is based on [Keep a Changelog](https://keepachangelog.com...


Near line 14: Possible spelling mistake found.
Context: ... - 2024-04-29 ### Changed - Implement ngram counts with a better way (#33) - Rust `...


Near line 16: Possible spelling mistake found.
Context: ...ction-references statistics calculation parallely (#38) - Use ahash for better performanc...


Near line 17: Possible spelling mistake found.
Context: ...stics calculation parallely (#38) - Use ahash for better performance (#39) ## [0.1....


Near line 26: Possible spelling mistake found.
Context: ...b", "rlib"] ## [0.1.0] - 2024-04-23 - BLEU score calculation withTokenizer13a` a...

README.md (57)

Near line 1: Possible spelling mistake found.
Context: # bleuscore [![codecov](https://codecov.io/gh/shen...


Near line 3: A punctuation mark might be missing here.
Context: ...odecov.io/gh/shenxiangzhuang/bleuscore) MIT licensed [![Crates.io](https://img.shields.io/cr...


Near line 10: This sentence does not start with an uppercase letter.
Context: ...//github.com/shenxiangzhuang/bleuscore) is a fast BLEU score calculator written in...


Near line 11: Possible spelling mistake found.
Context: ...om/shenxiangzhuang/bleuscore) is a fast BLEU score calculator written in rust. ## I...


Near line 14: Possible spelling mistake found.
Context: ...e python package has been published to pypi, ...


Near line 15: The preposition “in” seems more likely in this position.
Context: ...uscore/), so we can install it directly with many ways: - pip ```bash pi...


Near line 33: Possible spelling mistake found.
Context: ...k Start The usage is exactly same with [huggingface evaluate](https://huggingface.co/spaces...


Near line 66: Loose punctuation mark.
Context: ...benchmark source code. - rs_bleuscore: bleuscore python library - `local_hf_bl...


Near line 66: Possible spelling mistake found.
Context: ...nchmark source code. - rs_bleuscore: bleuscore python library - local_hf_bleu: huggi...


Near line 67: Possible spelling mistake found.
Context: ...score python library - local_hf_bleu: huggingface evaluate bleu algorithm in local - ...


Near line 67: Possible spelling mistake found.
Context: ...- local_hf_bleu: huggingface evaluate bleu algorithm in local - sacre_bleu: ...


Near line 68: Possible spelling mistake found.
Context: ... algorithm in local - sacre_bleu: sacrebleu - Note that we got different result w...


Near line 69: Possible spelling mistake found.
Context: ... Note that we got different result with sacrebleu in the simple demo data and all the res...


Near line 70: Possible spelling mistake found.
Context: ...rests have same result - hf_evaluate: huggingface evaluate bleu algorithm with **evaluate...


Near line 70: Possible spelling mistake found.
Context: ...t - hf_evaluate: huggingface evaluate bleu algorithm with evaluate package T...


Near line 74: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...as shown before. We can see that as N increase, the bleuscore gets better performance....


Near line 74: Possible spelling mistake found.
Context: ...e. We can see that as N increase, the bleuscore gets better performance. You can naviga...


Near line 113: Possible typo: you repeated a whitespace
Context: ...e.py 100 ``` ### N = 1K ~ 1M | Command | Mean [ms] | Min [ms] | Max [ms] ...


Near line 113: Possible typo: you repeated a whitespace
Context: ...mmand | Mean [ms] | Min [ms] | Max [ms] | ...


Near line 113: Possible typo: you repeated a whitespace
Context: ... Mean [ms] | Min [ms] | Max [ms] | Relative | |:---------------------------...


Near line 115: Possible typo: you repeated a whitespace
Context: ...| | python simple/rs_bleuscore.py 1000 | 20.3 ± 1.3 | 18.2 | 21.4 ...


Near line 115: Possible typo: you repeated a whitespace
Context: ...ython simple/rs_bleuscore.py 1000` | 20.3 ± 1.3 | 18.2 | 21.4 | ...


Near line 115: Possible typo: you repeated a whitespace
Context: ...euscore.py 1000 | 20.3 ± 1.3 | 18.2 | 21.4 | 1.00 | |p...


Near line 115: Possible typo: you repeated a whitespace
Context: ...1000 | 20.3 ± 1.3 | 18.2 | 21.4 | 1.00 | |python simpl...


Near line 115: Possible typo: you repeated a whitespace
Context: ... 20.3 ± 1.3 | 18.2 | 21.4 | 1.00 | | `python simple/local_hf_bleu.py...


Near line 116: Possible typo: you repeated a whitespace
Context: ... | python simple/local_hf_bleu.py 1000 | 45.8 ± 1.2 | 44.2 | 47.5 ...


Near line 116: Possible typo: you repeated a whitespace
Context: ...ython simple/local_hf_bleu.py 1000` | 45.8 ± 1.2 | 44.2 | 47.5 | 2...


Near line 116: Possible typo: you repeated a whitespace
Context: ..._hf_bleu.py 1000 | 45.8 ± 1.2 | 44.2 | 47.5 | 2.26 ± 0.16 | |p...


Near line 116: Possible typo: you repeated a whitespace
Context: ... 1000 | 45.8 ± 1.2 | 44.2 | 47.5 | 2.26 ± 0.16 | |python simpl...


Near line 116: Possible typo: you repeated a whitespace
Context: ... 45.8 ± 1.2 | 44.2 | 47.5 | 2.26 ± 0.16 | | `python simple/rs_bleusc...


Near line 117: Possible typo: you repeated a whitespace
Context: ... | python simple/rs_bleuscore.py 10000 | 37.8 ± 1.5 | 35.9 | 39.5 ...


Near line 117: Possible typo: you repeated a whitespace
Context: ...ython simple/rs_bleuscore.py 10000` | 37.8 ± 1.5 | 35.9 | 39.5 | 1...


Near line 117: Possible typo: you repeated a whitespace
Context: ...euscore.py 10000 | 37.8 ± 1.5 | 35.9 | 39.5 | 1.87 ± 0.14 | |p...


Near line 117: Possible typo: you repeated a whitespace
Context: ...10000 | 37.8 ± 1.5 | 35.9 | 39.5 | 1.87 ± 0.14 | |python simpl...


Near line 117: Possible typo: you repeated a whitespace
Context: ... 37.8 ± 1.5 | 35.9 | 39.5 | 1.87 ± 0.14 | | `python simple/local_hf_...


Near line 118: Possible typo: you repeated a whitespace
Context: ...| python simple/local_hf_bleu.py 10000 | 295.0 ± 5.9 | 288.6 | 304.2 ...


Near line 118: Possible typo: you repeated a whitespace
Context: ...ython simple/local_hf_bleu.py 10000` | 295.0 ± 5.9 | 288.6 | 304.2 | 1...


Near line 118: Possible typo: you repeated a whitespace
Context: ..._hf_bleu.py 10000 | 295.0 ± 5.9 | 288.6 | 304.2 | 14.55 ± 0.98 | |...


Near line 118: Possible typo: you repeated a whitespace
Context: ... 10000 | 295.0 ± 5.9 | 288.6 | 304.2 | 14.55 ± 0.98 | |python simp...


Near line 118: Possible typo: you repeated a whitespace
Context: ... 295.0 ± 5.9 | 288.6 | 304.2 | 14.55 ± 0.98 | | `python simple/rs_bleus...


Near line 119: Possible typo: you repeated a whitespace
Context: ...| python simple/rs_bleuscore.py 100000 | 219.6 ± 3.3 | 215.3 | 224.0 ...


Near line 119: Possible typo: you repeated a whitespace
Context: ...ython simple/rs_bleuscore.py 100000` | 219.6 ± 3.3 | 215.3 | 224.0 | 1...


Near line 119: Possible typo: you repeated a whitespace
Context: ...euscore.py 100000 | 219.6 ± 3.3 | 215.3 | 224.0 | 10.83 ± 0.72 | |...


Near line 119: Possible typo: you repeated a whitespace
Context: ...100000 | 219.6 ± 3.3 | 215.3 | 224.0 | 10.83 ± 0.72 | |python simp...


Near line 119: Possible typo: you repeated a whitespace
Context: ... 219.6 ± 3.3 | 215.3 | 224.0 | 10.83 ± 0.72 | | `python simple/local_hf...


Near line 120: Possible typo: you repeated a whitespace
Context: ... python simple/local_hf_bleu.py 100000 | 2781.4 ± 42.2 | 2723.1 | 2833.0 ...


Near line 120: Possible typo: you repeated a whitespace
Context: ...ython simple/local_hf_bleu.py 100000` | 2781.4 ± 42.2 | 2723.1 | 2833.0 | ...


Near line 120: Possible typo: you repeated a whitespace
Context: ..._hf_bleu.py 100000` | 2781.4 ± 42.2 | 2723.1 | 2833.0 | 137.13 ± 9.10 | | ...


Near line 120: Possible typo: you repeated a whitespace
Context: ... 100000 | 2781.4 ± 42.2 | 2723.1 | 2833.0 | 137.13 ± 9.10 | |python sim...


Near line 120: Possible typo: you repeated a whitespace
Context: ... 2781.4 ± 42.2 | 2723.1 | 2833.0 | 137.13 ± 9.10 | | `python simple/rs_bleu...


Near line 121: Possible typo: you repeated a whitespace
Context: ... python simple/rs_bleuscore.py 1000000 | 2048.8 ± 31.4 | 2013.2 | 2090.3 ...


Near line 121: Possible typo: you repeated a whitespace
Context: ...ython simple/rs_bleuscore.py 1000000` | 2048.8 ± 31.4 | 2013.2 | 2090.3 | ...


Near line 121: Possible typo: you repeated a whitespace
Context: ...euscore.py 1000000` | 2048.8 ± 31.4 | 2013.2 | 2090.3 | 101.01 ± 6.71 | | ...


Near line 121: Possible typo: you repeated a whitespace
Context: ...1000000 | 2048.8 ± 31.4 | 2013.2 | 2090.3 | 101.01 ± 6.71 | |python sim...


Near line 121: Possible typo: you repeated a whitespace
Context: ... 2048.8 ± 31.4 | 2013.2 | 2090.3 | 101.01 ± 6.71 | | `python simple/local_h...


Near line 122: Possible typo: you repeated a whitespace
Context: ..._hf_bleu.py 1000000` | 28285.3 ± 100.9 | 28182.1 | 28396.1 | 1394.51 ± 90.21 | ...


Near line 122: Possible typo: you repeated a whitespace
Context: ... 1000000` | 28285.3 ± 100.9 | 28182.1 | 28396.1 | 1394.51 ± 90.21 |

Additional comments not posted (2)
README.md (2)

11-11: Clarify the description to reflect the project's capabilities accurately.

Ensure the modified description accurately represents the project's capabilities and speed.


Line range hint 33-33: Update the Quick Start guide to use bleuscore consistently.

The changes correctly reflect the transition from using evaluate to bleuscore.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

github-actions bot commented Apr 29, 2024

🐰Bencher

ReportMon, April 29, 2024 at 14:59:06 UTC
Projectbleuscore
Branchrelease/0.1.2
Testbedubuntu-latest

⚠️ WARNING: The following Measure does not have a Threshold. Without a Threshold, no Alerts will ever be generated!

  • Latency (latency)

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns)
bleu::benchmark::bench_batch_bleu➖ (view plot)14,751,823.00
bleu::benchmark::bench_bleu➖ (view plot)305,379.00
ngram::benchmark::bench_ngram➖ (view plot)56,731.00
tokenizer::benchmark::bench_tokenizer➖ (view plot)15,898.00

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

Copy link

codecov bot commented Apr 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.05%. Comparing base (b0fb3f4) to head (2c4dba8).

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #42   +/-   ##
=======================================
  Coverage   85.05%   85.05%           
=======================================
  Files           4        4           
  Lines         368      368           
=======================================
  Hits          313      313           
  Misses         55       55           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

CHANGELOG.md Show resolved Hide resolved
@@ -7,12 +7,16 @@

## [Unreleased]

## [0.1.2] - 2024-04-29


### Changed
- Implement ngram counts with a better way (#33)
- Rust `compute_score` function signature changed to use references (#34)
- Use rayon to run every prediction-references statistics calculation parallely (#38)
Copy link
Contributor

Choose a reason for hiding this comment

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

Correct the spelling of "parallely" to "parallel".

- Use rayon to run every prediction-references statistics calculation parallely (#38)
+ Use rayon to run every prediction-references statistics calculation in parallel (#38)

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
- Use rayon to run every prediction-references statistics calculation parallely (#38)
Use rayon to run every prediction-references statistics calculation in parallel (#38)

README.md Show resolved Hide resolved
@shenxiangzhuang shenxiangzhuang merged commit 16208a9 into master Apr 29, 2024
15 checks passed
@shenxiangzhuang shenxiangzhuang deleted the release/0.1.2 branch April 29, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant