[Data] Compute Expressions-Expr Rounding#59295
[Data] Compute Expressions-Expr Rounding#59295alexeykudinkin merged 2 commits intoray-project:masterfrom
Conversation
Signed-off-by: yaommen <myanstu@163.com>
94c1046 to
7081bb0
Compare
|
Hi, @goutamvenkat-anyscale ,Could you please review this PR when you have time?many thanks |
|
hey @myandpr, thanks a bunch for the contribution! if you're interested in chatting more with the contributors, feel free to join our community sync -- https://docs.google.com/forms/d/e/1FAIpQLSeYWjNExnr6gbhO5rpM0i6wm4TBTdsm3y5S0LR8Syzk_2gelQ/viewform |
@richardliaw Submitted the form! Looking forward to the next sync meeting.Looking forward to contributing more and learning from everyone. |
|
@bveeramani PTAL |
goutamvenkat-anyscale
left a comment
There was a problem hiding this comment.
Thanks for your contribution! Just a few comments
bveeramani
left a comment
There was a problem hiding this comment.
LGTM other than Goutam's suggestions
Signed-off-by: yaommen <myanstu@163.com>
goutamvenkat-anyscale
left a comment
There was a problem hiding this comment.
lgtm! Thanks
### Description
Completing the Expr (direct) Rounding operations (ceil, floor, round,
trunc)
for example:
```
import ray
from ray.data import from_items
from ray.data.expressions import col
ray.init(include_dashboard=False, ignore_reinit_error=True)
ds = from_items([{"x": 1.1}, {"x": 2.5}, {"x": -3.7}])
for row in ds.iter_rows():
print(row)
x_expr = col("x")
hasattr(x_expr, "ceil")
ds = ds.with_column("x_ceil", x_expr.ceil())
hasattr(x_expr, "floor")
ds = ds.with_column("x_floor", x_expr.floor())
hasattr(x_expr, "round")
ds = ds.with_column("x_round", x_expr.round())
hasattr(x_expr, "trunc")
ds = ds.with_column("x_trunc", x_expr.trunc())
for row in ds.iter_rows():
print(row)
```
### Related issues
Related to ray-project#58674
### Additional information
---------
Signed-off-by: yaommen <myanstu@163.com>
Co-authored-by: yanmin <homeryan@didiglobal.com>
### Description
Completing the Expr (direct) Rounding operations (ceil, floor, round,
trunc)
for example:
```
import ray
from ray.data import from_items
from ray.data.expressions import col
ray.init(include_dashboard=False, ignore_reinit_error=True)
ds = from_items([{"x": 1.1}, {"x": 2.5}, {"x": -3.7}])
for row in ds.iter_rows():
print(row)
x_expr = col("x")
hasattr(x_expr, "ceil")
ds = ds.with_column("x_ceil", x_expr.ceil())
hasattr(x_expr, "floor")
ds = ds.with_column("x_floor", x_expr.floor())
hasattr(x_expr, "round")
ds = ds.with_column("x_round", x_expr.round())
hasattr(x_expr, "trunc")
ds = ds.with_column("x_trunc", x_expr.trunc())
for row in ds.iter_rows():
print(row)
```
### Related issues
Related to ray-project#58674
### Additional information
---------
Signed-off-by: yaommen <myanstu@163.com>
Co-authored-by: yanmin <homeryan@didiglobal.com>
### Description
Completing the Expr (direct) Rounding operations (ceil, floor, round,
trunc)
for example:
```
import ray
from ray.data import from_items
from ray.data.expressions import col
ray.init(include_dashboard=False, ignore_reinit_error=True)
ds = from_items([{"x": 1.1}, {"x": 2.5}, {"x": -3.7}])
for row in ds.iter_rows():
print(row)
x_expr = col("x")
hasattr(x_expr, "ceil")
ds = ds.with_column("x_ceil", x_expr.ceil())
hasattr(x_expr, "floor")
ds = ds.with_column("x_floor", x_expr.floor())
hasattr(x_expr, "round")
ds = ds.with_column("x_round", x_expr.round())
hasattr(x_expr, "trunc")
ds = ds.with_column("x_trunc", x_expr.trunc())
for row in ds.iter_rows():
print(row)
```
### Related issues
Related to ray-project#58674
### Additional information
---------
Signed-off-by: yaommen <myanstu@163.com>
Co-authored-by: yanmin <homeryan@didiglobal.com>
Signed-off-by: peterxcli <peterxcli@gmail.com>
Description
Completing the Expr (direct) Rounding operations (ceil, floor, round, trunc)
for example:
Related issues
Related to #58674
Additional information