Metadata-Version: 2.4
Name: pytest-denpex
Version: 0.1.0
Summary: Pytest plugin for automatic GPU, CUDA, PyTorch, NCCL, and vLLM test failure root-cause analysis with Denpex.
Author-email: Denpex <support@denpex.com>
License: MIT
Project-URL: Homepage, https://denpex.com
Project-URL: Documentation, https://denpex.com/docs/ci
Project-URL: API Reference, https://denpex.com/docs/api
Project-URL: Python Agent & CLI, https://denpex.com/docs/agent
Project-URL: CI & GitHub Action, https://denpex.com/docs/ci
Project-URL: VS Code Extension, https://denpex.com/vscode
Project-URL: Open VSX Extension, https://denpex.com/openvsx
Project-URL: GPU Failure Encyclopedia, https://denpex.com/failures
Project-URL: Free GPU Debugging Tools, https://denpex.com/tools
Project-URL: Changelog, https://denpex.com/changelog
Project-URL: Repository, https://github.com/Denpex/gpu-failure-cheatsheet
Project-URL: Issue Tracker, https://denpex.com/contact
Keywords: pytest,gpu,cuda,pytorch,nccl,xid,vllm,slurm,mlops,distributed-training,crash-diagnostics
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: denpex-sdk>=0.2.3

# `pytest-denpex`: Automatic GPU, CUDA, PyTorch & NCCL Test Failure Diagnostics for Pytest

`pytest-denpex` is a Pytest plugin that automatically detects and classifies GPU, CUDA Out-of-Memory (OOM), NCCL collective timeout, NVIDIA Xid hardware fault, and vLLM failures during `pytest` runs.

When a test fails with a GPU or distributed training exception, `pytest-denpex` appends a root-cause summary at the end of your test session and optionally queries the Denpex API when `DENPEX_API_KEY` is set.

## Installation

```bash
pip install pytest-denpex
```

## Usage

Once installed, `pytest-denpex` activates automatically via the `pytest11` entry point:

```bash
pytest
```

For full cloud-assisted multi-rank forensics in CI, set `DENPEX_API_KEY`:

```bash
export DENPEX_API_KEY="dpx_your_key"
pytest
```

## Official Denpex Ecosystem & Documentation

| Resource | URL | Description |
| :--- | :--- | :--- |
| **Denpex Platform** | [https://denpex.com](https://denpex.com) | GPU crash forensics and distributed training diagnostics |
| **Interactive Console** | [https://denpex.com/console](https://denpex.com/console) | Browser-based log analyzer with zero-egress local mode |
| **Documentation Hub** | [https://denpex.com/docs](https://denpex.com/docs) | Full integration guides for Kubernetes, Slurm, and PyTorch |
| **5-Minute Quickstart** | [https://denpex.com/docs/quickstart](https://denpex.com/docs/quickstart) | Get your first GPU crash diagnosis in under 5 minutes |
| **Python Agent & CLI** | [https://denpex.com/docs/agent](https://denpex.com/docs/agent) | Single-file agent and `pip install denpex` CLI reference |
| **REST API & SDKs** | [https://denpex.com/docs/api](https://denpex.com/docs/api) | HTTP endpoints, Python SDK, TypeScript SDK, and MCP server |
| **CI & GitHub Action** | [https://denpex.com/docs/ci](https://denpex.com/docs/ci) | Automated preflight and post-failure diagnosis in CI |
| **VS Code Extension** | [https://denpex.com/vscode](https://denpex.com/vscode) | Offline log diagnostics for Visual Studio Code |
| **Open VSX Extension** | [https://denpex.com/openvsx](https://denpex.com/openvsx) | Extension for Cursor, Windsurf, VSCodium, and Gitpod |
| **Failure Encyclopedia** | [https://denpex.com/failures](https://denpex.com/failures) | Searchable database of 700+ GPU, CUDA, and NCCL failure signatures |
| **Free GPU Calculators** | [https://denpex.com/tools](https://denpex.com/tools) | VRAM calculators, NCCL timeout calculators, and topology tools |
| **NVIDIA Xid Reference** | [https://denpex.com/xid](https://denpex.com/xid) | Hardware fault guide for Xid 31, 43, 48, 63, 74, 79, 94, 95, 119 |
| **NCCL Error Guide** | [https://denpex.com/nccl-errors](https://denpex.com/nccl-errors) | Root-cause analysis for collective timeouts and IB fabric drops |
| **CUDA Error Guide** | [https://denpex.com/cuda-errors](https://denpex.com/cuda-errors) | OOM, device-side assert, illegal memory access, and driver mismatches |
| **vLLM Error Guide** | [https://denpex.com/vllm-errors](https://denpex.com/vllm-errors) | KV cache exhaustion, PagedAttention, and tensor-parallel hangs |
| **Slurm GPU Guide** | [https://denpex.com/slurm-gpu-errors](https://denpex.com/slurm-gpu-errors) | Epilog scripts, cgroup OOM kills, and srun rank failures |
