Second-Me/lpm_kernel/api/domains/cloud_service/cloud_process_step.py
doubleBlack2 a01aaa98dc
Fix/cloud service stop (#384)
* fix cloud service stop

* add pending status

* feature: Added pause status polling function and updated cloud training stop logic

* Stop logic modification

* feature: Added cloud training pause status check function to optimize training process control

* fix stop

* feature: Add language parameter to support multi-language training configuration

* add Chinese language, fix top

---------

Co-authored-by: wyx-hhhh <1360479992@qq.com>
2025-06-17 15:07:39 +08:00

27 lines
749 B
Python

from enum import Enum
from typing import List
class CloudProcessStep(Enum):
"""Cloud training process steps"""
# Cloud training steps
UPLOAD_TRAINING_DATA = "upload_training_data"
CREATE_FINE_TUNE_JOB = "create_fine_tune_job"
WAIT_FOR_FINE_TUNE_COMPLETION = "wait_for_fine_tune_completion"
@classmethod
def get_ordered_steps(cls) -> List["CloudProcessStep"]:
"""Get ordered steps"""
return [
# Cloud training steps
cls.UPLOAD_TRAINING_DATA,
cls.CREATE_FINE_TUNE_JOB,
cls.WAIT_FOR_FINE_TUNE_COMPLETION,
]
def get_method_name(self) -> str:
"""Get the corresponding method name for this step"""
return self.value