Skip to content

Make traker optional for LESS/NICE installation#41

Closed
luojiyin1987 wants to merge 6 commits intoOpenDCAI:mainfrom
luojiyin1987:chore/optional-traker-install
Closed

Make traker optional for LESS/NICE installation#41
luojiyin1987 wants to merge 6 commits intoOpenDCAI:mainfrom
luojiyin1987:chore/optional-traker-install

Conversation

@luojiyin1987
Copy link
Copy Markdown
Contributor

Summary

This PR makes the traker dependency optional for first-time users and documents separate base vs optional installation paths.

Changes

  • remove traker from the base requirements.txt
  • add optional extras in pyproject.toml for traker, less, and nice
  • lazy-load traker in less_selector.py and nice_selector.py
  • raise clearer installation guidance when LESS or NICE is selected without traker
  • update README.md and README-zh.md with both uv and pip installation paths

Why

traker currently pulls in large PyTorch/CUDA wheels during base installation, even for users who do not intend to use LESS or NICE. On slower or unstable networks this can fail early in the onboarding flow.

Making it optional keeps the minimal install path lighter and more reliable while preserving explicit installation for advanced selectors.

Closes #40

Validation

  • python3 -m compileall src
  • parsed pyproject.toml successfully

Notes

This is intentionally a small change focused on installation UX. It does not alter training logic beyond dependency loading behavior for LESS and NICE.

@haolpku
Copy link
Copy Markdown
Contributor

haolpku commented Apr 4, 2026

Thanks for working on this and for thinking about the installation experience.

I took a closer look at the dependency side, and I think the situation here may be a bit different from what the PR description assumes. traker itself only depends on torch, numpy, and tqdm, and DataFlex already depends on packages like transformers, accelerate, peft, and trl, which already bring in PyTorch. So even if we remove traker from the base requirements, users would still end up installing the PyTorch/CUDA stack anyway.

Because of that, I don't think making traker optional would really make the base installation lighter in practice. At the same time, it would add one more step for LESS/NICE users and make those selectors fail at runtime if the extra dependency is missing.

So for now I’d prefer to keep traker in the default requirements. Still, thanks again for putting this together and for trying to improve the onboarding flow. If you see another way to simplify installation that would have a more concrete effect, I’d be very happy to discuss it.

@haolpku haolpku closed this Apr 4, 2026
@luojiyin1987
Copy link
Copy Markdown
Contributor Author

luojiyin1987 commented Apr 4, 2026

I tried to install it several times, but it failed. I use the Tsinghua source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make traker optional for LESS/NICE installation

2 participants