mirror of
https://github.com/unslothai/unsloth.git
synced 2026-08-11 01:44:04 +00:00
test_torch_constraint.sh asserted how many times each pin appears in install.sh. Every hardware branch assigns its own torch/torchvision/torchaudio triple, so #7354 adding gfx906 pushed three of those counts up by one and Backend CI has been red on main since: FAIL: default TORCH_CONSTRAINT assignment exists (expected '1', got '2') FAIL: hardcoded torch>=2.4 appears exactly once (expected '1', got '2') FAIL: torchvision bounded (<0.26) at default + custom-leaf (expected '2', got '3') FAIL: torchaudio bounded (<2.11) at default + custom-leaf (expected '2', got '3') install.sh is correct; the numbers were the stale part. Assert the invariants instead, so the next hardware branch is not a test edit: - the default assignment is the top-level one, so anchor the grep at column 0 rather than counting every occurrence. An indented branch pin no longer satisfies it, which the old count did not distinguish either. - what "appears exactly once" really guarded is that no pip install line spells a pin out instead of using "$TORCH_CONSTRAINT", so check that directly. - companions must be bounded everywhere, so compare bounded assignments against total assignments rather than pinning a count of 2. That is strictly stronger: it now covers all 7, not the 2 the old numbers happened to name. 45 pass, 0 fail. Each new assertion fails when its property is broken: a bare or unbounded companion, a hardcoded pin on an install line, or a missing top-level default. |
||
|---|---|---|
| .. | ||
| test_apt_distro_prompt.sh | ||
| test_get_torch_index_url.sh | ||
| test_install_host_defaults.sh | ||
| test_install_rollback_lifecycle.sh | ||
| test_install_uv_override_space.sh | ||
| test_mac_intel_compat.sh | ||
| test_node_decision.sh | ||
| test_nvcc_meets_llama_minimum.sh | ||
| test_previous_torch_pin.sh | ||
| test_redact_install_output.sh | ||
| test_resolve_cuda_archs.sh | ||
| test_staged_validation_enabled.sh | ||
| test_strixhalo_wsl_reroute.sh | ||
| test_studio_home_node_dir.sh | ||
| test_system_node_readonly.sh | ||
| test_tauri_install_exit_order.sh | ||
| test_torch_constraint.sh | ||
| test_torch_flavor.sh | ||
| test_uninstall_shared_icon.sh | ||
| test_unsloth_torch_override.sh | ||
| test_with_llama_cpp_dir_flag.sh | ||
| test_with_llama_cpp_dir_link_behavior.sh | ||