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

Save .zip comet experiment file on every epoch #11449

Closed
1 task done
SJavad opened this issue Apr 27, 2023 · 6 comments
Closed
1 task done

Save .zip comet experiment file on every epoch #11449

SJavad opened this issue Apr 27, 2023 · 6 comments
Labels
question Further information is requested

Comments

@SJavad
Copy link

SJavad commented Apr 27, 2023

Search before asking

Question

hi
when I run the python train.py command and training ends, the comet library creates a zip file to the .comet_runs directory that contains training parameters and metrics.
the name of the zip file is something like this: 2667624c2be64b5e9bc2b414cc4844fe.zip
I want to come to create this zip file on every epoch.
I try to --save-period 1 and still comet create this zip file when all training processes have ended.
I want to save and get these zip files when training still running.

I designed a UI application for training the yolov5 model on the custom dataset and I want to show the training parameters live while training in the process.
how can I do that?
I design my application with PyQT.

I check the clear_ml logging tool and seem also this tool gives me all information "after the training process" and doesn't get me the parameters online (while training is in the process).

Does anyone know another way to get these parameters while training and stream that live on my own application?

Additional

No response

@SJavad SJavad added the question Further information is requested label Apr 27, 2023
@github-actions
Copy link
Contributor

👋 Hello @SJavad, 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 a minimum reproducible example to help us debug it.

If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our Tips for Best Training Results.

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.

Introducing YOLOv8 🚀

We're excited to announce the launch of our latest state-of-the-art (SOTA) object detection model for 2023 - YOLOv8 🚀!

Designed to be fast, accurate, and easy to use, YOLOv8 is an ideal choice for a wide range of object detection, image segmentation and image classification tasks. With YOLOv8, you'll be able to quickly and accurately detect objects in real-time, streamline your workflows, and achieve new levels of accuracy in your projects.

Check out our YOLOv8 Docs for details and get started with:

pip install ultralytics

@glenn-jocher
Copy link
Member

@SJavad hi there,

Currently, the --save-period argument only saves the best and latest weights, as well as a results file, at the specified period. However, saving the comet.zip file with the training parameters and metrics, unfortunately, cannot currently be done during training, and is only available after the training process has ended.

As for your UI application, you might consider using the --project argument when training with YOLOv5 to specify a unique name for your project, and then logging to Comet using that same name. You could then live stream the corresponding Comet project page in your application to show the training parameters in real-time. Alternatively, you might consider using a different real-time logging tool that can best suit your needs.

I hope this helps! Let us know if you have any further questions or concerns.

@SJavad
Copy link
Author

SJavad commented Apr 27, 2023

@glenn-jocher
thanks for your response
I have to use --save-period 1 and then use metrics in the result.csv file that is saved in the runs/exp folder
do you know tools that can give metrics and parameters live while training?

I see some variables in the train.py file such as t0 , results , maps, and... that represent some of these metrics and parameters.
how can I pass these variables to another Python file or pass them to my PyQT UI application?

thank you again for your help ❤

@glenn-jocher
Copy link
Member

@SJavad, glad to hear that the --save-period 1 and results.csv option worked for you.

To answer your second question, you can pass those metrics from the train.py file to another Python file or to your PyQT UI application in a few different ways. One way is to use a combination of Python's built-in socket module and a custom protocol to send data in real-time. Another way could be to use a message broker like RabbitMQ or Kafka to publish the metrics and have your UI application subscribe to those messages in real-time.

In terms of integrating with PyQT, you can incorporate this real-time metric data into your application using the appropriate PyQT widgets, such as QListWidget or QTableWidget, depending on the formatting and display requirements of your UI.

I hope this helps! Let us know if you have any more questions or would like us to elaborate further.

@SJavad
Copy link
Author

SJavad commented Apr 28, 2023

@glenn-jocher
Thank you so much for your help
I really appreciate that.

@SJavad SJavad closed this as completed Apr 28, 2023
@glenn-jocher
Copy link
Member

@SJavad, you're very welcome! It's great to see members of the YOLO community like yourself pushing the boundaries of what's possible with the model. Don't hesitate to ask if you have any further questions or issues in the future. We're always here to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants