def _step_id_to_string( step_id: int, pipeline: TrainablePipeline, cls2label: Dict[str, str] = {}, ) -> str: if step_id == _DUMMY_INPUT_STEP: return "INP" if step_id == _DUMMY_SCORE_STEP: return "SCR" step = pipeline.steps_list()[step_id] cls = step.class_name() return cls2label[cls] if cls in cls2label else step.name()
def get_operation(self, pipeline: TrainablePipeline) -> _Operation: if self.step_id == _DUMMY_INPUT_STEP: return _Operation.SCAN step = pipeline.steps_list()[self.step_id] return _Operation.TRANSFORM if step.is_transformer( ) else _Operation.PREDICT