[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
d5f90332b4
commit
29a0f2ef08
3 changed files with 3 additions and 4 deletions
|
|
@ -4371,7 +4371,6 @@ async def _maybe_auto_switch_model(
|
|||
file_variant = None
|
||||
if not variant and target_id.lower().endswith(".gguf"):
|
||||
from hub.utils.gguf import extract_quant_label
|
||||
|
||||
file_variant = extract_quant_label(os.path.basename(target_id))
|
||||
override = {}
|
||||
for override_key in (
|
||||
|
|
|
|||
|
|
@ -314,6 +314,8 @@ def test_api_monitor_records_whether_the_caller_used_an_api_key():
|
|||
by_id = {entry["id"]: entry for entry in monitor.snapshot(subject = "u")}
|
||||
assert by_id[ui]["via_api_key"] is False
|
||||
assert by_id[api]["via_api_key"] is True
|
||||
|
||||
|
||||
def test_api_monitor_disabled_is_noop():
|
||||
monitor = ApiMonitor(max_entries = 3, enabled = False)
|
||||
|
||||
|
|
|
|||
|
|
@ -4763,9 +4763,7 @@ def test_save_updates_the_existing_case_variant_instead_of_forking_it(monkeypatc
|
|||
_mock_override_store(monkeypatch)
|
||||
settings.set_model_override("unsloth/b-gguf:q4_k_m", max_seq_length = 8192)
|
||||
settings_route.update_openai_auto_switch_override(
|
||||
settings_route.ModelOverridePayload(
|
||||
model_id = "unsloth/B-GGUF:Q4_K_M", max_seq_length = 4096
|
||||
),
|
||||
settings_route.ModelOverridePayload(model_id = "unsloth/B-GGUF:Q4_K_M", max_seq_length = 4096),
|
||||
"tester",
|
||||
)
|
||||
assert list(settings.get_model_overrides()) == ["unsloth/b-gguf:q4_k_m"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue