Comments (6)
👋 Hello @pierrickBERTHE, thank you for your interest in Ultralytics YOLOv8 🚀! We recommend a visit to the Docs for new users where you can find many Python and CLI usage examples and where many of the most common questions may already be answered.
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.
Join the vibrant Ultralytics Discord 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.
Install
Pip install the ultralytics
package including all requirements in a Python>=3.8 environment with PyTorch>=1.8.
pip install ultralytics
Environments
YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including CUDA/CUDNN, Python and PyTorch preinstalled):
- Notebooks with free GPU:
- Google Cloud Deep Learning VM. See GCP Quickstart Guide
- Amazon Deep Learning AMI. See AWS Quickstart Guide
- Docker Image. See Docker Quickstart Guide
Status
If this badge is green, all Ultralytics CI tests are currently passing. CI tests verify correct operation of all YOLOv8 Modes and Tasks on macOS, Windows, and Ubuntu every 24 hours and on every commit.
from ultralytics.
It appears the issue is related to the directory path format you're using with MLflow. On Windows systems, it's recommended to use a forward slash (/
) or double backslashes (\\
) in paths.
Try modifying your MLflow tracking URI as follows:
mlflow.set_tracking_uri('file:./runs')
# or, if there's an issue with relative paths, try using the absolute path
mlflow.set_tracking_uri('file:///C:/Users/pierr/VSC_Projects/Projet8_OCR_DataScientist/runs')
Ensure to replace 'C:/Users/pierr/VSC_Projects/Projet8_OCR_DataScientist/runs'
with the correct absolute path to your project's tracking directory. This should resolve the UnsupportedModelRegistryStoreURIException
you're encountering.
from ultralytics.
Hi,
I try with the absolute path but it doesn't work.
# folder of mlflow runs
folder_path = "C:/Users/pierr/VSC_Projects/Projet8_OCR_DataScientist/runs"
# Vérifier si le dossier existe
if os.path.isdir(folder_path):
print("Folder exists.\n")
else:
print("folder does not exist.\n")
# Déterminer l'URI de suivi MLflow
input_uri = f'file:///{folder_path}'
mlflow.set_tracking_uri(input_uri)
print(f"URI de suivi MLflow : {input_uri}\n")
# Entrainer le modèle YOLO sur les données
model_yolo.train(
data='data/cleaned',
epochs=nb_epoch
)
It is the same issue with the Output:
Folder exists.
URI de suivi MLflow : file:///C:/Users/pierr/VSC_Projects/Projet8_OCR_DataScientist/runs
And the error is always the same
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
File c:\Users\pierr\VSC_Projects\Projet8_OCR_DataScientist\env\Lib\site-packages\mlflow\tracking\registry.py:80, in StoreRegistry.get_store_builder(self, store_uri)
[79](file:///C:/Users/pierr/VSC_Projects/Projet8_OCR_DataScientist/env/Lib/site-packages/mlflow/tracking/registry.py:79) try:
---> [80](file:///C:/Users/pierr/VSC_Projects/Projet8_OCR_DataScientist/env/Lib/site-packages/mlflow/tracking/registry.py:80) store_builder = self._registry[scheme]
[81](file:///C:/Users/pierr/VSC_Projects/Projet8_OCR_DataScientist/env/Lib/site-packages/mlflow/tracking/registry.py:81) except KeyError:
KeyError: 'c'
To have a better understanding, I add :
print("print dans registry.py")
print("store_uri: ", store_uri)
print("scheme: ", scheme)
In the file registry.py
of mlflow and the output is :
print dans registry.py
store_uri: [c:\Users\pierr\VSC_Projects\Projet8_OCR_DataScientist\runs\mlflow](file:///C:/Users/pierr/VSC_Projects/Projet8_OCR_DataScientist/runs/mlflow)
scheme: c
So I understand that mlflow parse my path and analyse the c
of [c:\Users\pierr\VSC_Projects\Projet8_OCR_DataScientist\runs\mlflow](file:///C:/Users/pierr/VSC_Projects/Projet8_OCR_DataScientist/runs/mlflow)
as a sheme. After it says that Supported URI schemes are: ['', 'file', 'databricks', 'databricks-uc', 'http', 'https', 'postgresql', 'mysql', 'sqlite', 'mssql']
. So c
doesn't work.
Have you any other idea? Should I try to downgrade mlflow? Or any other test?
Thanks for your help.
from ultralytics.
I try with a bad folder path:
# folder of mlflow runs
folder_path = "bad_folder"
# Vérifier si le dossier existe
if os.path.isdir(folder_path):
print("Folder exists.\n")
else:
print("folder does not exist.\n")
# Déterminer l'URI de suivi MLflow
input_uri = f'file:///{folder_path}'
mlflow.set_tracking_uri(input_uri)
print(f"URI de suivi MLflow : {input_uri}\n")
# Entrainer le modèle YOLO sur les données
model_yolo.train(
data='data/cleaned',
epochs=nb_epoch
)
and the output:
folder does not exist.
URI de suivi MLflow : file:///bad_folder
and the output of the print in registry.py:
print dans registry.py
store_uri: [c:\Users\pierr\VSC_Projects\Projet8_OCR_DataScientist\runs\mlflow](file:///C:/Users/pierr/VSC_Projects/Projet8_OCR_DataScientist/runs/mlflow)
scheme: c
So the lines before the train of model are not used by the train of Yolov8 model:
# Déterminer l'URI de suivi MLflow
input_uri = f'file:///{folder_path}'
mlflow.set_tracking_uri(input_uri)
print(f"URI de suivi MLflow : {input_uri}\n")
Have you any suggestion of test please?
from ultralytics.
I found it!!
I'm not sure if it's a good practice, but I went ahead and directly modified the code in the file mlflow/tracking/registry.py in my env file. I added:
print(
"\nAjout code par PB dans mlflow/tracking/registry.py"
)
print("store_uri: ", store_uri)
print("scheme: ", scheme)
scheme = "file"
print("PB a modifié la valeur de scheme")
print("scheme: ", scheme, '\n')
and it gives me the following output:
print ajouté par PB dans registry.py
store_uri: c:\Users\pierr\VSC_Projects\Projet8_OCR_DataScientist\runs\mlflow
scheme: c
PB a modifié la valeur de scheme
scheme: file
So I tricked mlflow. I had to do the same trick in the file mlflow/store/artifact/artifact_repository_registry.py.
However, the mlflow ui deposit doesn't seem to work properly afterwards to retrieve the information. But it's not a problem for me because I just need to do a POC and access the accuracy results in \runs\classify\train and that's enough for me.
Thanks for your help anyway!
from ultralytics.
@pierrickBERTHE hi there! 🎉
Great to hear you found a workaround by modifying the mlflow
source code for your POC. It's an inventive solution, although, typically, we advise against modifying library internals as it could potentially lead to unexpected behavior or issues with updates in the future.
For a more sustainable solution, consider submitting an issue or a feature request to the MLflow repository detailing this URI parsing challenge. It might benefit from a more permanent fix or improvement in their URI handling for Windows systems.
Thanks for sharing your experience, and good luck with your POC! If you need further assistance, feel free to reach out. 🚀
from ultralytics.
Related Issues (20)
- YOLOv8-OBB learns 0° rotation HOT 9
- train with arg use_ray=True, raise exception OSError: [WinError 87], at _winapi.CreateProcess HOT 3
- New network structure with old weights HOT 3
- For increasing or decreasing video streams,Is there a better way to detect the need to interrupt and then load new data and restart?
- Is YOLOv8 Using Val Set to train? HOT 2
- Can YOLOv8 Simultaneously Support Rotated Object Detection (OBB) and Keypoint Detection? HOT 2
- yolov8 when train,raise error OSError: [WinError 87] parameters error HOT 1
- Will you support YOLOv10 in the future? HOT 2
- YOLOv8 OBB HOT 1
- YOLOv8 with KAN HOT 2
- A question about validation set drawing image results HOT 2
- Determine the Class of a Specific Pixel-Coordinate from YOLOv8 Segmentation Results HOT 2
- Custom train for table structure HOT 4
- Please change this misleading tip HOT 2
- Tracking with 1 model and N multi-stream HOT 5
- edgetpu.ftlite is numpy.int8 but Coral only support uint8 input type HOT 1
- Getting error while Converting to tensorRT HOT 5
- Unable to Export RTDETR Large Model(best.pt) to TFLite or NCNN for Raspberry Pi 4 Deployment HOT 4
- Deepsparse provides empty results with custom yolov8 model HOT 5
- No inference with best.pt HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ultralytics.