İçeriğe geç

Referans için ultralytics/utils/errors.py

Not

Bu dosya https://github.com/ultralytics/ultralytics/blob/main/ ultralytics/utils/errors .py adresinde mevcuttur. Bir sorun tespit ederseniz lütfen bir Çekme İsteği 🛠️ ile katkıda bulunarak düzeltilmesine yardımcı olun. Teşekkürler 🙏!



ultralytics.utils.errors.HUBModelError

Üsler: Exception

Ultralytics YOLO adresinde model getirme ile ilgili hataları işlemek için özel istisna sınıfı.

Bu istisna, istenen bir model bulunamadığında veya alınamadığında ortaya çıkar. Mesaj ayrıca daha iyi bir kullanıcı deneyimi için emojileri içerecek şekilde işlenir.

Nitelikler:

İsim Tip Açıklama
message str

İstisna ortaya çıktığında görüntülenen hata mesajı.

Not

Mesaj, 'ultralytics.utils' paketindeki 'emojis' işlevi aracılığıyla otomatik olarak işlenir.

Kaynak kodu ultralytics/utils/errors.py
class HUBModelError(Exception):
    """
    Custom exception class for handling errors related to model fetching in Ultralytics YOLO.

    This exception is raised when a requested model is not found or cannot be retrieved.
    The message is also processed to include emojis for better user experience.

    Attributes:
        message (str): The error message displayed when the exception is raised.

    Note:
        The message is automatically processed through the 'emojis' function from the 'ultralytics.utils' package.
    """

    def __init__(self, message="Model not found. Please check model URL and try again."):
        """Create an exception for when a model is not found."""
        super().__init__(emojis(message))

__init__(message='Model not found. Please check model URL and try again.')

Bir model bulunamadığında kullanılmak üzere bir istisna oluşturun.

Kaynak kodu ultralytics/utils/errors.py
def __init__(self, message="Model not found. Please check model URL and try again."):
    """Create an exception for when a model is not found."""
    super().__init__(emojis(message))





Oluşturuldu 2023-11-12, Güncellendi 2024-05-08
Yazarlar: Burhan-Q (1), glenn-jocher (3)