Skip to content

Make traker optional for LESS/NICE installation #40

@luojiyin1987

Description

@luojiyin1987

Problem

traker is currently listed in the base requirements.txt. This makes first-time installation much heavier than necessary, because traker pulls in large PyTorch/CUDA wheels even when the user does not plan to run LESS or NICE.

In practice this causes installation failures for new users on slower or unstable networks. For example, uv pip install -r requirements.txt can fail while downloading nvidia-cublas through the traker -> torch -> cuda-toolkit dependency chain.

Why this is a usability issue

  • LESS and NICE are optional algorithms, not part of the minimal path to try DataFlex.
  • New users should be able to install the base package and run lighter selectors/mixers without downloading the full traker stack.
  • Current failures happen during installation, before users even understand which algorithms require extra dependencies.

Proposed minimal fix

  1. Remove traker from the base requirements.txt.
  2. Add optional extras in pyproject.toml, for example .[traker], .[less], and .[nice].
  3. Lazy-load traker inside less_selector.py and nice_selector.py.
  4. Raise a clear error message when a user selects LESS or NICE without the optional dependency installed.
  5. Update both README.md and README-zh.md to document base installation vs optional LESS/NICE installation, including a timeout hint for uv.

Expected outcome

  • Base install becomes lighter and more reliable for first-time users.
  • Advanced users can still install LESS and NICE explicitly.
  • Installation errors become actionable instead of failing deep inside the CUDA dependency chain.

I have prepared a small patch for this and will open a PR linked to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions