Hi everyone, I just upgrade to kedro 1.1 and I'm n...
# questions
j
Hi everyone, I just upgrade to kedro 1.1 and I'm now getting this warning when I run my pipeline. Can anyone tell me why this happens and how to address it? WARNING /Users/corkhll/opt/miniconda3/envs/kedro_workspace/lib/python3.10/site-packages/kedro_datasets/polars/eager_polars_dataset.py159 UserWarning: Polars found a filename. Ensure you pass a path to the file instead of a python file warnings.py:109 object when possible for best performance.
m
Hi @Jeraime Griffith , the latest Kedro version is 0.19.6. Are you perhaps talking about having upgraded Kedro-datasets?
j
also, can you show your dataset with type
type: polars.EagerPolarsDataset
? looking at the line number, I'm guessing you have
kedro-datasets<4
https://github.com/kedro-org/kedro-plugins/blob/kedro-datasets-3.0.1/kedro-datasets/kedro_datasets/polars/eager_polars_dataset.py#L159
j
@Juan Luis Yes my kedro-datasets is 3.0.1
๐Ÿ‘€ 1
My datasets are EagerPolarsDataset
m
Ah okay so itโ€™s polars you updated. Is there perhaps a change in their API that now requires different input?
j
@Merel I'm exploring the upgrade and trying to understand the warning and what it means. As @Juan Luis indicated I have kedro-datasets=3.0.1. I have upgraded this as well and now the warning is pointing me to kedro_datasets/polars/eager_polars_dataset.py161 https://github.com/kedro-org/kedro-plugins/blob/064c5d9bc491a3f96f4341a2c2d1f034b7[โ€ฆ]cb/kedro-datasets/kedro_datasets/polars/eager_polars_dataset.py
j
@Jeraime Griffith how does your dataset definition look like?
Copy code
ds:
  type: polars.EagerPolarsDataset
  filepath: ???
  file_format: ???
(or, at least, what filetype are you trying to load?)
j
books: type: polars.EagerPolarsDataset file_format: parquet filepath: data/01_raw/books.parquet load_args: low_memory: True save_args: compression: gzip
j
looks like indeed it's new behavior on Polars 1.1 https://github.com/pola-rs/polars/pull/17315
j
I see. Very recent. I'll have to wait for the next update or down grade my version
j
it's a harmless warning anyway! Polars is telling Kedro that there's a more efficient way of reading the file
๐Ÿ‘๐Ÿพ 1
you don't need to do anything