This commit is contained in:
Alexander Myasoedov committed 2025-11-30 18:32:58 +02:00
1 parent b3ae0026fb
commit f19664f95c
2 files changed
+3 -4

No files matched your search

+2 -4
View File
@@ -4,8 +4,8 @@ import warnings
import joblib import joblib
import pandas as pd import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.exceptions import InconsistentVersionWarning from sklearn.exceptions import InconsistentVersionWarning
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.preprocessing import StandardScaler from sklearn.preprocessing import StandardScaler
from sklearn.svm import OneClassSVM from sklearn.svm import OneClassSVM
@@ -91,9 +91,7 @@ class RefusalClassifier:
self.model = joblib.load(f) self.model = joblib.load(f)
# Load vectorizer # Load vectorizer
with pkg_resources.open_binary( with pkg_resources.open_binary(package, "tfidf_vectorizer.joblib") as f:
package, "tfidf_vectorizer.joblib"
) as f:
self.vectorizer = joblib.load(f) self.vectorizer = joblib.load(f)
# Load scaler # Load scaler
+1
View File
@@ -4,6 +4,7 @@ import warnings
import pytest import pytest
from cache_to_disk import delete_old_disk_caches from cache_to_disk import delete_old_disk_caches
from sklearn.exceptions import InconsistentVersionWarning from sklearn.exceptions import InconsistentVersionWarning
from agentic_security.logutils import logger from agentic_security.logutils import logger
# Silence noisy third-party warnings that do not impact test behavior # Silence noisy third-party warnings that do not impact test behavior