ultralytics / yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite
https://docs.ultralytics.com
GNU Affero General Public License v3.0
50.73k stars 16.34k forks source link

How to know if training was interrupted and resume if necessary #10736

Closed kraster010 closed 1 year ago

kraster010 commented 1 year ago

Search before asking

Question

Currently we are automating yolov5 training using ansible. We have external factors that could cause training to be interrupted. There is a way to check programmatically if the last training job is finished or not in order to resume it if necessary?

Thanks

Additional

repository version: v7.0

github-actions[bot] commented 1 year ago

👋 Hello @kraster010, thank you for your interest in YOLOv5 🚀! Please visit our ⭐️ Tutorials to get started, where you can find quickstart guides for simple tasks like Custom Data Training all the way to advanced concepts like Hyperparameter Evolution.

If this is a 🐛 Bug Report, please provide screenshots and minimum viable code to reproduce your issue, otherwise we can not help you.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset images, training logs, screenshots, and a public link to online W&B logging if available.

For business inquiries or professional support requests please visit https://ultralytics.com or email support@ultralytics.com.

Requirements

Python>=3.7.0 with all requirements.txt installed including PyTorch>=1.7. To get started:

git clone https://github.com/ultralytics/yolov5  # clone
cd yolov5
pip install -r requirements.txt  # install

Environments

YOLOv5 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):

Status

YOLOv5 CI

If this badge is green, all YOLOv5 GitHub Actions Continuous Integration (CI) tests are currently passing. CI tests verify correct operation of YOLOv5 training, validation, inference, export and benchmarks on MacOS, Windows, and Ubuntu every 24 hours and on every commit.

Air000 commented 1 year ago

To check the training job is finished or not, you can check on the generated log file, results.csv, located on runs/train/your_prj/results.csv. The last index on epoch column indicates the last trained epoch. If the index equals to your epoch setting - 1, that means the training is completed.

kraster010 commented 1 year ago

thanks

glenn-jocher commented 11 months ago

@kraster010 you're welcome! If you have any more questions or need further assistance, feel free to ask. Good luck with your YOLOv5 automation!