Skip to content

0.10.0

Compare
Choose a tag to compare
@PhilippeMoussalli PhilippeMoussalli released this 31 Jan 13:26
· 76 commits to main since this release
c009879

🪶 Lightweight components to easily develop and iterate new components

We now support building lightweight components. This is currently the easiest way to get you started in building your own custom components. Lightweight components remove the need to specifying custom files for building components (requirements, Dockerfile, component specification) compared to containerized components.

import pandas as pd
import pyarrow as pa
from fondant.component import PandasTransformComponent
from fondant.pipeline import lightweight_component

@lightweight_component(produces={"z": pa.int32()})
class AddNumber(PandasTransformComponent):
    def __init__(self, n: int):
        self.n = n

    def transform(self, dataframe: pd.DataFrame) -> pd.DataFrame:
        dataframe["z"] = dataframe["x"].map(lambda x: x + self.n)
        return dataframe

Lightweight Components are constructed by decorating Python functions with the @lightweight_component decorator. The decorator transforms your function into a Fondant components where they can be run on both local and remote runners. 🚀

Some of the benefits of those components are:

⏩ Reduced development efforts

Decrease the amount of work needed to develop a component, this is especially relevant for simpler components that perform simple tasks (e.g., filtering a column on a certain value).

🔄 Accelerated iterations

With the component script integrated inline within your code, the development and iteration process becomes significantly faster.

🛠️ Customization

Despite their lightweight nature, these components remain flexible. Users can still customize them as needed by incorporating extra requirements, specifying a custom image, and more.

Checkout our new guide for more details.

🚥 RAG Component updates

  • Added support to create embeddings using an external module instead of having to provide your own embeddings. More info here
  • Enabledr hybrid search and reranking to the weaviate retrieve component

What's Changed

Full Changelog: 0.9.0...0.10.0