Data_Block Issue

Currently trying to bring in a custom image dataset as a datablock per here
Have just completed a new install on conda env (python 3.8.3)
Running fastai version 2.3.1 locallly.
I’m working in Jupyter
I ran

   from import *
        data = (ImageList.from_folder('UGI_data')

I got this error -
name 'ImageList' is not defined
Have tried restarting the kernel, however there was no change.
Any help/advice much appreciated, thank you

from import *
from import *

You’re trying to use fastai v1 with fastai v2, v2 is incompatible and a new API. The last version of v1 is 1.0.61 so pip install fastai==1.0.61

1 Like

Thank you for your time Renato
I tried
from import *
however got the same error
name 'ImageList' is not defined

Thank you for your time and for pointing what I should have picked up.
The correct datablocks documentation for fastai v2 is here, am I correct?
I have a dataset composed of unlabelled test and train images, all are .png files.
After bringing in the following
from import *
from import *
from import *
I managed to get the image files as follows
fnames = get_image_files('UGI_data')
path = Path('UGI_data')
which gives
then into a datablock
dsets = dblock.datasets(fnames)
I am unclear as to how I could follow the existing fastai v2 documentation further as the examples use predefined, labelled datasets as far as I can see. If you aware of any v2 documentation that covers working with custom, unlabelled datasets I hope you would point me in the right direction. Thus far I have only been able to find examples covering MNIST, CelebA etc.
Thank you again for your time and advice.