NVIDIA / NVIDIA/cudf

[FEA] Async, especially for heavier ops

Open
#4,529 3 comments 0 reactions 0 assignees View on GitHub
feature request Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

**Is your feature request related to a problem? Please describe.**

We are currently putting manual `await sleep(0)` points into our cudf code to enable use of cudf alongside Python async code in web server scenarios. Otherwise, cudf hangs our web server when it is used for handling requests. This gets worse as tasks get bigger, complicates having mixed CPU/GPU tasks, and unnecessarily forces architectural decisions like carefully separating processes and 2-level scheduling.

**Describe the solution you'd like**

Support for Python3's async/await constructor. Part of the Python 2 -> 3 shift is native support for `async`, especially for IO (e.g., when handling web requests) and compute (e.g., compression tasks).

Ex:

```
@route(/cluster/big/dataset/, method=POST)
async def cluster_big_dataset(dataset_id):

df = await cudf.read_parquet(f'/files/{dataset_id}.parquet')
...
```

This would be great universally, but there's probably a ~top 10 list for most slow in practice: to/from I/O, groupby & merge, ... .

**Describe alternatives you've considered**

* Going via Dask also supports this, but with way more overhead and complexity.

* We currently use multiple Python processes to help with SLAs, but it's clearly avoidable.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.