Skip to main content

Module lint

Module lint 

Source
Expand description

APR Format Lint Module - Best Practices & Conventions

Implements APR-SPEC §4.11: Lint Command

Static analysis for best practices, conventions, and “soft” requirements. Unlike validate (which checks for corruption/invalidity), lint checks for quality and standardization.

§Checks Performed

  • Metadata: Missing license, model_card, or provenance (WARN)
  • Tensor Naming: Names not matching canonical schema (INFO/WARN)
  • Efficiency: Tensors unaligned to 64 bytes (INFO)
  • Compression: Uncompressed tensors >1MB (INFO)

Structs§

LintIssue
A single lint issue found during analysis
LintReport
Complete lint report for a model
ModelLintInfo
Information extracted from a model for linting
TensorLintInfo
Information about a single tensor for linting

Enums§

LintCategory
Category of lint check
LintLevel
Severity level for lint issues

Functions§

lint_apr_file
Lint an APR file from disk (supports both v1 and v2 formats)
lint_model
Run lint checks on model info
lint_model_file
Lint any model file from disk (APR, GGUF, or SafeTensors)