Original filenames from test directory predicting with is_test true?

Thanks @joshfp
After updating fastai I can do:

data.test_ds.ds.x[0].parts[-1]

to get the filename of the 1st test file.

For more details how to deal with PosixPath : pathlib — Object-oriented filesystem paths — Python 3.12.5 documentation

By the way, after updating fastai, you should note that ConvLearner has been replaced with create_cnn
source:

2 Likes