Get a handle to the Call object during execution ↗
noSummary: Access the W&B Weave Call object at runtime for feedback, display names, and other metadata
Original Documentation
Documentation Index#
Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt Use this file to discover all available pages before exploring further.
Access the W&B Weave Call object at runtime for feedback, display names, and other metadata
In Weave, when you use an Op, you can call the functions directly as you would any function:
@weave.op
def my_op():
...
my_op()function myFunction() {
...
}
const myFunctionOp = weave.op(myFunction)However, you can instead get access to the Call object directly by invoking the op.call method, which returns both the result and the Call object.
@weave.op
def my_op():
...
output, call = my_op.call()
```
From here, the `call` object contains all the information about the Call, including the inputs, outputs, and other metadata. You can use `call` to set, update, fetch additional properties, or add feedback.
If your Op is a method on a class, you need to pass the instance of the class as the first argument to `call`. The following example shows getting a handle to a Call object that is a method on a class:
```python
import weave
# Initialize Weave Tracing
weave.init("intro-example")
class MyClass:
# Decorate your method
@weave.op
def my_method(self, name: str):
return f"Hello, {name}!"
instance = MyClass()
# Pass `instance` as the first argument to `call`.
result, call = instance.my_method.call(instance, "World")
```
<span class="tab-end"></span>
<span class="tab-start" data-tab-title="TypeScript"></span>
```plaintext
This feature is not available in the TypeScript SDK yet.
```
<span class="tab-end"></span>
<span class="tab-group-end"></span>Link last verified
June 7, 2026.
View original ↗
Source: Weights & Biases Docs
Link last verified: 2026-04-05