added rl config (Use RL for model training #586) #650
+2,950
−0
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.

[Feat] Add Reinforcement Learning Configuration Options for Classifier Training
FIX
Link to related issue if applicable
Summary
This PR adds foundational support for Reinforcement Learning (RL) options in classifier model training. The implementation introduces a configuration schema and parsing infrastructure that allows RL-based training to be toggled and configured from
config/config.yamlwithout disrupting the existing supervised LoRA training pipeline.Changes
1. Core Configuration Infrastructure
candle-binding/src/core/config_loader.rsAdded
RLConfigstruct with fields:enabled: Toggle RL training on/offalgorithm: Algorithm selection (e.g., "ppo", "a2c", "dqn")learning_rate: Learning rate for RL policy updates (default: 1e-5)gamma: Discount factor for reward accumulation (default: 0.99)batch_size: Batch size for RL training (default: 16)update_epochs: Number of policy update epochs per rollout (default: 4)reward_metric: Metric to compute reward signals (e.g., "accuracy", "f1", default: "accuracy")Added
GlobalConfigLoader::load_classifier_rl_config()method to parse RL options fromconfig/config.yamlunderclassifier.rl_trainingkeyAdded
GlobalConfigLoader::load_classifier_rl_config_safe()safe wrapper with sensible defaults fallbackAll parsing uses existing YAML hierarchical path extraction for consistency with other config loaders
2. YAML Configuration Schema
config/config.yamlclassifier.rl_trainingblock with documented defaults: