[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
7814e2c261
commit
881ec95d23
2 changed files with 5 additions and 9 deletions
|
|
@ -281,9 +281,7 @@ class TestCudaRepairSkips:
|
|||
import contextlib
|
||||
|
||||
def _with(url):
|
||||
with patch.dict(
|
||||
stack_mod.os.environ, {"UNSLOTH_TORCH_INDEX_URL": url}, clear = False
|
||||
):
|
||||
with patch.dict(stack_mod.os.environ, {"UNSLOTH_TORCH_INDEX_URL": url}, clear = False):
|
||||
stack_mod.os.environ.pop("UNSLOTH_TORCH_INDEX_FAMILY", None)
|
||||
return stack_mod._explicit_cuda_torch_index_url()
|
||||
|
||||
|
|
|
|||
|
|
@ -786,9 +786,9 @@ class TestEnsureRocmTorch:
|
|||
_args = [str(a) for a in _call.args]
|
||||
if "--index-url" in _args:
|
||||
_url = _args[_args.index("--index-url") + 1]
|
||||
assert "rocm7.2" not in _url or "torch" not in " ".join(_args), (
|
||||
"torch must not be reinstalled when the pin already matches"
|
||||
)
|
||||
assert "rocm7.2" not in _url or "torch" not in " ".join(
|
||||
_args
|
||||
), "torch must not be reinstalled when the pin already matches"
|
||||
# A torch reinstall would pass torch>=... as a positional; assert none did.
|
||||
assert not any(
|
||||
any(str(a).startswith("torch") for a in _c.args) for _c in mock_pip.call_args_list
|
||||
|
|
@ -2990,9 +2990,7 @@ class TestStrixRocm71Override:
|
|||
# families with the <2.11 _grouped_mm bug (gfx120X-all / gfx1151 / gfx1150)
|
||||
# are pushed to 2.11 -- a bare gfx* would also floor gfx110X-all/gfx90a/
|
||||
# gfx908, which the automatic AMD path intentionally leaves bare.
|
||||
assert (
|
||||
'case "$_torch_index_leaf" in\n rocm7.2|gfx120x-all|gfx1151|gfx1150)' in source
|
||||
), (
|
||||
assert 'case "$_torch_index_leaf" in\n rocm7.2|gfx120x-all|gfx1151|gfx1150)' in source, (
|
||||
"the torch>=2.11 constraint must match the specific gfx leaves that need "
|
||||
"it (rocm7.2|gfx120x-all|gfx1151|gfx1150), not a bare gfx* or the whole URL"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue