GLLM Pipeline v0.4 to v0.5

Several legacy parameters and classes in GLLM Pipeline v0.4 have been deprecated. Backward compatibility will be removed in the upcoming version v0.5.0. Please review this migration guide to ensure a smooth transition.

circle-info

Note: If you've set the GLLM Pipeline dependency in your app as >=0.4.0, <0.5.0, you don't have to do this migration immediately, as you're locked to v0.4.x. You will only migrate to 0.5.0 when you choose to do so by updating your dependency to >=0.5.0.

However, it's still recommended to do so ASAP to be able to access new features that will be added in the future.

Step Functions

Deprecated Parameters Removed

The following deprecated parameters have been removed from step functions (step(), conditional(), toggle(), subgraph()):

Removed Parameter
Replacement

input_state_map

input_map

runtime_config_map

input_map

fixed_args

input_map with Val()

Before (v0.4):

from gllm_pipeline import step, conditional, toggle, subgraph

# Using legacy parameters
my_step = step(
    MyComponent(),
    input_state_map={"query": "user_input"},
    runtime_config_map={"model": "model_config"},
    fixed_args={"temperature": 0.7},
    output_state="result",
)

toggle_step = toggle(
    condition,
    feature_step,
    input_state_map={"value": "input"},
    runtime_config_map={"threshold": "threshold_config"},
    fixed_args={"strict_mode": True},
    output_state="feature_status",
)

After (v0.5):

Caching Configuration

cache_store and cache_config Replaced with cache

The separate cache_store and cache_config parameters have been consolidated into a single cache parameter using CacheConfig.

Before (v0.4):

After (v0.5):

This applies to all step functions and pipeline builder methods:

  • step()

  • conditional()

  • toggle()

  • subgraph()

  • parallel()

  • Pipeline builder's when(), switch(), parallel()

Pipeline Invocation

context Parameter Added

A new context parameter has been added to Pipeline.invoke() for passing runtime context separately from configuration flags.

Before (v0.4):

After (v0.5):

circle-exclamation

Router

Optional Dependencies

Some of the dependencies have been made optional to allow user opt out installing dependencies for unused modules. Below is the list of extra package to use alongside with the corresponding modules.

Extra Package Name
Required by
Module Location

inference

EMInvokerEncoder

gllm_pipeline.router.backend.aurelio.encoders.em_invoker_encoder

aurelio

LangchainEmbeddingsEncoder

gllm_pipeline.router.backend.aurelio.encoders.langchain_encoder

aurelio

TEIEncoder

gllm_pipeline.router.backend.aurelio.encoders.tei_encoder

aurelio-azure

AzureAISearchAurelioIndex

gllm_pipeline.router.backend.aurelio.index.azure_ai_search_aurelio_index

aurelio-datastore

DataStoreAdapterIndex

gllm_pipeline.router.backend.aurelio.index.data_store_adapter_index

aurelio

BaseAurelioIndex

gllm_pipeline.router.backend.aurelio.index.aurelio_index

inference

LMBasedRouter

gllm_pipeline.router.lm_based_router

Backend Adapter Pattern

circle-check

The backend adapter pattern provides a pluggable architecture for router backends. All adapters implement the BaseAdapter interface with an async route() method.

Semantic Router: Aurelio Backend

Before (v0.4):

After (v0.5):

Semantic Router: Native Backend

Before (v0.4):

After (v0.5):

LM Based Router: Native Backend

Before (v0.4):

After (v0.5):

Type Hints

Enhanced type hints have been added across pipeline components. While this doesn't require code changes, you may see new type checking warnings if your IDE or type checker is strict. Review and update your type annotations as needed.

Last updated

Was this helpful?