unsloth/studio/backend/utils
Datta Nimmaturi 3b5a49776b
[studio] multi gpu: revert to balanced for inference. (#4698)
* Revert to balanced for inference

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Remove unused for_inference parameter from get_device_map

Since inference and training both use "balanced" now, the for_inference
flag is dead code. Remove it from the function signature, the call site
in inference.py, and simplify the tests accordingly.

* Remove redundant TestDeviceMapForInference test class

TestGpuAutoSelection already covers the same multi-gpu and single-gpu
device_map assertions. The TestDeviceMapForInference class was left
over from when for_inference had distinct behavior.

* Remove redundant test_get_device_map_multi_gpu_uses_balanced

Its assertions ([0,1] -> balanced, [0] -> sequential) are already
covered by test_get_device_map_uses_explicit_gpu_selection.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Daniel Han <danielhanchen@gmail.com>
2026-03-31 01:24:41 -07:00
..
datasets fix(studio): avoid UnicodeEncodeError on Windows cp1252 consoles (#4699) 2026-03-30 06:40:47 -07:00
hardware [studio] multi gpu: revert to balanced for inference. (#4698) 2026-03-31 01:24:41 -07:00
inference studio: improve onboarding UX, tooltips, and training defaults (#4355) 2026-03-17 07:46:07 -07:00
models Fix HF cache default and show LM Studio models in chat/inference (#4653) 2026-03-27 06:59:27 -07:00
paths fix: preserve Windows drive-letter paths on native Windows (#4665) 2026-03-27 08:19:41 -07:00
.gitkeep root studio folder 2026-02-02 09:13:49 +00:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
cache_cleanup.py fix(studio): prevent ModuleNotFoundError in dataset.map() on Windows (#4473) 2026-03-22 06:11:24 -07:00
downsample.py feat(studio): training history persistence and past runs viewer (#4501) 2026-03-25 00:58:55 -07:00
transformers_version.py feat: support GGUF export for non-PEFT models + fix venv_t5 switching for local checkpoints (#4455) 2026-03-20 12:13:18 +04:00
utils.py Final cleanup 2026-03-12 18:28:04 +00:00