Skip to content

Commit

Permalink
[DOCS]: Fix typos in UDF documentation (#2728)
Browse files Browse the repository at this point in the history
There were a few inconsistencies in the UDF documentation w.r.t resource
requests that I noticed while perusing the docs.
  • Loading branch information
amitschang authored Aug 26, 2024
1 parent 3cacd59 commit 457289b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions daft/udf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"]))
Expand Down

0 comments on commit 457289b

Please sign in to comment.