Hi @stas
in order me to use suggested : from fastai.callbacks.mem import PeakMemMetric i had to update fastai library which somehow messed my whole python environment that I have been dealing with it fix it for almost two working days. Anyhow after every thing seems to be alright I got this error when trying to train a model
create_cnnis deprecated and is now named
cnn_learner`.
when switched it to “cnn_learner” and running it that jupyter_notebook cell remains busy forever without actually constructing a model and training it. any solution for this?
thanks for your help 
this is the code I am using :
arch = models.resnet18
aName = '_resNet18_test'
epochS = 10
maxLR=1e-02
data = ImageDataBunch.from_folder(f'{d_path}'+"LC_B_5", ds_tfms=(tfms, []),valid ='test', bs=8)
mName_S = str('bestModel_' +str(5)+'_S_'+ aName)
learnS = cnn_learner(data, arch,pretrained=True,
metrics=[accuracy, error_rate],
callback_fns=[partial(CSVLogger, filename =str('stat_' +str(tr)+'_S_'+ aName))
, ShowGraph,PeakMemMetric,
partial(SaveModelCallback, monitor ='val_loss', mode ='auto',name = mName_S ),
partial(ReduceLROnPlateauCallback, monitor='val_loss', min_delta=0.01, patience=3),
partial(EarlyStoppingCallback, monitor='val_loss', min_delta=0.01, patience=5) ])
learnS.fit_one_cycle(epochS, max_lr=maxLR, moms =[0.95, 0.85], div_factor = 25.0)