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

Saving best.pt #955

Open
1 task done
Aftondil opened this issue Dec 19, 2024 · 2 comments
Open
1 task done

Saving best.pt #955

Aftondil opened this issue Dec 19, 2024 · 2 comments
Labels
enhancement New feature or request HUB Ultralytics HUB issues

Comments

@Aftondil
Copy link

Search before asking

  • I have searched the HUB issues and found no similar feature requests.

Description

Hey there thanks for such great job, I wanted to ask if Hub could save best.pt also , while training in colab , we may run out of resources, and then best.pt is deleted automatically, if we resume it in the end we get error finding best.pt

Use case

No response

Additional

No response

@Aftondil Aftondil added the enhancement New feature or request label Dec 19, 2024
@UltralyticsAssistant UltralyticsAssistant added the HUB Ultralytics HUB issues label Dec 19, 2024
@UltralyticsAssistant
Copy link
Member

👋 Hello @Aftondil, thank you for raising an issue regarding Ultralytics HUB 🚀! Your suggestion about saving best.pt is appreciated, and we understand how this could help avoid issues when resuming training. An Ultralytics engineer will review your request soon.

Meanwhile, it would be great if you could share more details to help us address your concern effectively. For bugs or unexpected behavior, please provide a minimum reproducible example (MRE) or clearly outline the steps to reproduce the issue.

We aim to respond to all issues as promptly as possible. Thank you for your patience! 😊

@pderrenger
Copy link
Member

@Aftondil hello, thank you for your kind words! The credit truly goes to the entire YOLO community and the Ultralytics team for their hard work and dedication. 😊

Regarding your query, the issue you're describing often occurs when working in transient environments like Google Colab, where temporary storage is used, and files like best.pt can be lost after the session ends or resources are exhausted.

To address this, the Ultralytics HUB platform can be a fantastic solution. When training a model on Ultralytics HUB (whether via cloud training or by linking your local training), the system automatically uploads and stores the best.pt model and other training artifacts securely. This ensures that you won't lose any files, even if your local resources become unavailable. Additionally, with HUB, you can easily resume training without worrying about lost checkpoints.

If you're training in Colab and still prefer to save the best.pt locally, you could periodically download it to your local machine or upload it to cloud storage like Google Drive during training. Here's an example snippet to save best.pt to Google Drive:

from google.colab import drive
drive.mount('/content/drive')

# Save best.pt to Google Drive
!cp /path/to/your/best.pt /content/drive/MyDrive/

Alternatively, for a more streamlined approach, consider trying Ultralytics HUB Cloud Training. It eliminates the hassle of manual file handling and ensures that your training progress and artifacts are safe and accessible.

Let me know if you have further questions! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request HUB Ultralytics HUB issues
Projects
None yet
Development

No branches or pull requests

3 participants