Skip to content

Commit

Permalink
Use correct column_type in ColumnDriftMetric when used with descripto…
Browse files Browse the repository at this point in the history
…rs. (#1163)
  • Loading branch information
Liraim authored Jun 20, 2024
1 parent 37adb48 commit b30747c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/evidently/metrics/data_drift/column_drift_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ def calculate(self, data: InputData) -> ColumnDataDriftMetrics:
column_type = ColumnType.Numerical
if self.column_name.is_main_dataset():
column_type = data.data_definition.get_column(self.column_name.name).column_type
else:
if self.column_name._feature_class is not None:
column_type = self.column_name._feature_class.feature_type

datetime_column = data.data_definition.get_datetime_column()
options = DataDriftOptions(all_features_stattest=self.stattest, threshold=self.stattest_threshold)
if self.get_options().render_options.raw_data:
Expand Down

0 comments on commit b30747c

Please sign in to comment.