Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deepsparse in colab #1031

Closed
Vikram12301 opened this issue May 18, 2023 · 4 comments
Closed

Deepsparse in colab #1031

Vikram12301 opened this issue May 18, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@Vikram12301
Copy link

Describe the bug
On running the code from the documentation of deepsparse:

sparseml.yolov5.train \
  --data VOC.yaml \
  --cfg models_v5.0/yolov5s.yaml \
  --weights zoo:cv/detection/yolov5-s/pytorch/ultralytics/coco/pruned_quant-aggressive_94?recipe_type=transfer \
  --hyp data/hyps/hyp.finetune.yaml \
  --recipe zoo:cv/detection/yolov5-s/pytorch/ultralytics/coco/pruned-aggressive_96

I got the error:
TypeError: Unable to convert function return value to a Python type! The signature was
() -> handle

Environment
I used google colab and installed required libraries with:

!pip install deepsparse[server] sparseml[torch,torchvision]

and after installation, I had:

torch - Version: 1.12.0
CUDA:
Cuda compilation tools, release 11.8, V11.8.89
Build cuda_11.8.r11.8/compiler.31833905_0

@Vikram12301 Vikram12301 added the bug Something isn't working label May 18, 2023
@dineshchitlangia
Copy link

Check the version of numpy installed in your environment.
pip freeze | grep numpy

One of the causes of this issue is incompatible numpy version.

@Vikram12301
Copy link
Author

numpy==1.21.6

@mgoin
Copy link
Member

mgoin commented May 31, 2023

Hi @Vikram12301 this error happens because Tensorboard tries to incorrectly load Tensorflow while we are using PyTorch. Please remove Tensorflow to get past the error: pip uninstall -y tensorflow
Here is my colab example: https://colab.research.google.com/drive/1YOhwKCNvQr2GQYx0UcjzfhaaKPUrlJfP?usp=sharing

@jeanniefinks
Copy link
Member

Hello @Vikram12301
it looks like some time has passed from the advice offered. I am going to go ahead and close this thread. Feel free to re-open to continue the discussion and let us know if you found success or want to continue troubleshooting. We're happy to help.

Jeannie / Neural Magic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants