(self, job_parameters=None, components_checkpoint=None)
Parameters
        ----------
        job_parameters: None
        components_checkpoint: specify which model to take, ex.: {"hetero_lr_0": {"step_index": 8}}

        Returns
        -------
def predict(self, job_parameters=None, components_checkpoint=None):
        """

        Parameters
        ----------
        job_parameters: None
        components_checkpoint: specify which model to take, ex.: {"hetero_lr_0": {"step_index": 8}}

        Returns
        -------

        """
        if self._stage != "predict":
            raise ValueError(
                "To use predict function, please deploy component(s) from training pipeline"
                "and construct a new predict pipeline with data reader and training pipeline.")

        if job_parameters and not isinstance(job_parameters, JobParameters):
            raise ValueError("input parameter of fit function should be JobParameters object")

        self.compile()

        res_dict = self._job_invoker.model_deploy(model_id=self._model_info.model_id,
                                                  model_version=self._model_info.model_version,
                                                  predict_dsl=self._predict_dsl,
                                                  components_checkpoint=components_checkpoint)
        self._predict_model_info = SimpleNamespace(model_id=res_dict["model_id"],
                                                   model_version=res_dict["model_version"])
        predict_conf = self._feed_job_parameters(self._train_conf,
                                                 job_type="predict",
                                                 model_info=self._predict_model_info,
                                                 job_parameters=job_parameters)
        predict_conf = self._filter_out_deploy_component(predict_conf)
        self._predict_conf = copy.deepcopy(predict_conf)
        predict_dsl = copy.deepcopy(self._predict_dsl)

        self._predict_job_id, _ = self._job_invoker.submit_job(dsl=predict_dsl, submit_conf=predict_conf)
        self._job_invoker.monitor_job_status(self._predict_job_id,
                                             self._initiator.role,
                                             self._initiator.party_id)
def predict ( self , job_parameters = None , components_checkpoint = None ) : if self . _stage != "predict" : raise ValueError ( "To use predict function, please deploy component(s) from training pipeline" "and construct a new predict pipeline with data reader and training pipeline." ) if job_parameters and not isinstance ( job_parameters , JobParameters ) : raise ValueError ( "input parameter of fit function should be JobParameters object" ) self . compile ( ) res_dict = self . _job_invoker . model_deploy ( model_id = self . _model_info . model_id , model_version = self . _model_info . model_version , predict_dsl = self . _predict_dsl , components_checkpoint = components_checkpoint ) self . _predict_model_info = SimpleNamespace ( model_id = res_dict [ "model_id" ] , model_version = res_dict [ "model_version" ] ) predict_conf = self . _feed_job_parameters ( self . _train_conf , job_type = "predict" , model_info = self . _predict_model_info , job_parameters = job_parameters ) predict_conf = self . _filter_out_deploy_component ( predict_conf ) self . _predict_conf = copy . deepcopy ( predict_conf ) predict_dsl = copy . deepcopy ( self . _predict_dsl ) self . _predict_job_id , _ = self . _job_invoker . submit_job ( dsl = predict_dsl , submit_conf = predict_conf ) self . _job_invoker . monitor_job_status ( self . _predict_job_id , self . _initiator . role , self . _initiator . party_id )