> This page is for ProteinMPNN, version 1.1.0.
> For other versions, use one of these documentation indexes:
> - 1.2.0 (Latest) (default): https://docs.nvidia.com/nim/bionemo/proteinmpnn/1.2.0/llms.txt
> - 1.1.0: https://docs.nvidia.com/nim/bionemo/proteinmpnn/1.1.0/llms.txt
> - 1.0.2: https://docs.nvidia.com/nim/bionemo/proteinmpnn/1.0.2/llms.txt
> - 1.0.0: https://docs.nvidia.com/nim/bionemo/proteinmpnn/1.0.0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nim/bionemo/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nim/bionemo/_mcp/server.

# Advanced Usage

This page describes how to use the advanced and non-standard features of the ProteinMPNN NIM, including benchmarking the performance of the NIM locally, controlling the log levels of the NIM for monitoring and debugging, and configuring telemetry settings.

## Logging

### Controlling Logging Level

The logging level for the NIM can be controlled using the environment variable `NIM_LOG_LEVEL`. This variable allows you to specify the level of logging detail you want to see in the container's logs.

### Available Logging Levels

The following logging levels are available:

* `DEBUG`: This level logs all inputs and outputs for each endpoint of the server. This can be useful for debugging purposes, but it can also produce very large logs and should only be used when necessary.
* `INFO`: This level logs important events and information about the server's operation.
* `WARNING`: This level logs warnings about potential issues or errors.
* `ERROR`: This level logs errors that occur during the server's operation.
* `CRITICAL`: This level logs critical errors that prevent the server from functioning properly.

### Setting the Logging Level

To set the logging level, you can pass the `NIM_LOG_LEVEL` environment variable when starting the NIM. For example:
```
docker run -e NIM_LOG_LEVEL=DEBUG
```
This sets the logging level to `DEBUG`, which logs all inputs and outputs for each endpoint of the server.

### Best Practices

When setting the logging level, you should consider the trade-off between logging detail and log size. If you set the logging level to `DEBUG`, you can generate very large logs that can be difficult to manage. However, if you set the logging level to a higher level (such as `INFO` or `WARNING`), you can miss important debugging information.

It is generally recommended to set the logging level to `INFO` or `WARNING` unless you have a specific need for more detailed logging.

### Default Logging Level

If no value is provided for `NIM_LOG_LEVEL`, the default logging level will be
`INFO`. This means logs of level `INFO` and higher are recorded.

## Telemetry Configuration

The ProteinMPNN NIM includes optional telemetry capabilities that help NVIDIA improve performance, compatibility, and reliability, while maintaining strict privacy protections.

### Environment Variables

| ENV | Required? | Default | Notes |
| --- | --------- | ------- | ----- |
| `NIM_TELEMETRY_MODE` | No | `0` | Controls telemetry collection. Set to `0` to disable telemetry (default), set to `1` to enable telemetry. Telemetry helps NVIDIA improve performance, compatibility, and reliability, while maintaining strict privacy protections. For more information, refer to [NVIDIA's Privacy Policy](https://www.nvidia.com/en-us/about-nvidia/privacy-policy/) and [NIM Telemetry Settings](https://developer.nvidia.com/docs/nim-tools/latest/templates/nimlib/nim-telemetry.html). |
| `NIM_TELEMETRY_ENABLE_LOGGING` | No | `true` | Enables logging for telemetry operations when set to `true`. Only applicable when `NIM_TELEMETRY_MODE=1`. |

### Example: Running with Telemetry Enabled

The following example shows how to run the NIM with telemetry enabled:

```bash
export LOCAL_NIM_CACHE=~/.cache/nim
```


```bash
export NGC_API_KEY=<Your NGC API Key>

docker run -it \
    --runtime=nvidia \
    --gpus='"device=0"' \
    -p 8000:8000 \
    -e NGC_API_KEY \
    -e NIM_TELEMETRY_MODE=1 \
    -e NIM_TELEMETRY_ENABLE_LOGGING=true \
    -v "$LOCAL_NIM_CACHE":/home/nvs/.cache/nim \
    nvcr.io/nim/ipd/proteinmpnn:latest
```

### Example: Running with Telemetry Disabled (Default)

To explicitly disable telemetry:

```bash
export LOCAL_NIM_CACHE=~/.cache/nim
```


```bash
export NGC_API_KEY=<Your NGC API Key>

docker run -it \
    --runtime=nvidia \
    --gpus='"device=0"' \
    -p 8000:8000 \
    -e NGC_API_KEY \
    -e NIM_TELEMETRY_MODE=0 \
    -v "$LOCAL_NIM_CACHE":/home/nvs/.cache/nim \
    nvcr.io/nim/ipd/proteinmpnn:latest
```