def __init__()

in google_cloud_automlops/orchestration/kfp.py [0:0]


    def __init__(self,
                 func: Optional[Callable] = None,
                 name: Optional[str] = None,
                 description: Optional[str] = None,
                 comps_dict: dict = None) -> None:
        """Initiates a KFP pipeline object created out of a function holding all necessary code.

        Args:
            func (Optional[Callable]): The python function to create a pipeline from. The functio
                should have type annotations for all its arguments, indicating how it is intended
                to be used (e.g. as an input/output Artifact object, a plain parameter, or a path
                to a file). Defaults to None.
            name (Optional[str]): The name of the pipeline. Defaults to None.
            description (Optional[str]): Short description of what the pipeline does. Defaults to None.
            comps_list (dict): Dictionary of potential components for pipeline to utilize imported
                as the global held in AutoMLOps.py. Defaults to None.
        """
        super().__init__(
            func=func,
            name=name,
            description=description,
            comps_dict=comps_dict)

        # Create pipeline scaffold attribute, which is an empty pipelines template
        # without the DAG definition
        self.pipeline_scaffold = (
            self._get_pipeline_decorator()
            + self.src_code
            + self._get_compile_step())