Skip to content

correct resume True error #5452

@wonbeomjang

Description

@wonbeomjang

Search before asking

  • I have searched the YOLOv5 issues and found no similar bug report.

YOLOv5 Component

Training

Bug

First of all, thank you for the great code. I started training with ms coco dataset, and I gave an argument as --resume True to resume after the suspension. However, my system recognized True as a string and the following error came out.

스크린샷, 2021-11-02 22-44-41

If opt.resume == 'True', we were able to solve the problem with an additional code that fixes it with boolean.

Environment

  • YOLO: YOLOv5 torch 1.10+cu112 CUDA:0 Tesla T4
  • OS: Devian
  • python: 3.8

Minimal Reproducible Example

ckpt = opt.resume if isinstance(opt.resume, str) else get_latest_run() 

Additional

my pull request is #5451

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