From 457289b8357648c32666018cffafccb6c8c53f15 Mon Sep 17 00:00:00 2001 From: Arik Mitschang Date: Mon, 26 Aug 2024 19:14:11 -0400 Subject: [PATCH] [DOCS]: Fix typos in UDF documentation (#2728) There were a few inconsistencies in the UDF documentation w.r.t resource requests that I noticed while perusing the docs. --- daft/udf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daft/udf.py b/daft/udf.py index 56950294d6..bfc0a4e570 100644 --- a/daft/udf.py +++ b/daft/udf.py @@ -492,8 +492,8 @@ def udf( Resource Requests ----------------- - You can also hint Daft about the resources that your UDF will require to run. For example, the following UDF requires 4 CPUs to run. On a - machine/cluster with 8 CPUs, Daft will be able to run up to 2 instances of this UDF at once, giving you a concurrency of 2! + You can also hint Daft about the resources that your UDF will require to run. For example, the following UDF requires 2 CPUs to run. On a + machine/cluster with 8 CPUs, Daft will be able to run up to 4 instances of this UDF at once, giving you a concurrency of 4! >>> import daft >>> @daft.udf(return_dtype=daft.DataType.int64(), num_cpus=2) @@ -525,7 +525,7 @@ def udf( ... return x >>> >>> # Override the num_cpus to 2 instead - >>> udf_needs_8_cpus = udf_needs_4_cpus.override_options(num_cpus=2) + >>> udf_needs_2_cpus = udf_needs_4_cpus.override_options(num_cpus=2) >>> >>> df = daft.from_pydict({"x": [1, 2, 3]}) >>> df = df.with_column("new_x", udf_needs_2_cpus(df["x"]))