allow bf16 flag but warn (#3563) [skip ci]

* allow bf16 flag but warn

Reason: when doing e.g. LoRA merges with CUDA_VISIBLE_DEVICES=, this will unnecessarily crash, even though the LoRA merge operation would have finished successfully. This seems to warrant changing it to a warning instead, as the code will most likely crash later if bf16 is unavailable and training begins anyway.

* don't use deprecated LOG.warn

* update tests to reflect validation change
This commit is contained in:
kallewoof
2026-04-01 22:54:01 +09:00
committed by GitHub
parent 9e64c76326
commit f6c122b76d
2 changed files with 7 additions and 3 deletions

View File

@@ -726,8 +726,12 @@ class TestValidation(BaseValidation):
| minimal_cfg
)
with pytest.raises(ValueError, match=r".*AMP is not supported on this GPU*"):
with self._caplog.at_level("WARNING"):
AxolotlConfigWCapabilities(**cfg.to_dict())
assert any(
"AMP is not supported" in record.message
for record in self._caplog.records
)
cfg = (
DictDefault(