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.
Thanks for the contribution!
The motivation for calling
engine_config.to_dict()is that we discovered it's an instance ofmmengine.ConfigDict, which is not compatible with the lmdeploy turbomind engine. For reference, see these related PRs:To make this more robust, I'd suggest the following approach:
Additionally, could you please share the steps to reproduce the issue you're addressing? This will help us better understand the context and ensure comprehensive testing.
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.
Thank you for your feedback and for providing the context behind the original implementation.
Here are the detailed steps on how I encountered and reproduced the issue:
I'm new to OpenCompass and was evaluating the performance of the Qwen2.5 model on some datasets. And I use the LMDeploy inference engine for acceleration. I followed the tutorial to create a configuration file (
eval_qwen.py), which I've simplified below.The used execution command is:
As shown in
eval_qwen.py, I tried three ways to specify the engine_config and gen_config parameters:The type of engine_config became tuple. Later I tried to print its content, and the output was:
({'tp': 1},). This means the originally defined dict variable (i.e.,{'tp': 1}) was converted into a tuple form. OpenCompass might have some preprocessing mechanism that I am not yet aware of.According to the definition in the init method (
engine_config: Dict|ConfigDict = {}), ifengine_configis not explicitly specified, it is created by default as{}. Do we have to explicitly specify the values of these parameters?I have just started using OpenCompass and am not very familiar with its specific design and implementation details. I hope this information can be helpful and wish OpenCompass continued improvement and success . Thank you!