Skip to content

Commit

Permalink
Update documentation lightweight_components (#903)
Browse files Browse the repository at this point in the history
Small update the documentation based on discord feedback.
  • Loading branch information
mrchtr authored Mar 11, 2024
1 parent cd29d63 commit a336917
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/components/lightweight_components.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,18 @@ install the package in the containerized component.
@lightweight_component(extra_requires=["numpy"])
```

Under the hood, we are injecting the source to a docker container. If you want to use additional
dependencies, you have to make sure to import the libaries inside a function directly.

For example:
```python title="pipeline.py"
...
def transform(self, dataframe: pd.DataFrame) -> pd.DataFrame:
import numpy as np
# Your code here
...
```

## Changing the base image

If you want to change the base image of the containerized component, you can do so by adding the
Expand Down

0 comments on commit a336917

Please sign in to comment.