Source code for ads.feature_engineering.exceptions
#!/usr/bin/env python
# -*- coding: utf-8 -*--
# Copyright (c) 2021, 2022 Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
[docs]
class InvalidFeatureType(TypeError):
def __init__(self, tname: str):
super().__init__(f"Type {tname} is not a sublcass of FeatureType.")
[docs]
class TypeAlreadyRegistered(TypeError):
def __init__(self, tname: str):
super().__init__(f"Type {tname} already registered.")
[docs]
class TypeAlreadyAdded(TypeError):
def __init__(self, tname: str):
super().__init__(f"Type {tname} is already added.")
[docs]
class TypeNotFound(TypeError):
def __init__(self, tname: str):
super().__init__(f"Type {tname} is not found.")
[docs]
class NameAlreadyRegistered(NameError):
def __init__(self, name: str):
super().__init__(f"Type with name {name} already registered.")
[docs]
class WarningAlreadyExists(ValueError):
def __init__(self, name: str):
super().__init__(f"Warning {name} already exists.")
[docs]
class WarningNotFound(ValueError):
def __init__(self, name: str):
super().__init__(f"Warning {name} is not found.")