diff --git a/flash/core/data/data_source.py b/flash/core/data/data_source.py index e41f598a5c..5646b7b601 100644 --- a/flash/core/data/data_source.py +++ b/flash/core/data/data_source.py @@ -552,7 +552,8 @@ def load_data( ) -> Sequence[Mapping[str, Any]]: data, input_key, target_keys, root, resolver = data - if isinstance(data, str): + if isinstance(data, (str, Path)): + data = str(data) data_frame = pd.read_csv(data) if root is None: root = os.path.dirname(data)