fix: add cpu_threads to model.yaml #1845
Open
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.
This pull request introduces a new configuration parameter,
cpu_threads
, to various parts of the codebase, and refactors thewriteKeyValue
method toWriteKeyValue
for consistency. The most important changes include updates to theModelConfig
structure, YAML handling, and test cases.New Configuration Parameter
cpu_threads
:engine/cli/command_line_parser.cc
: Addedcpu_threads
to the list of command line options.engine/cli/commands/model_upd_cmd.cc
: Added handling for thecpu_threads
parameter in theUpdateConfig
method.engine/config/model_config.h
: UpdatedModelConfig
structure to includecpu_threads
with appropriate serialization and deserialization logic. [1] [2] [3] [4]engine/config/yaml_config.cc
: Updated YAML handling to includecpu_threads
inModelConfigFromYaml
andUpdateModelConfig
methods. [1] [2] [3]Refactoring
writeKeyValue
toWriteKeyValue
:engine/utils/format_utils.h
: RenamedwriteKeyValue
toWriteKeyValue
and updated variable names for consistency. [1] [2]engine/config/yaml_config.cc
: Updated all instances ofwriteKeyValue
toWriteKeyValue
.engine/test/components/test_format_utils.cc
: Updated test cases to useWriteKeyValue
.Test Case Updates:
engine/test/components/test_yaml_handler.cc
: Added test cases forcpu_threads
in YAML handling and updated existing tests to includecpu_threads
. [1] [2] [3] [4] [5] [6]## Describe Your ChangesFixes Issues
Self Checklist