Are you sure you want to delete this access key?
comments | description | keywords |
---|---|---|
true | Learn how to create effective Minimum Reproducible Examples (MRE) for bug reports in Ultralytics YOLO repositories. Follow our guide for efficient issue resolution. | Ultralytics, YOLO, Minimum Reproducible Example, MRE, bug report, issue resolution, machine learning, deep learning |
When submitting a bug report for Ultralytics YOLO repositories, it's essential to provide a Minimum Reproducible Example (MRE). An MRE is a small, self-contained piece of code that demonstrates the problem you're experiencing. Providing an MRE helps maintainers and contributors understand the issue and work on a fix more efficiently. This guide explains how to create an MRE when submitting bug reports to Ultralytics YOLO repositories.
The first step in creating an MRE is to isolate the problem. Remove any unnecessary code or dependencies that are not directly related to the issue. Focus on the specific part of the code that is causing the problem and eliminate any irrelevant sections.
When creating an MRE, use publicly available models and datasets to reproduce the issue. For example, use the yolov8n.pt
model and the coco8.yaml
dataset. This ensures that the maintainers and contributors can easily run your example and investigate the problem without needing access to proprietary data or custom models.
Ensure all necessary dependencies are included in your MRE. If your code relies on external libraries, specify the required packages and their versions. Ideally, list the dependencies in your bug report using yolo checks
if you have ultralytics
installed or pip list
for other tools.
Provide a clear and concise description of the issue you're experiencing. Explain the expected behavior and the actual behavior you're encountering. If applicable, include any relevant error messages or logs.
Format your code properly using code blocks in the issue description. This makes it easier for others to read and understand your code. In GitHub, you can create a code block by wrapping your code with triple backticks (```) and specifying the language:
```python
# Your Python code goes here
```
Before submitting your MRE, test it to ensure that it accurately reproduces the issue. Make sure that others can run your example without any issues or modifications.
Here's an example of an MRE for a hypothetical bug report:
Bug description:
When running inference on a 0-channel image, I get an error related to the dimensions of the input tensor.
MRE:
import torch
from ultralytics import YOLO
# Load the model
model = YOLO("yolov8n.pt")
# Load a 0-channel image
image = torch.rand(1, 0, 640, 640)
# Run the model
results = model(image)
Error message:
RuntimeError: Expected input[1, 0, 640, 640] to have 3 channels, but got 0 channels instead
Dependencies:
torch==2.3.0
ultralytics==8.2.0
In this example, the MRE demonstrates the issue with a minimal amount of code, uses a public model ("yolov8n.pt"
), includes all necessary dependencies, and provides a clear description of the problem along with the error message.
By following these guidelines, you'll help the maintainers and contributors of Ultralytics YOLO repositories to understand and resolve your issue more efficiently.
To create an effective Minimum Reproducible Example (MRE) for bug reports in Ultralytics YOLO repositories, follow these steps:
yolov8n.pt
and coco8.yaml
for easier reproducibility.yolo checks
if you have ultralytics
installed or pip list
.For a detailed guide, see Creating a Minimum Reproducible Example.
Using publicly available models and datasets in your MRE ensures that maintainers can easily run your example without needing access to proprietary data. This allows for quicker and more efficient issue resolution. For instance, using the yolov8n.pt
model and coco8.yaml
dataset helps standardize and simplify the debugging process. Learn more about public models and datasets in the Use Public Models and Datasets section.
A comprehensive bug report for Ultralytics YOLO should include:
For a complete checklist, refer to the Write a Clear Description of the Issue section.
To format your code properly when submitting a bug report on GitHub:
Example:
```python
# Your Python code goes here
```
For more tips on code formatting, see Format Your Code Properly.
Before submitting your MRE, make sure to:
For a detailed checklist, visit the Test Your MRE section.
Press p or to see the previous file or, n or to see the next file
Browsing data directories saved to S3 is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
ultralytics is now integrated with AWS S3!
Are you sure you want to delete this access key?
Browsing data directories saved to Google Cloud Storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
ultralytics is now integrated with Google Cloud Storage!
Are you sure you want to delete this access key?
Browsing data directories saved to Azure Cloud Storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
ultralytics is now integrated with Azure Cloud Storage!
Are you sure you want to delete this access key?
Browsing data directories saved to S3 compatible storage is possible with DAGsHub. Let's configure your repository to easily display your data in the context of any commit!
ultralytics is now integrated with your S3 compatible storage!
Are you sure you want to delete this access key?