class_docstr: Base Pipeline class to be used to create custom pipelines
class_docstr_tok: ["Base","Pipeline","class","to","be","used","to","create","custom","pipelines"]
docstr: Initialize the pipeline with given context and configuration
      parameters.
  Args :
      context (Context) : Context is required for ResponseParsers.
      config (dict) : The configuration to pipeline.
      steps: (list): List of logic Units
      logger: (Logger): logger
docstr_tok: ["Initialize","the","pipeline","with","given","context","and","configuration","parameters",".","Args",":","context","(","Context",")",":","Context","is","required","for","ResponseParsers",".","config","(","dict",")",":","The","configuration","to","pipeline",".","steps",":","(","list",")",":","List","of","logic","Units","logger",":","(","Logger",")",":","logger"]
code: def __init__(
      self,
      context: Union[
          List[Union[DataFrameType, Any]], PipelineContext
      ] = None,
      config: Optional[Union[Config, dict]] = None,
      steps: Optional[List] = None,
      logger: Optional[Logger] = None,
  ):
      """
      Initialize the pipeline with given context and configuration
          parameters.
      Args :
          context (Context) : Context is required for ResponseParsers.
          config (dict) : The configuration to pipeline.
          steps: (list): List of logic Units
          logger: (Logger): logger
      """
  
      if not isinstance(context, PipelineContext):
          from pandasai.smart_dataframe import load_smartdataframes
  
          config = Config(**load_config(config))
          smart_dfs = load_smartdataframes(context, config)
          context = PipelineContext(smart_dfs, config)
  
      self._logger = (
          Logger(
              save_logs=context.config.save_logs,
              verbose=context.config.verbose,
          )
          if logger is None
          else logger
      )
  
      self._context = context
      self._steps = steps or []
  
file_path: pandas-ai/pandasai/pipelines/pipeline.py
imports: import logging
  from pandasai.config import load_config
  from pandasai.exceptions import UnSupportedLogicUnit
  from pandasai.helpers.df_info import DataFrameType
  from pandasai.helpers.logger import Logger
  from pandasai.pipelines.pipeline_context import PipelineContext
  from pandasai.pipelines.base_logic_unit import BaseLogicUnit
  from ..schemas.df_config import Config
  from typing import Any, Optional, List, Union
  from .abstract_pipeline import AbstractPipeline
label_desc: Use image node_id 1 to create a new Pipeline object from inherited base classes: AbstractPipeline with example: obj = Pipeline(context, config, steps, logger)