Implementation:Deepspeedai DeepSpeed Ds Report Main
| Knowledge Sources | |
|---|---|
| Domains | Distributed_Training, Environment_Validation, System_Configuration |
| Last Updated | 2026-02-09 00:00 GMT |
Overview
Concrete tool for diagnosing DeepSpeed environment compatibility provided by the DeepSpeed library.
Description
The main() function in deepspeed/env_report.py prints a diagnostic report about the system: CUDA version, torch version, compiler availability, and the build status of each DeepSpeed operator builder (FusedAdam, CPUAdam, Transformer, etc.). It delegates to two sub-reports:
- op_report(): Iterates over all registered operator builders and prints their installation status, compatibility, and any build errors
- debug_report(): Prints system-level information including Python version, PyTorch version, CUDA version, and compiler paths
The function can be invoked from the command line via ds_report or ds_env CLI entry points, or programmatically via the Python API.
Usage
Use ds_report as a first diagnostic step before launching any DeepSpeed training job. Run it on every node in a distributed cluster to verify consistent environment configurations. Pass --hide_operator_status to suppress operator builder details, or --hide_errors_and_warnings to suppress verbose error output.
Code Reference
Source Location
- Repository: DeepSpeed
- File: deepspeed/env_report.py
- Lines: 176-188
Signature
def main(hide_operator_status=False, hide_errors_and_warnings=False):
if not hide_operator_status:
op_report(verbose=not hide_errors_and_warnings)
debug_report()
Import
from deepspeed.env_report import main
Or from the command line:
ds_report
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| hide_operator_status | bool | No | Suppress display of operator builder status (default: False) |
| hide_errors_and_warnings | bool | No | Suppress error and warning messages (default: False) |
Outputs
| Name | Type | Description |
|---|---|---|
| (stdout) | str | Printed diagnostic report including CUDA version, torch version, compiler info, and operator builder status |
Usage Examples
# From CLI:
# ds_report
# From Python - full report:
from deepspeed.env_report import main
main()
# From Python - suppress operator status:
main(hide_operator_status=True)
# From Python - suppress errors and warnings:
main(hide_errors_and_warnings=True)