PyTorch logo

Torch Checkpoint Inspector

VS Code Extension for .pt/.pth Files

Inspect PyTorch checkpoints directly in VS Code with a dedicated custom editor, configurable Python interpreter selection, and trusted-file unsafe-load support.

Install Extension

Install from your preferred extension registry, then open any `.pt` or `.pth` file in VS Code to inspect checkpoint content in the custom editor.

Native Checkpoint Viewer

Inspect `.pt` and `.pth` files in a dedicated VS Code custom editor instead of raw binary output.

Python Environment Aware

Uses `torchCheckpointInspector.pythonPath`, VS Code Python extension, or `python3` as fallback.

Safer Loading Defaults

Supports optional unsafe loading for trusted files using `torchCheckpointInspector.allowUnsafeLoad`.

DataFrame/Numpy Friendly

Works with checkpoints that include tensors and common scientific Python objects.

Requirements

  • VS Code 1.85 or newer (or compatible OSS/Cursor build)
  • Python with PyTorch installed
  • pandas and numpy when checkpoints include DataFrame-related content
Top