-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lightweight Python components #558
Comments
We will need to be strict with the lightweight and clearly decide what it can and can't do. Otherwise it will become very complex very fast. We also need to think about how easy it would be to convert (for a user) a lightweight component to a real custom component (and a reusable one). I'm a bit concerned these will become the first class way of doing things which makes sense since it the easiest but it will unload a lot of complexity to the fondant side. |
I think it will indeed become the default way to run custom code, but I believe we need to make that easier to make Fondant more useful. Moving from a Lightweight Python component to a Docker component should only be needed when a user wants to make the component reusable or runs into a limitation of the Lightweight Python component. I would remove as many limitations as possible, but can see the following:
Moving from a Lightweight Python component to a reusable Docker component should be quite straightforward since the Python code can stay the same. The user will need to add a component specification and Dockerfile, and build it and make it available for remote runners. I think the additional complexity on the Fondant side can be limited and best effort. Eg. we can try to infer types so the user doesn't need to define the |
The goal of this issue is to let user define custom components in Python only instead of having to build a complete docker component with component spec.
Original description:
The Dockerfile of most components is identical, but the user still needs to provide the whole component structure to create a component, which introduces unnecessary complexity.
I see two options to do this:
In both cases, we could make the base image configurable by the user.
The first option has some downsides:
The second option also has some downsides:
We could have a look at how Kubeflow's lightweight Python components are implemented.
We might also be able to generate the component spec from the Python code:
__init__
method.consumes
andproduces
section. Tools like Pandera could be helpful in this.Tasks
__init__
arguments #751consumes
and inferproduces
for Lightweight Python components #752The text was updated successfully, but these errors were encountered: