Skip to content

Commit 51a0bc7

Browse files
committed
update polars examples
Signed-off-by: Niels Bantilan <niels.bantilan@gmail.com>
1 parent 397db46 commit 51a0bc7

File tree

2 files changed

+4
-16
lines changed

2 files changed

+4
-16
lines changed

examples/plugins/polars/polars_dataframe_inputs.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,9 @@
4545
from flyte._image import DIST_FOLDER, PythonWheels
4646

4747
# Create task environment with required dependencies
48-
# NOTE: due to a dependency conflict, the polars flyte plugin needs to be installed as a separate layer:
49-
# Run the following command to build the wheel:
50-
# `rm -rf ./dist-plugins && uv run python -m build --wheel --installer uv --outdir ./dist-plugins plugins/polars`
51-
# Once a release of the plugin is out, you can install it via `with_pip_packages("flyteplugins-polars")`
52-
img = flyte.Image.from_debian_base(name="flyteplugins-polars-image").clone(
53-
addl_layer=PythonWheels(wheel_dir=DIST_FOLDER.parent / "dist-plugins", package_name="flyteplugins-polars", pre=True)
48+
img = (
49+
flyte.Image.from_debian_base(name="flyteplugins-polars-image")
50+
.with_pip_packages("flyteplugins-polars>=2.0.0b52", "flyte>=2.0.0b52", pre=True)
5451
)
5552

5653
env = flyte.TaskEnvironment(

examples/plugins/polars_dataframe.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,11 @@
1010
import polars as pl
1111

1212
import flyte
13-
from flyte._image import DIST_FOLDER, PythonWheels
1413

1514
# Create task environment with required dependencies
1615
img = (
1716
flyte.Image.from_debian_base(name="flyteplugins-polars-image")
18-
# NOTE: due to a dependency conflict, the polars flyte plugin needs to be installed as a separate layer:
19-
# Run the following command to build the wheel:
20-
# `rm -rf ./dist-plugins && uv run python -m build --wheel --installer uv --outdir ./dist-plugins plugins/polars`
21-
# Once a release of the plugin is out, you can installed it via `with_pip_packages("flyteplugins-polars")`
22-
.clone(
23-
addl_layer=PythonWheels(
24-
wheel_dir=DIST_FOLDER.parent / "dist-plugins", package_name="flyteplugins-polars", pre=True
25-
)
26-
)
17+
.with_pip_packages("flyteplugins-polars>=2.0.0b52", "flyte>=2.0.0b52", pre=True)
2718
)
2819

2920
env = flyte.TaskEnvironment(

0 commit comments

Comments
 (0)