caikit.runtime.servicers.global_train_servicer ============================================== .. py:module:: caikit.runtime.servicers.global_train_servicer Attributes ---------- .. autoapisummary:: caikit.runtime.servicers.global_train_servicer.log caikit.runtime.servicers.global_train_servicer.error caikit.runtime.servicers.global_train_servicer.NON_PRIMITIVE_TYPES Classes ------- .. autoapisummary:: caikit.runtime.servicers.global_train_servicer.GlobalTrainServicer Module Contents --------------- .. py:data:: log .. py:data:: error .. py:data:: NON_PRIMITIVE_TYPES .. py:class:: GlobalTrainServicer(training_service: caikit.runtime.service_factory.ServicePackage) Something something about the train servicer .. py:attribute:: _training_service .. py:attribute:: _model_manager :value: None .. py:attribute:: cdm .. py:attribute:: library .. py:property:: training_output_dir :type: str .. py:property:: save_with_id :type: str .. py:method:: Train(request: google.protobuf.message.Message, context: grpc.ServicerContext, *_, **__) -> caikit.interfaces.runtime.data_model.TrainingJob Global train RPC -- Mocks the invocation of a Caikit Library module.train() method for a loaded Caikit Library model Args: request (object): A deserialized RPC request message context (ServicerContext): Context object (contains request metadata, etc) Returns: caikit.interfaces.runtime.data_model.TrainingJob: A TrainingJob data model response object .. py:method:: run_training_job(request: google.protobuf.message.Message, module: Type[caikit.core.ModuleBase], training_output_dir: Optional[str] = None, *, context: Optional[grpc.ServicerContext] = None, wait: bool = False, **kwargs) -> caikit.interfaces.runtime.data_model.TrainingJob Builds the request dict for calling the train function asynchronously, then returns the thread id Args: request (ProtoMessageType): The message that stimulated this request module (Type[ModuleBase]): The module class to train training_output_dir (Optional[str]): The base directory where the trained model should be saved, falling back to the configured output dir if not given. Kwargs: context (Optional[ServicerContext]): The grpc context for the request if called from a grpc handler wait (bool): Whether or not to block until the training is complete Returns: training_job (TrainingJob): The job handle for the training with the job's ID and the model's name