-
Notifications
You must be signed in to change notification settings - Fork 451
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
Support QoS in api_server #877
Conversation
May provide user guide |
Please resolve the linting error |
b7d3c55
to
be610c9
Compare
图像不建议用文件的方式放入repo,这样会导致项目太大了。请使用github图床方式,加入图像的链接 |
|
现在github 图床获取到的链接都是 private-user-images.githubusercontent.com 域名的带过期jwt的图片链接,不适合用于文档,请问是否可以使用第三方图床工具 |
把图像拽到这个PR下的comment栏中,会自动生成一条 url,用这个url就可以了 |
linting的错误还在:
用上面这条命令,能够检查commit之前所有的文件格式规范上的错误,可以在本地修改好一并提交 |
bb50893
to
cf0b7d0
Compare
May improve docstring coverage of qos_engine module |
603d364
to
12fe0f8
Compare
|
||
self.qos_user_group = QosGroupQueue(self.qos_config) | ||
|
||
self.usage_stats = UsageStats(60, 6, 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.
May use key=value
to initiate UsageStats
in order to clarify what 60, 6, 0 are
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.
okk
def dequeue(self, usage_stats): | ||
return self.qos_user_group.dequeue(usage_stats) | ||
|
||
def stop(self): |
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.
When will stop
be called?
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.
it will be deleted
self.user_queue_map[user_id] = collections.deque() | ||
self.user_quota_map[user_id] = item['quota_pct'] / total_quota | ||
|
||
self.lock = threading.Lock() |
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.
self.lock
is defined but not used
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.
It'll be deleted
e1edd15
to
d303ef5
Compare
d303ef5
to
c719ff4
Compare
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.
LGTM after left comments resolved.
661d436
to
270e92d
Compare
270e92d
to
96595f8
Compare
Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily receiving feedbacks. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.
Motivation
The purpose of this commit is to introduce Quality of Service (QoS) functionality. When the system is in an overloaded state, this feature ensures prioritization based on user priority, allowing high-priority users to have precedence. For users with the same priority, resources can be utilized in accordance with the specified ratio.
Modification
BC-breaking (Optional)
Does the modification introduce changes that break the backward-compatibility of the downstream repositories?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.
Use cases (Optional)
If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.
Checklist