Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow caching and graceful error adapter to work #1062

Open
skrawcz opened this issue Jul 23, 2024 · 0 comments
Open

Allow caching and graceful error adapter to work #1062

skrawcz opened this issue Jul 23, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request plugin Relates to a Hamilton plugin (adapters, materializers, etc.)

Comments

@skrawcz
Copy link
Collaborator

skrawcz commented Jul 23, 2024

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

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.

@skrawcz skrawcz added enhancement New feature or request plugin Relates to a Hamilton plugin (adapters, materializers, etc.) labels Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugin Relates to a Hamilton plugin (adapters, materializers, etc.)
Projects
None yet
Development

No branches or pull requests

2 participants