from common_logging import get_logger

from .base import JobStatus, TrainingConfig, TrainingPlatform, TrainingResult

logger = get_logger(__name__)


class AliyunPlatform(TrainingPlatform):

    def create_training_job(self, config: TrainingConfig) -> str:
        logger.info("Aliyun create_training_job called")
        raise NotImplementedError('Aliyun platform not implemented yet')

    def get_job_status(self, job_id: str) -> JobStatus:
        logger.bind(job_id=job_id).info("Aliyun get_job_status called")
        raise NotImplementedError('Aliyun platform not implemented yet')

    def get_job_result(self, job_id: str) -> TrainingResult:
        logger.bind(job_id=job_id).info("Aliyun get_job_result called")
        raise NotImplementedError('Aliyun platform not implemented yet')

    def cancel_job(self, job_id: str) -> bool:
        logger.bind(job_id=job_id).info("Aliyun cancel_job called")
        raise NotImplementedError('Aliyun platform not implemented yet')
