Structure
Introduction of GPT_graph’s structure.
Closure: The foundational class that establishes hierarchical relationships.
Component: The basic building blocks of the pipeline system.
Pipeline: A specialized type of Component that can contain and manage other Components.
Step: Executable units within a Pipeline. Generated by Components.
Graph: Representations of the structure of connected steps/nodes.
Parameter Handling: A flexible system for managing and prioritizing parameters.
Summary of Key Concepts:
Closure:
Base class for Component and Session
Manages hierarchical relationships (i.e. Closure.contains is a list of other Closures)
Component:
Three category: “class”, “static”, “method”
Defines input_schema, cache_schema, output_schema, and output_format
Uses Component.bindings/linkings to determine execution order of Components within a Pipeline.
Pipeline:
Inherits from Component
Manages the connection and execution of Components
Uses the ‘|’ operator for linking Components
Step:
Executable units within a Pipeline
Stored in Pipeline.sub_steps_q(priority queue) during runtime
Graph:
Wrapper for networkx graph
Represents the structure of connected steps/ generated nodes
There are many two types of Graphs: node_graph and step_graph
Parameter Handling:
Parameters are stored as dict in Component.params first. During run-time, they will be copied into Steps.
Implements a priority system for parameter values
Supports different parameter types and statuses
Allows for placeholder parameters
Important conventions:
Each Component/ Pipeline have a method run that can be run independently. This facilitates debugging.
Shorthand Notations
Pipeline: pp
Component: cp