Skip to content

Commit

Permalink
Create new demo python script
Browse files Browse the repository at this point in the history
  • Loading branch information
Raunak Bhagat committed Nov 25, 2024
1 parent 8052de7 commit 3c5b8a6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/working-dir/demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from pathlib import Path

import daft

df = daft.from_pydict({"nums": [1, 2, 3]})
df = df.with_column("result", daft.col("nums").cbrt()).collect()
df.show()

path = Path("/tmp/ray/session_latest/logs/daft")
path.mkdir(parents=True, exist_ok=True)

with open(path / "metrics.csv") as f:
f.write("1,2,3")

0 comments on commit 3c5b8a6

Please sign in to comment.