Skip to content

Delete scripts/benchmark/core/device_info.py re-export shim (#2474 P1) #2490

Closed

Description

@TATP-233

Summary

UniLab issue #2474 (shim/compatibility audit) flags scripts/benchmark/core/device_info.py as a pure re-export shim ("moved in issue #1240") that re-exports unilab.utils.device names with no added behavior.

This change deletes the shim and removes the re-export from scripts/benchmark/core/__init__.py; all benchmark consumers under scripts/benchmark/ (19 scripts) now import directly from unilab.utils.device.

Files changed

  • Deleted: scripts/benchmark/core/device_info.py
  • Modified: scripts/benchmark/core/__init__.py (removed re-export)
  • Modified: 19 benchmark scripts under scripts/benchmark/ (compute/env/physics/rl/torch_env) to import from unilab.utils.device directly

Guards

  • uv run pytest -q tests/utils/test_device.py tests/benchmark tests/utils/test_utils_package_policy.py — 168 passed, 1 skipped
  • uv run python scripts/benchmark/smoke_test.py — module-mode 34/34, script-mode 35/35 passed
  • uv run ruff check on all changed files — clean

Driving issue: UniLab issue #2474

Activity

  1. TATP-233 commented on Oct 22, 2026

    @TATP-233
    CollaboratorAuthor

    已完成,可以关闭:PR #2491 已合入当前 main(merge 2e28185e)。scripts/benchmark/core/device_info.py re-export shim 已删除,当前树中该文件不存在,benchmark 消费方改为直接导入 unilab.utils.device。

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

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