Repository navigation
fix: improve uv run tab completion for #520 - #521
Merged
Merged
Conversation
TATP-233
approved these changes
May 28, 2026
TATP-233
added a commit
that referenced
this pull request
May 30, 2026
fix: improve uv run tab completion for #520
TATP-233
added a commit
that referenced
this pull request
May 30, 2026
fix: improve uv run tab completion for #520
TATP-233
added a commit
that referenced
this pull request
Sep 4, 2026
fix: improve uv run tab completion for #520
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
uv run eval --load-run <TAB>的误导补全:现在返回已支持的 latest-run 别名-1,并在已有--algo/--task/--sim上下文时补全当前任务日志目录下的真实 run 目录名,不再返回无关 flags。train/eval --profile <TAB>增加值补全:从已有 task owner metadata 中派生 profile 名称。PYTHONPATH=<repo>/src调用 Python module。unilab.__init__中不必要的etils依赖,使轻量 completion import 可以在完整运行时依赖不可用时工作。--load-run的-1和真实 run 目录候选、profile 候选过滤、前缀匹配、training.log_root、profile 覆盖algo_log_name,以及选中 profile 后的 task 过滤。用户可见行为变化:
eval --load-run <TAB>现在提示-1和匹配的真实 run 目录名,不再提示无效 flags。train/eval --profile <TAB>在存在 profile owner YAML 时会提示匹配的 profile 名称。训练影响:
验证
make checkuv run --active --no-sync pytest -m "not slow"python -m pytest验证结果说明:
PYTHONPATH=src uv run --no-sync python -m unilab.tools.completion --cword 2 -- uv run ""返回了预期的一层候选:train、eval、demo、unilab-complete、unilab-export-scene、unilab-viz-nan、benchmark/、scripts/。scripts/completions/unilab.bash后直接调用_unilab_uv_complete,返回了同样的一层候选。zsh -n scripts/completions/unilab.zsh通过。uv sync --active --extra motrix完成依赖同步。uv run --active --no-sync pytest tests/test_completion.py -q通过:9 passed in 0.07s。uv run --active --no-sync pytest -m "not slow"通过:1006 passed, 15 skipped, 254 deselected, 62 warnings in 68.80s。uv pip install --python "$CONDA_PREFIX/bin/python" -e ".[motrix]" --group dev已将 UniLab 运行和开发依赖安装到conda activate unilab对应的 Python 环境中。python -m pytest tests/test_completion.py -q通过:9 passed in 0.07s。python -m pytest通过。由于仓库pyproject.toml默认addopts = "--tb=short -m 'not slow'",实际执行的是非 slow 集合:1006 passed, 15 skipped, 254 deselected, 62 warnings in 39.54s。影响
nonebothno