wandb / weave

Weave is a toolkit for developing AI-powered applications, built by Weights & Biases.
https://wandb.me/weave
Apache License 2.0
645 stars 48 forks source link

fix(weave): Refactor @op deco to work with `inspect` lib (`isfunction`, `iscoroutinefunction`) #1901

Closed andrewtruong closed 1 month ago

andrewtruong commented 1 month ago

Resolves

This PR makes the @op deco work with inspect.isfunction and inspect.iscoroutinefunction which are commonly used in other patching libs

There are a few tradeoffs, discussed here: https://www.notion.so/wandbai/Weave-op-decorator-changes-a9fcd15d75ec4b1b917bbe657a3b8bd7?pvs=4

circle-job-mirror[bot] commented 1 month ago

Preview this PR with FeatureBee: https://beta.wandb.ai/?betaVersion=8b14b89f3ac372ad7c00bc826ab7178484887517