Update a Custom Component

To update custom components, upload their new version to deepset Cloud. Compare different component versions to evaluate them.

Update a Component

To update a custom component:

  1. Pull the latest version of the dc-custom-component-template repository.
  2. Update the component code in the ./dc-custom-component-template/src/dc_custom_component/components/<your_components_folder>/<custom_component>.py file.
  3. Update the component version in the ./dc-custom-component-template/src/dc_custom_component/__about__.py file.

ℹ️

How do I check the current version?

You can check the version of the component that's currently in deepset Cloud in Pipeline Builder. Drag your custom component onto the canvas and its version is displayed on the component card.

Component card with version highlighted

You can also use the Get Custom Components endpoint - the version is listed in the version parameter of a successful response.

  1. If the component has any dependencies, add them in the dependencies section of the ./dc-custom-component-template/pyproject.toml file. Do not modify versions of dependencies already listed in this file.
  2. Upload your component to deepset Cloud..

All new pipelines automatically use the latest version of your custom components. However, running pipelines continue to use the version that was current when they were deployed. To update the component version in running pipelines, undeploy and redeploy them.

Compare Different Component Versions

To evaluate which version of your component performs better in a pipeline, you can upload two versions of the component simultaneously, each with a unique name.

  1. Pull the latest version of the dc-custom-component-template repository.
  2. Add two versions of the component to the ./dc-custom-component-template/src/dc_custom_component/components/<your_component_folder>/<your_component_name>.py file, treating them as separate components and giving each version a distinct name.
  3. Update the component version in the ./dc-custom-component-template/src/dc_custom_component/__about__.py file.
  4. Upload your components to deepset Cloud..

Now, you can create two pipelines—one using the first version and another using the second—to compare their performance.