TypeError: Exception occured in `ProgressCallback` when calling event `after_batch`: unsupported format string passed to TensorBase.__format__
Some of my models that used to work don’t work today with the following error message.What is causing an error?TypeError: Exception occured in `ProgressCallback` when calling event `after_batch`: unsupported format string passed to TensorBase.__format__This is the code for app.py.from fastai.vision.all import *
import fastai
import streamlit as st

learn = load_learner('export.pkl')
labels = learn.dls.vocab

def predict(img):
  img = PILImage.create(img)
  pred, pred_idx, probs = learn.predict(img)
  highest_prob = probs.argmax()
  file_name = f"{labels[highest_prob].split(' ')[0].item()}_sugg.png"
  img_sugg = PILImage.create(file_name)
  return f'Is this {labels[highest_prob].item()}?', img_sugg

picture = st.camera_input("Take a picture")

if picture:
    st.image(picture)
    result, sugg = predict(picture)
    st.write(result)
    st.image(sugg)
2022-11-01T03:53:31Z
I can confirm this, I got the same errorHowever if I run the same code in my local machine or colab, it worked as expected
2022-11-01T11:16:31Z
so is this error caused by huggingface?
2022-11-01T11:21:28Z
After a few searches, it seems like fastai didn’t support the latest pytorch yet.Specifying torch as 1.12.1 in requirements.txt did the trick for now
2022-11-01T14:53:23Z
Thank you@farkmu45It fixed the error.