Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Heuristic:Microsoft LoRA Warning Deprecated Legacy Examples

From Leeroopedia



Knowledge Sources
Domains NLP, Deprecation
Last Updated 2026-02-10 06:00 GMT

Overview

Deprecation warning for HuggingFace Transformers example scripts in the legacy/ directory, which are not actively maintained.

Description

The examples/NLU/examples/legacy/ directory contains community-contributed example scripts that are not actively maintained by the repository authors. The legacy README explicitly states: "This folder contains examples which are not actively maintained (mostly contributed by the community)." These scripts may use outdated APIs, deprecated PyTorch Lightning patterns, or obsolete training workflows. Modern replacements exist in the non-legacy example directories.

Usage

Apply this warning when referencing any Implementation page whose source file resides in the examples/NLU/examples/legacy/ directory. Users should prefer the modern equivalents in the non-legacy directories when available.

The Insight (Rule of Thumb)

  • Action: Check whether a modern (non-legacy) equivalent exists before using legacy scripts.
  • Value: Legacy scripts may reference outdated HF Transformers APIs (pre-v4.x patterns).
  • Trade-off: Legacy scripts may still work but are not tested against current library versions and may break without notice.
  • Known Issues: `lightning_base.py` contains `# TODO: remove with PyTorch 1.6` markers; `run_ner.py` references deprecated `test_end` PL callback.

Reasoning

The legacy directory was explicitly marked as unmaintained in the repository README. Modern equivalents (e.g., `examples/NLU/examples/token-classification/run_ner.py` replaces `examples/NLU/examples/legacy/token-classification/run_ner.py`) use the current HF Trainer API and are actively tested. Using legacy scripts risks compatibility issues with newer versions of PyTorch, Transformers, and PyTorch Lightning.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment