dask / dask/distributed

Context manager for contiguous computations

Open
#7,795 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.7k
Forks
778
Avg merge
2h 50m
Merged PRs (30d)
3

Description

## Motivation

For example, groups (like us!) run benchmarks and want to group sets of computations together into one cohesive job. We also want to record information about that computation that we know, for example the name of the benchmark, the hardware on which it was run, etc..

## Example

```python
with client.computation(tags={...}):
df = df.persist()

out1 = df.x.sum().compute()
out2 = df.y.sum().compute()
```

This name `computation` is bad. We should find a better one.

Question: should this be allowable without a context manager? @crusaderky is mildly positive on this.

What should happen here?: these should not nest. That should raise an errors

```python
with client.computation():
with client.computation():
```

@crusaderky @hendrikmakait @j-bennet

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.