[Misc] Replace assert with proper exceptions for security and validation in pooling (#43286)

Signed-off-by: Taneem Ibrahim <taneem.ibrahim@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
Taneem Ibrahim
2026-05-22 18:43:33 +08:00
committed by GitHub
co-authored by Claude Opus 4.6 Nick Hill
parent d3d1cf6972
commit b3c7ffcab8
4 changed files with 37 additions and 17 deletions
@@ -212,7 +212,7 @@ class TestGetActFn:
problem_type="",
sentence_transformers={"activation_fn": "os.system"},
)
with pytest.raises(AssertionError, match="restricted"):
with pytest.raises(ValueError, match="restricted"):
get_act_fn(cfg)