Weave provides a set of environment variables to configure and optimize its behavior. You can set these variables in your shell or within scripts to control specific functionality.Documentation Index
Fetch the complete documentation index at: https://wb-21fd5541-weave-caching.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Available Environment Variables
| Variable | Type | Default | Description |
|---|---|---|---|
WANDB_API_KEY | string | None | If set, automatically log into W&B Weave without being prompted for your API key. To generate an API key, log in to your W&B account and go to User Settings. |
WEAVE_DISABLED | bool | false | When set to true, disables all Weave tracing. Weave ops will behave like regular functions. |
WEAVE_PRINT_CALL_LINK | bool | true | Controls whether to print a link to the Weave UI when calling a Weave op. You can also set this directly in your code by configuring the settings argument for weave.init() like this: weave.init("your-project-name", settings={"print_call_link": False}) |
WEAVE_LOG_LEVEL | str | INFO | Controls the log level of the weave logger. |
WEAVE_CAPTURE_CODE | bool | true | Controls whether to save code for ops so they can be reloaded for later use. |
WEAVE_DEBUG_HTTP | bool | false | When set to true, turns on HTTP request and response logging for debugging. |
WEAVE_PARALLELISM | int | 20 | In evaluations, controls the number of examples to evaluate in parallel. Set to 1 to run examples sequentially. |
WEAVE_TRACE_LANGCHAIN | bool | true | Controls global tracing for LangChain. Set to false to explicitly disable LangChain tracing. |
WEAVE_USE_SERVER_CACHE | bool | true | Enables server response caching. When enabled, responses from the server are cached to disk to improve performance for repeated queries. |
WEAVE_SERVER_CACHE_SIZE_LIMIT | int | 1000000000 | Sets the maximum size limit for the server cache in bytes. When the cache reaches this size, older entries are automatically removed to make space for new ones. Important: the underlying implementation uses SQLite which has a Write Ahead Log (WAL) that will grow to 4MB regardless of this setting. This WAL will be removed when the program exits. |
WEAVE_SERVER_CACHE_DIR | str | None | Specifies the directory where cache files should be stored. If not set, a temporary directory is used. |
WEAVE_MAX_CALLS_QUEUE_SIZE | int | 100000 | Sets the maximum size of the calls queue. Defaults to 100_000. Setting a value of 0 means the queue can grow unbounded. |
WEAVE_RETRY_MAX_ATTEMPTS | int | 3 | Sets the maximum number of retry attempts for failed requests. |
WEAVE_RETRY_MAX_INTERVAL | float | 300.0 | Sets the maximum interval between retry attempts in seconds. |
WANDB_BASE_URL | string | None | Sets the Weave host URL. Equivalent to entering the host URL when prompted by wandb.login(). You can specify WANDB_BASE_URL and WANDB_API_KEY before using weave.init() to automatically log into and authenticate to Weave. |
All boolean environment variables accept the following values (case-insensitive):
true,1,yes,onfor Truefalse,0,no,offfor False