From 38a978b137820f75baa0dbaaa223c60d98c5c559 Mon Sep 17 00:00:00 2001 From: Ethan Harris Date: Fri, 13 Aug 2021 22:22:56 +0100 Subject: [PATCH] Fixes --- flash/core/data/data_source.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)