abacusai.pipeline — AbacusAI documentation

# `abacusai.pipeline`

## Module Contents

### Classes

`Pipeline` | A Pipeline For Steps.

class abacusai.pipeline.Pipeline(client, pipelineName=None, pipelineId=None, createdAt=None, pipelineVariableMappings=None, notebookId=None, cron=None, nextRunTime=None, isProd=None, steps={}, pipelineReferences={}, latestPipelineVersion={})

  Bases: `abacusai.return_class.AbstractApiClass`

  A Pipeline For Steps.

  Parameters:

    - client (ApiClient) – An authenticated API Client instance

    - pipelineName (str) – The name of the pipeline this step is a part of.

    - pipelineId (str) – The reference to the pipeline this step belongs to.

    - createdAt (str) – The date and time which the pipeline was created.

    - pipelineVariableMappings (dict) – A description of the function variables into the pipeline.

    - notebookId (str) – The reference to the notebook this pipeline belongs to.

    - cron (str) – A cron-style string that describes when this refresh policy is to be executed in UTC

    - nextRunTime (str) – The next time this pipeline will be run.

    - isProd (bool) – Whether this pipeline is a production pipeline.

    - steps (PipelineStep) – A list of the pipeline steps attached to the pipeline.

    - pipelineReferences (PipelineReference) – A list of references from the pipeline to other objects

    - latestPipelineVersion (PipelineVersion) – The latest version of the pipeline.

  __repr__()

    Return repr(self).

  to_dict()

    Get a dict representation of the parameters in this class

    Returns:

      The dict value representation of the class parameters

    Return type:

      dict

  refresh()

    Calls describe and refreshes the current object’s fields

    Returns:

      The current object

    Return type:

      Pipeline

  describe()

    Describes a given pipeline.

    Parameters:

      pipeline_id (str) – The ID of the pipeline to describe.

    Returns:

      An object describing a Pipeline

    Return type:

      Pipeline

  update(project_id=None, pipeline_variable_mappings=None, cron=None, is_prod=None)

    Updates a pipeline for executing multiple steps.

    Parameters:

      - project_id (str) – A unique string identifier for the pipeline.

      - pipeline_variable_mappings (list) – List of Python function arguments for the pipeline.

      - cron (str) – A cron-like string specifying the frequency of the scheduled pipeline runs.

      - is_prod (bool) – Whether the pipeline is a production pipeline or not.

    Returns:

      An object that describes a Pipeline.

    Return type:

      Pipeline

  delete()

    Deletes a pipeline.

    Parameters:

      pipeline_id (str) – The ID of the pipeline to delete.

  list_versions(limit=200)

    Lists the pipeline versions for a specified pipeline

    Parameters:

      limit (int) – The maximum number of pipeline versions to return.

    Returns:

      A list of pipeline versions.

    Return type:

      PipelineVersion

  run(pipeline_variable_mappings=None)

    Runs a specified pipeline with the arguments provided.

    Parameters:

      pipeline_variable_mappings (list) – List of Python function arguments for the pipeline.

    Returns:

      The object describing the pipeline

    Return type:

      PipelineVersion

  create_step(step_name, function_name=None, source_code=None, step_input_mappings=None, output_variable_mappings=None, step_dependencies=None, package_requirements=None)

    Creates a step in a given pipeline.

    Parameters:

      - step_name (str) – The name of the step.

      - function_name (str) – The name of the Python function.

      - source_code (str) – Contents of a valid Python source code file. The source code should contain the transform feature group functions. A list of allowed imports and system libraries for each language is specified in the user functions documentation section.

      - step_input_mappings (list) – List of Python function arguments.

      - output_variable_mappings (list) – List of Python function ouputs.

      - step_dependencies (list) – List of step names this step depends on.

      - package_requirements (list) – List of package requirement strings. For example: [‘numpy==1.2.3’, ‘pandas>=1.4.0’].

    Returns:

      Object describing the pipeline.

    Return type:

      Pipeline

  describe_step_by_name(step_name)

    Describes a pipeline step by the step name.

    Parameters:

      step_name (str) – The name of the step.

    Returns:

      An object describing the pipeline step.

    Return type:

      PipelineStep

  unset_refresh_schedule()

    Deletes the refresh schedule for a given pipeline.

    Parameters:

      pipeline_id (str) – The id of the pipeline.

    Returns:

      Object describing the pipeline.

    Return type:

      Pipeline

  pause_refresh_schedule()

    Pauses the refresh schedule for a given pipeline.

    Parameters:

      pipeline_id (str) – The id of the pipeline.

    Returns:

      Object describing the pipeline.

    Return type:

      Pipeline

  resume_refresh_schedule()

    Resumes the refresh schedule for a given pipeline.

    Parameters:

      pipeline_id (str) – The id of the pipeline.

    Returns:

      Object describing the pipeline.

    Return type:

      Pipeline