Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The comment on line 318 still says "限制最大线程数为32,避免API限流" (limit max threads to 32, avoid API rate limiting), but the original intent of the code was to use
min(os.cpu_count() or 4, 32)— meaning 32 was already the upper bound to avoid API rate limiting. By hardcodingnum_threads = 32, the thread count is now fixed at 32 regardless of the number of available CPUs or tasks, which can cause unnecessary resource consumption on machines with fewer cores (e.g. CI runners with 2–4 CPUs). More critically, the original comment's rationale about avoiding API rate limiting is now inverted: the original code treated 32 as the maximum to stay safe, but the new code always spawns the maximum, which increases the risk of hitting rate limits on the external hiascend.com API. The comment should be updated to reflect this change, or better yet, the originalmin(os.cpu_count() or 4, 32)logic should be preserved to adaptively scale threads based on the machine.