apache / apache/hamilton

Allow caching and graceful error adapter to work

Open
#1,062 0 comments 0 reactions 1 assignee Claimed by @elijahbenizzy View on GitHub
enhancement plugin
Dominant language
Jupyter Notebook
Stars
2.6k
Forks
213
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
We haven't enabled the wrapping of adapters that wrap the function.

```python
from hamilton import driver
from hamilton.plugins import h_diskcache
from hamilton.lifecycle.default import GracefulErrorAdapter

dr2 = (
driver.Builder()
.with_modules(functions)
.with_adapters(GracefulErrorAdapter(error_to_catch=ValueError), h_diskcache.DiskCacheAdapter())
.build()
)
```
> ValueError: Multiple adapters cannot (currently) implement the same lifecycle method. Sync methods: ['do_node_execute']. Async methods: []

**Describe the solution you'd like**
Allow the nesting/wrapping of things to work.

**Describe alternatives you've considered**
N/A

**Additional context**
Users are running into this issue.

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.