Skip to content

preserve training param#292

Merged
kevin-mindverse merged 1 commit intodevelopfrom
feat/addRetrainParam2
Apr 25, 2025
Merged

preserve training param#292
kevin-mindverse merged 1 commit intodevelopfrom
feat/addRetrainParam2

Conversation

@kevin-mindverse
Copy link
Copy Markdown
Contributor

Enhancement: Update retrain method to handle training parameters like start_process

Description

Currently, the retrain method lacks the ability to update training parameters in the same way as the start_process method. This enhancement adds parameter handling capabilities to the retrain method and modifies the TrainingParamsManager.update_training_params method to support resetting parameters when retraining.

Changes Made

  • Enhanced the retrain endpoint to accept the same training parameters as start_process:
    • learning_rate
    • number_of_epochs
    • concurrency_threads
    • data_synthesis_mode
    • use_cuda
    • is_cot
  • Modified the TrainingParamsManager.update_training_params method to accept a use_previous_params flag
  • Set use_previous_params=False in the retrain method to ensure parameters are reset when retraining
  • Updated endpoint documentation to reflect new parameters
  • Added proper response data including all training parameters

Technical Details

  • The retrain method now processes all training parameters from the request JSON
  • Default values are applied for missing parameters
  • When calling update_training_params, we pass use_previous_params=False to reset parameters
  • The API response now includes all training parameters in the data section

Testing

  1. Call the /api/trainprocess/retrain endpoint with a JSON payload containing:
    {
      "model_name": "Qwen2.5-0.5B-Instruct",
      "learning_rate": 2e-4,
      "number_of_epochs": 5,
      "concurrency_threads": 4,
      "data_synthesis_mode": "medium",
      "use_cuda": true,
      "is_cot": true
    }

@doubleBlack2 doubleBlack2 self-assigned this Apr 25, 2025
@doubleBlack2 doubleBlack2 removed their assignment Apr 25, 2025
@kevin-mindverse kevin-mindverse merged commit 1d8b48e into develop Apr 25, 2025
1 check passed
Cybercricetus pushed a commit to Cybercricetus/Second-Me that referenced this pull request May 29, 2025
EOMZON pushed a commit to EOMZON/Second-Me that referenced this pull request Feb 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants