Skip to content

model.export() fails with ModuleNotFoundError: No module named 'wandb' #232

Open
@robmarkcole

Description

@robmarkcole

Search before asking

  • I have searched the RF-DETR issues and found no similar bug report.

Bug

Export shouldn't depend on the logger.
Trace:

ModuleNotFoundError                       Traceback (most recent call last)
Cell In[16], line 1
----> 1 model.export()

File /home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/rfdetr/detr.py:39, in RFDETR.export(self, **kwargs)
     38 def export(self, **kwargs):
---> 39     self.model.export(**kwargs)

File /home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/rfdetr/main.py:446, in Model.export(self, output_dir, infer_dir, simplify, backbone_only, opset_version, verbose, force, shape, batch_size, **kwargs)
    444 """Export the trained model to ONNX format"""
    445 print(f"Exporting model to ONNX format")
--> 446 from rfdetr.deploy.export import export_onnx, onnx_simplify, make_infer_image
    449 device = self.device
    450 model = deepcopy(self.model.to("cpu"))

File /home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/rfdetr/deploy/export.py:32
     30 import re
     31 import sys
---> 32 import wandb

ModuleNotFoundError: No module named 'wandb'

Environment

NA

Minimal Reproducible Example

model.export

Additional

No response

Are you willing to submit a PR?

  • Yes, I'd like to help by submitting a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions