Skip to content
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

Add support to run lightweight python components in docker runner #786

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

RobbeSneyders
Copy link
Member

Fixes #753

@@ -44,5 +85,4 @@ def transform(self, dataframe: pd.DataFrame) -> pd.DataFrame:
ref=AddN,
produces={"x": pa.int32(), "y": pa.int32()},
consumes={"x": pa.int32(), "y": pa.int32()},
arguments={"n": 1},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We still need to integrate #763 to support arguments.

@@ -45,6 +47,37 @@ def log_unused_configurations(self, **kwargs):
f" for runner `{self.__class__.__name__}`.",
)

@staticmethod
def _build_entrypoint(image: Image) -> t.List[str]:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't really know how to test this without either replicating the logic or comparing against an unreadable string, so for now this is only tested via the integration test.

Open for ideas.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO comparing to a hard to read string is fine

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how valuable it is though, because I would just copy paste the generated string at this moment. It would be the old compiler tests all over again :)

Copy link
Collaborator

@GeorgesLorre GeorgesLorre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice !

@@ -45,6 +47,37 @@ def log_unused_configurations(self, **kwargs):
f" for runner `{self.__class__.__name__}`.",
)

@staticmethod
def _build_entrypoint(image: Image) -> t.List[str]:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO comparing to a hard to read string is fine

tests/pipeline/test_python_component.py Outdated Show resolved Hide resolved
@RobbeSneyders RobbeSneyders merged commit d1c4313 into main Jan 17, 2024
9 checks passed
@RobbeSneyders RobbeSneyders deleted the feature/python-in-docker branch January 17, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Lightweight Python components in Docker runner
3 participants