Skip to content

Allow caching and graceful error adapter to work #1062

Open
@skrawcz

Description

@skrawcz

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestpluginRelates to a Hamilton plugin (adapters, materializers, etc.)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions