apache / apache/burr

Add graph validation/compilation

Open
#67 1 comment 0 reactions 0 assignees View on GitHub
area/core kind/feature priority/low
Dominant language
Python
Stars
2.5k
Forks
195
Avg merge
6d 10h
Merged PRs (30d)
17

Description

We should be able to validate the DAG. Specific things we can check for:
1. For all nodes that read state item X, given an initial state, does there exist a path that does not provide the required state?
2. For all produced keys, do types match up? (when we have typing)?
3. Is there a path that will not end up in a valid state (E.G. nowhere to go)?

Then on execution, we should be able to say:
1. If there is a `halt_after`, is there a path that will reach it?
2. If there is a `halt_before`, is there a path that will reach it?

Idea for (1):

```python
app = ....build(validate=True) # on build, we can validate
app = ....build(validate_types=True, validate_paths=True) # if you want to do different things
```

Idea for (2)

```python
app = ....build()
app.run(halt_after=..., validate=True)
```

Note this is not friendly towards state with default values as we don't expose that in the framework... But I think types + defaults should be easy enough to expose.

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.