This commit is contained in:
Alexander Myasoedov
2025-11-30 18:32:58 +02:00
parent b3ae0026fb
commit f19664f95c
2 changed files with 3 additions and 4 deletions
+2 -4
View File
@@ -4,8 +4,8 @@ import warnings
import joblib
import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.exceptions import InconsistentVersionWarning
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.preprocessing import StandardScaler
from sklearn.svm import OneClassSVM
@@ -91,9 +91,7 @@ class RefusalClassifier:
self.model = joblib.load(f)
# Load vectorizer
with pkg_resources.open_binary(
package, "tfidf_vectorizer.joblib"
) as f:
with pkg_resources.open_binary(package, "tfidf_vectorizer.joblib") as f:
self.vectorizer = joblib.load(f)
# Load scaler
+1
View File
@@ -4,6 +4,7 @@ import warnings
import pytest
from cache_to_disk import delete_old_disk_caches
from sklearn.exceptions import InconsistentVersionWarning
from agentic_security.logutils import logger
# Silence noisy third-party warnings that do not impact test behavior