This repository was archived by the owner on Jul 4, 2025. It is now read-only.
fix: add cpu_threads to model.yaml #1845
Merged
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 thewriteKeyValuemethod toWriteKeyValuefor consistency. The most important changes include updates to theModelConfigstructure, YAML handling, and test cases.New Configuration Parameter
cpu_threads:engine/cli/command_line_parser.cc: Addedcpu_threadsto the list of command line options.engine/cli/commands/model_upd_cmd.cc: Added handling for thecpu_threadsparameter in theUpdateConfigmethod.engine/config/model_config.h: UpdatedModelConfigstructure to includecpu_threadswith appropriate serialization and deserialization logic. [1] [2] [3] [4]engine/config/yaml_config.cc: Updated YAML handling to includecpu_threadsinModelConfigFromYamlandUpdateModelConfigmethods. [1] [2] [3]Refactoring
writeKeyValuetoWriteKeyValue:engine/utils/format_utils.h: RenamedwriteKeyValuetoWriteKeyValueand updated variable names for consistency. [1] [2]engine/config/yaml_config.cc: Updated all instances ofwriteKeyValuetoWriteKeyValue.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_threadsin YAML handling and updated existing tests to includecpu_threads. [1] [2] [3] [4] [5] [6]## Describe Your ChangesFixes Issues
Self Checklist