huggingface / api-inference-community

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pydantic.errors.PydanticImportError: `pydantic:ConstrainedFloat` has been removed in V2.

taoari opened this issue · comments

commented

Got the above error with the following command:

./manage.py docker --framework timm --task image-classification --gpu resnet18

Any idea?

Yes, this try to build the docker image, which installs pydantic v2 (which is not working on the api-inference-community 's version.

You can try to simply to upgrade api-inference-community to 0.0.32 within the docker_images/timm/requirements.txt file.

Closing tentatively, feel free to reopen.

commented

@Narsil Thank you very much for the reply! I have successfully set up the docker server now. However, when I use the curl command to do image classification with the timm framework for a test, I got the following error. Do you happen to know what did I doing wrong?

curl -X POST 172.23.72.43:8000 -d @cat.png

{"error":"401 Client Error. (Request ID: Root=1-64b6eff9-34148a5d727e012835e8e809;270acbbd-6191-40ff-bb1b-06f3a02d2ebc)\n\nRepository Not Found for url: https://huggingface.co/resnet18/resolve/main/config.json.\nPlease make sure you specified the correct `repo_id` and `repo_type`.\nIf you are trying to access a private or gated repo, make sure you are authenticated.\nInvalid username or password."}

I don't think theré s a resnet18 model, you might be looking for timm/resnet50.a1_in1k (or friends)