-
Notifications
You must be signed in to change notification settings - Fork 11
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 text length #116
Add text length #116
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #116 +/- ##
==========================================
+ Coverage 82.42% 82.82% +0.39%
==========================================
Files 34 35 +1
Lines 1178 1205 +27
==========================================
+ Hits 971 998 +27
Misses 207 207
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
||
# Metrics about the answer informativeness | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议文件夹的名字写”answer_informativeness“
|
||
def __repr__(self) -> str: | ||
""":return: Formatted string representation of the metric.""" | ||
return f"{self.ALIAS[0]}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这一行后面添加一下注释:”# pragma: no cover“可以跳过codecov的覆盖率检测,避免项目的覆盖率降低 PR不过~
rageval/models/tokenizer.py
Outdated
logger = logging.getLogger(__name__) | ||
|
||
|
||
class Tokenizer(ABC): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个tokenizer只有一个__init__函数,就不用写成一个类了,感觉在用的时候直接实例调用就可以了
|
||
ALIAS = ['text_length'] | ||
|
||
def __init__(self, tokenize_model: str = "Qwen/Qwen2-0.5B-Instruct"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感觉你这里是不是Tokenizer不用写一个类,直接在 class TextLength里面一个成员就好了
No description provided.