* Require a found ROCm DLL before forcing BNB_ROCM_VERSION in Studio paths main.py previously set BNB_ROCM_VERSION=72 whenever HIP_PATH or ROCM_PATH was set, and the training worker fell back to a blind 72 when DLL detection found nothing. On a Windows machine with the AMD HIP SDK installed but CUDA or CPU torch, that forces a ROCm backend onto a non-ROCm bitsandbytes wheel, which raises at import. Both paths now only write the override when a libbitsandbytes_rocm DLL actually exists (or a seeded value is already present), matching the strict gates in unsloth/import_fixes.py. Also removes four redundant local import shutil statements in unsloth/save.py that shadow the module-level import, the same pattern that caused the UnboundLocalError fixed in #6149. * Worker: gate the BNB override on a found ROCm DLL, preserving seeded marker Review follow-ups: track _found_rocm_bnb in the worker like main.py so a ROCm DLL with an unparsable name still gets the seeded or 72 fallback, and skip the env write entirely when no DLL exists so a seeded value keeps its sitecustomize marker and stays redetectable by later import fixes. |
||
|---|---|---|
| .. | ||
| assets | ||
| auth | ||
| core | ||
| hub | ||
| loggers | ||
| models | ||
| plugins | ||
| requirements | ||
| routes | ||
| state | ||
| storage | ||
| tests | ||
| utils | ||
| __init__.py | ||
| _platform_compat.py | ||
| colab.py | ||
| main.py | ||
| run.py | ||
| startup_banner.py | ||