diff --git a/docs/changes/newsfragments/339.bugfix b/docs/changes/newsfragments/339.bugfix new file mode 100644 index 000000000..e4e3e1c3d --- /dev/null +++ b/docs/changes/newsfragments/339.bugfix @@ -0,0 +1 @@ +Fix validation failure of multiple Preprocessors with different input data types requirement by `Synchon Mandal`_ diff --git a/junifer/markers/collection.py b/junifer/markers/collection.py index 2ffdff94f..cfdf20a0e 100644 --- a/junifer/markers/collection.py +++ b/junifer/markers/collection.py @@ -136,9 +136,14 @@ class MarkerCollection: "Validating Preprocessor: " f"{preprocessor.__class__.__name__}" ) + # Copy existing data types + old_t_data = t_data.copy() + logger.info(f"Preprocessor input type: {t_data}") # Validate preprocessor - t_data = preprocessor.validate(t_data) - logger.info(f"Preprocess output type: {t_data}") + new_t_data = preprocessor.validate(old_t_data) + # Set new data types + t_data = list(set(old_t_data) | set(new_t_data)) + logger.info(f"Preprocessor output type: {t_data}") for marker in self._markers: logger.info(f"Validating Marker: {marker.name}")