0

When I run

python train.py --img 640 --batch 4 --epochs 5 --data training/dataset.yaml --cfg training/yolov5l.yaml --weights yolov5l.pt 

for YOLOv5 in my system I get the following error:

Traceback (most recent call last):
  File "train.py", line 544, in <module>
    train(hyp, opt, device, tb_writer)
  File "train.py", line 72, in train
    wandb_logger = WandbLogger(opt, save_dir.stem, run_id, data_dict)
  File "D:\sandra\ai.projects\yolo\yolov5\utils\wandb_logging\wandb_utils.py", line 108, in __init__
    self.data_dict = self.setup_training(opt, data_dict)
  File "D:\sandra\ai.projects\yolo\yolov5\utils\wandb_logging\wandb_utils.py", line 139, in setup_training
    self.train_artifact_path, self.train_artifact = self.download_dataset_artifact(data_dict.get('train'),
AttributeError: 'str' object has no attribute 'get'**

wandb: Waiting for W&B process to finish, PID 22204
wandb: Program failed with code 1.
wandb: Find user logs for this run at: D:\sandra\ai.projects\yolo\yolov5\wandb\offline-run-20210427_130128-jr2z73rr\logs\debug.log
wandb: Find internal logs for this run at: D:\sandra\ai.projects\yolo\yolov5\wandb\offline-run-20210427_130128-jr2z73rr\logs\debug-internal.log
wandb: You can sync this run to the cloud by running:
wandb: wandb sync D:\sandra\ai.projects\yolo\yolov5\wandb\offline-run-20210427_130128-jr2z73rr

Why?

Penny Liu
  • 15,447
  • 5
  • 79
  • 98
Sandra
  • 11
  • 1
  • 3
  • You should post it on their Issues page: https://github.com/ultralytics/yolov5/issues Wandb integration is a work in progress. It could be that you stumbled on a new bug. – NanoBit May 07 '21 at 19:36

1 Answers1

0

Looking at the error traceback, it seems that your dataset configuration file has some missing info, or most likely in the wrong format. The file should contain both training and validation set paths. Here's an example:

train: path/to/train # Notice the spaces
val: path/to/val
...
Ayush Chaurasia
  • 583
  • 4
  • 18