Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #1234 #1253

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions src/evidently/tests/data_quality_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
from evidently.tests.utils import plot_correlations
from evidently.tests.utils import plot_value_counts_tables
from evidently.tests.utils import plot_value_counts_tables_ref_curr
from evidently.utils.data_preprocessing import ColumnDefinition
from evidently.utils.data_preprocessing import DataDefinition
from evidently.utils.generators import BaseGenerator
from evidently.utils.types import Numeric
Expand Down Expand Up @@ -1371,18 +1372,15 @@ class TestCatColumnsOutOfListValues(BaseGenerator):

def __init__(self, columns: Optional[List[str]] = None, is_critical: bool = True):
self.is_critical = is_critical
self.columns = columns
self.columns: Optional[List[str]] = columns

def generate(self, data_definition: DataDefinition) -> List[TestShareOfOutListValues]:
columns: List[ColumnDefinition]
if self.columns is None:
columns = data_definition.get_columns(ColumnType.Categorical, features_only=True)

else:
columns = [
column
for column in self.columns
if data_definition.get_column(column).column_type == ColumnType.Categorical
]
columns = [data_definition.get_column(column) for column in self.columns]
columns = [c for c in columns if c.column_type == ColumnType.Categorical]
return [
TestShareOfOutListValues(
column_name=column.column_name,
Expand Down
Loading