Skip to content

test: cover env helpers; fail fast on GPU without CUDA#966

Merged
wheresmyhair merged 1 commit intoOptimalScale:mainfrom
Jingyuan-zhu:test/envs-coverage-and-typing
Apr 25, 2026
Merged

test: cover env helpers; fail fast on GPU without CUDA#966
wheresmyhair merged 1 commit intoOptimalScale:mainfrom
Jingyuan-zhu:test/envs-coverage-and-typing

Conversation

@Jingyuan-zhu
Copy link
Copy Markdown
Contributor

Adds unit tests and a small API around lmflow.utils.envs, and sends pipeline GPU setup through one helper so that when GPU execution needs CUDA but it is missing, the failure is a clear RuntimeError instead of a low-level torch error.

  • Add is_accelerate_env, device helpers, CUDA checks, and tests in utils/envs
  • Replace raw torch.cuda.set_device in evaluator/inferencer/rm_inferencer with set_cuda_device

- Add is_accelerate_env, device helpers, CUDA checks, and tests in utils/envs
- Replace raw torch.cuda.set_device in evaluator/inferencer/rm_inferencer with set_cuda_device
Copy link
Copy Markdown
Collaborator

@wheresmyhair wheresmyhair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wheresmyhair wheresmyhair merged commit f3597db into OptimalScale:main Apr 25, 2026
1 check failed
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.

2 participants