# WandbTracer

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/callbacks/tracers/wandb/WandbTracer)

Callback Handler that logs to Weights and Biases.

This handler will log the model architecture and run traces to Weights and Biases.
This will ensure that all LangChain activity is logged to W&B.

## Signature

```python
WandbTracer(
    self,
    run_args: Optional[WandbRunArgs] = None,
    io_serializer: Callable = _serialize_io,
    **kwargs: Any = {},
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `run_args` | `Optional[WandbRunArgs]` | No | (dict, optional) Arguments to pass to `wandb.init()`. If not provided, `wandb.init()` will be called with no arguments. Please refer to the `wandb.init` for more details. (default: `None`) |
| `io_serializer` | `Callable` | No | callable A function that serializes the input and outputs of a run to store in wandb. Defaults to "_serialize_io" (default: `_serialize_io`) |

## Extends

- `BaseTracer`

## Constructors

```python
__init__(
    self,
    run_args: Optional[WandbRunArgs] = None,
    io_serializer: Callable = _serialize_io,
    **kwargs: Any = {},
) -> None
```

| Name | Type |
|------|------|
| `run_args` | `Optional[WandbRunArgs]` |
| `io_serializer` | `Callable` |


## Methods

- [`finish()`](https://reference.langchain.com/python/langchain-community/callbacks/tracers/wandb/WandbTracer/finish)
- [`process_model_dict()`](https://reference.langchain.com/python/langchain-community/callbacks/tracers/wandb/WandbTracer/process_model_dict)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/callbacks/tracers/wandb.py#L279)