Repository: caikit/caikit (language: python)

Issue:
Add core exception type for trainers, finders, initializers
## Is your feature request related to a problem? Please describe.

We now have more pluggable components in caikit for model management- trainers, finders, and initializers.

These may be implemented in a way that interacts with remote systems, e.g.
- Finding models in remote storage
- Initializing models on remote workers
- Training models on distributed workers

There are plenty of failure modes (bad credentials, unavailable remotes, resources not found, invalid arguments) that need to be communicated back to the user in a nice way, whether that user is a local python program or a caller of a caikit runtime server.
However we don't want to require that implementations of core resources use dependencies from `caikit.runtime`, nor do we want code in `caikit.core` that invokes these things require dependencies like `http` or `grpc`, so we don't want to pass around things like a `grpc.RpcError` or a `grpc.Status.StatusCode` or an `http.StatusCode`.

## Describe the solution you'd like

Kinda like how we have the `DataValidationError` that module authors can use when training data has an invalid format, we think we want something like a `CaikitCoreException` that has some easily-mappable enum that we can translate to valid grpc or http errors in our servicers, and local python programs can interpret.

## Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

## Additional context

We know more indirection and mapping isn't the greatest..... but we figure we will contain this to the `model_management` stuff at the moment.


Discussion / hints:

Fix patch:
diff --git a/caikit/core/__init__.py b/caikit/core/__init__.py
index 0ea0303d1..b49200af8 100644
--- a/caikit/core/__init__.py
+++ b/caikit/core/__init__.py
@@ -31,6 +31,7 @@
 
 # Local
 from .data_model import DataObjectBase, dataobject
+from .exceptions import DataValidationError, error_handler
 from .model_manager import *
 from .module_backends import *
 from .modules import ModuleBase, ModuleConfig, ModuleLoader, ModuleSaver, module
diff --git a/caikit/core/augmentors/base.py b/caikit/core/augmentors/base.py
index a5034395c..f6a962671 100644
--- a/caikit/core/augmentors/base.py
+++ b/caikit/core/augmentors/base.py
@@ -20,7 +20,7 @@
 import alog
 
 # Local
-from ..toolkit.errors import error_handler
+from ..exceptions import error_handler
 
 log = alog.use_channel("AUGMENT_BASE")
 error = error_handler.get(log)
diff --git a/caikit/core/augmentors/merged_augmentor.py b/caikit/core/augmentors/merged_augmentor.py
index 5224c1b18..101a23d1d 100644
--- a/caikit/core/augmentors/merged_augmentor.py
+++ b/caikit/core/augmentors/merged_augmentor.py
@@ -19,7 +19,7 @@
 import alog
 
 # Local
-from ..toolkit.errors import error_handler
+from ..exceptions import error_handler
 from .base import AugmentorBase
 from .schemes import SchemeBase
 
diff --git a/caikit/core/augmentors/schemes/base.py b/caikit/core/augmentors/schemes/base.py
index 0a1ee7a83..12355cbdb 100644
--- a/caikit/core/augmentors/schemes/base.py
+++ b/caikit/core/augmentors/schemes/base.py
@@ -22,7 +22,7 @@
 import alog
 
 # Local
-from ...toolkit.errors import error_handler
+from ...exceptions import error_handler
 from .. import AugmentorBase
 
 log = alog.use_channel("AUG_SCHEME_BASE")
diff --git a/caikit/core/augmentors/schemes/random_multi_selection_scheme.py b/caikit/core/augmentors/schemes/random_multi_selection_scheme.py
index f70b87cb7..6ad8a90f9 100644
--- a/caikit/core/augmentors/schemes/random_multi_selection_scheme.py
+++ b/caikit/core/augmentors/schemes/random_multi_selection_scheme.py
@@ -22,7 +22,7 @@
 import alog
 
 # Local
-from ...toolkit.errors import error_handler
+from ...exceptions import error_handler
 from .base import SchemeBase
 
 log = alog.use_channel("RMULT_AUG_SCHEME")
diff --git a/caikit/core/augmentors/schemes/random_single_selection_scheme.py b/caikit/core/augmentors/schemes/random_single_selection_scheme.py
index cf5bb2e85..9430bc671 100644
--- a/caikit/core/augmentors/schemes/random_single_selection_scheme.py
+++ b/caikit/core/augmentors/schemes/random_single_selection_scheme.py
@@ -22,7 +22,7 @@
 import alog
 
 # Local
-from ...toolkit.errors import error_handler
+from ...exceptions import error_handler
 from .base import SchemeBase
 
 log = alog.use_channel("RSING_AUG_SCHEME")
diff --git a/caikit/core/data_model/base.py b/caikit/core/data_model/base.py
index 1e2a7e1e2..6c20adafd 100644
--- a/caikit/core/data_model/base.py
+++ b/caikit/core/data_model/base.py
@@ -36,7 +36,7 @@
 import alog
 
 # Local
-from ..toolkit.errors import error_handler
+from ..exceptions import error_handler
 from . import enums, json_dict
 
 log = alog.use_channel("DATAM")
diff --git a/caikit/core/data_model/data_backends/dict_backend.py b/caikit/core/data_model/data_backends/dict_backend.py
index dbf6bd5c8..9c6a904d6 100644
--- a/caikit/core/data_model/data_backends/dict_backend.py
+++ b/caikit/core/data_model/data_backends/dict_backend.py
@@ -22,7 +22,7 @@
 import alog
 
 # Local
-from ...toolkit.errors import error_handler
+from ...exceptions import error_handler
 from ..base import DataBase
 from .base import DataModelBackendBase
 
diff --git a/caikit/core/data_model/dataobject.py b/caikit/core/data_model/dataobject.py
index 4d6b08f79..b6aa9971f 100644
--- a/caikit/core/data_model/dataobject.py
+++ b/caikit/core/data_model/dataobject.py
@@ -47,7 +47,7 @@
 import py_to_proto
 
 # Local
-from ..toolkit.errors import error_handler
+from ..exceptions import error_handler
 from . import enums
 from .base import DataBase, _DataBaseMetaClass
 from .json_dict import JsonDict
diff --git a/caikit/core/data_model/enums.py b/caikit/core/data_model/enums.py
index 9db93e30a..34a9947ab 100644
--- a/caikit/core/data_model/enums.py
+++ b/caikit/core/data_model/enums.py
@@ -29,7 +29,7 @@
 import alog
 
 # Local
-from ..toolkit.errors import error_handler
+from ..exceptions import error_handler
 
 log = alog.use_channel("DATAM")
 error = error_handler.get(log)
diff --git a/caikit/core/data_model/streams/converter.py b/caikit/core/data_model/streams/converter.py
index f9b3508df..b078891b5 100644
--- a/caikit/core/data_model/streams/converter.py
+++ b/caikit/core/data_model/streams/converter.py
@@ -26,7 +26,7 @@
 import alog
 
 # Local
-from ...toolkit.errors import error_handler
+from ...exceptions import error_handler
 from .. import DataStream
 
 log = alog.use_channel("DATSTRMCNVRTR")
diff --git a/caikit/core/data_model/streams/csv_column_formatter.py b/caikit/core/data_model/streams/csv_column_formatter.py
index e565785d6..0d9ba73dd 100644
--- a/caikit/core/data_model/streams/csv_column_formatter.py
+++ b/caikit/core/data_model/streams/csv_column_formatter.py
@@ -24,7 +24,7 @@
 import alog
 
 # Local
-from ...toolkit.errors import error_handler
+from ...exceptions import error_handler
 from .. import DataStream
 
 log = alog.use_channel("CSVCLMNCNSLDTR")
diff --git a/caikit/core/data_model/streams/data_stream.py b/caikit/core/data_model/streams/data_stream.py
index b4af8cf24..49a061a0b 100644
--- a/caikit/core/data_model/streams/data_stream.py
+++ b/caikit/core/data_model/streams/data_stream.py
@@ -36,8 +36,8 @@
 
 # Local
 from ...augmentors import AugmentorBase
+from ...exceptions import error_handler
 from ...toolkit import fileio
-from ...toolkit.errors import error_handler
 
 log = alog.use_channel("DATSTRM")
 error = error_handler.get(log)
diff --git a/caikit/core/data_model/streams/resolver.py b/caikit/core/data_model/streams/resolver.py
index d302c9e0e..8526792e4 100644
--- a/caikit/core/data_model/streams/resolver.py
+++ b/caikit/core/data_model/streams/resolver.py
@@ -22,7 +22,7 @@
 import alog
 
 # Local
-from ...toolkit.errors import error_handler
+from ...exceptions import error_handler
 from .. import DataStream
 from .converter import DataStreamConverter
 from .csv_column_formatter import CSVColumnFormatter
diff --git a/caikit/core/data_model/streams/validator.py b/caikit/core/data_model/streams/validator.py
index 37b5deb7c..cfcaeef8c 100644
--- a/caikit/core/data_model/streams/validator.py
+++ b/caikit/core/data_model/streams/validator.py
@@ -25,7 +25,8 @@
 import alog
 
 # Local
-from ...toolkit.errors import DataValidationError, error_handler
+from ...exceptions import error_handler
+from ...exceptions.validation_error import DataValidationError
 from .. import DataStream
 
 log = alog.use_channel("DATSTRMVLDTR")
diff --git a/caikit/core/exceptions/__init__.py b/caikit/core/exceptions/__init__.py
new file mode 100644
index 000000000..dc2384de8
--- /dev/null
+++ b/caikit/core/exceptions/__init__.py
@@ -0,0 +1,17 @@
+# Copyright The Caikit Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Local
+from . import error_handler
+from .validation_error import DataValidationError
diff --git a/caikit/core/toolkit/errors/error_handler.py b/caikit/core/exceptions/error_handler.py
similarity index 100%
rename from caikit/core/toolkit/errors/error_handler.py
rename to caikit/core/exceptions/error_handler.py
diff --git a/caikit/core/toolkit/errors/validation_error.py b/caikit/core/exceptions/validation_error.py
similarity index 100%
rename from caikit/core/toolkit/errors/validation_error.py
rename to caikit/core/exceptions/validation_error.py
diff --git a/caikit/core/model_management/factories.py b/caikit/core/model_management/factories.py
index bb7ab0c36..7b4d0908d 100644
--- a/caikit/core/model_management/factories.py
+++ b/caikit/core/model_management/factories.py
@@ -22,7 +22,7 @@
 import alog
 
 # Local
-from ..toolkit.errors import error_handler
+from ..exceptions import error_handler
 from ..toolkit.factory import Factory, FactoryConstructible
 from .local_model_finder import LocalModelFinder
 from .local_model_initializer import LocalModelInitializer
diff --git a/caikit/core/model_management/local_model_finder.py b/caikit/core/model_management/local_model_finder.py
index 92235a21c..623a05bb7 100644
--- a/caikit/core/model_management/local_model_finder.py
+++ b/caikit/core/model_management/local_model_finder.py
@@ -34,8 +34,8 @@
 import alog
 
 # Local
+from ..exceptions import error_handler
 from ..modules import ModuleConfig
-from ..toolkit.errors import error_handler
 from .model_finder_base import ModelFinderBase
 
 log = alog.use_channel("LFIND")
diff --git a/caikit/core/model_management/local_model_initializer.py b/caikit/core/model_management/local_model_initializer.py
index 765e7198f..6057458e8 100644
--- a/caikit/core/model_management/local_model_initializer.py
+++ b/caikit/core/model_management/local_model_initializer.py
@@ -36,6 +36,7 @@
 import alog
 
 # Local
+from ..exceptions import error_handler
 from ..module_backends import BackendBase, backend_types
 from ..modules import ModuleBase, ModuleConfig
 from ..modules.decorator import SUPPORTED_LOAD_BACKENDS_VAR_NAME
@@ -44,7 +45,6 @@
     module_backend_registry,
     module_backend_types,
 )
-from ..toolkit.errors import error_handler
 from .model_initializer_base import ModelInitializerBase
 
 log = alog.use_channel("LLOAD")
diff --git a/caikit/core/model_management/local_model_trainer.py b/caikit/core/model_management/local_model_trainer.py
index 4cdf16a2a..11345e080 100644
--- a/caikit/core/model_management/local_model_trainer.py
+++ b/caikit/core/model_management/local_model_trainer.py
@@ -31,10 +31,10 @@
 # Local
 from ...interfaces.common.data_model.stream_sources import S3Path
 from ..data_model import TrainingStatus
+from ..exceptions import error_handler
 from ..modules import ModuleBase
 from ..toolkit.destroyable_process import DestroyableProcess
 from ..toolkit.destroyable_thread import DestroyableThread
-from ..toolkit.errors import error_handler
 from ..toolkit.logging import configure as configure_logging
 from .model_trainer_base import ModelTrainerBase, TrainingInfo
 import caikit
diff --git a/caikit/core/model_manager.py b/caikit/core/model_manager.py
index 7cd34ff0f..80d18151c 100644
--- a/caikit/core/model_manager.py
+++ b/caikit/core/model_manager.py
@@ -30,6 +30,7 @@
 
 # Local
 from ..interfaces.common.data_model.stream_sources import S3Path
+from .exceptions import error_handler
 from .model_management import (
     ModelFinderBase,
     ModelInitializerBase,
@@ -40,7 +41,6 @@
 )
 from .modules.base import ModuleBase
 from .registries import module_registry
-from .toolkit.errors import error_handler
 from .toolkit.factory import Factory, FactoryConstructible
 from caikit.config import get_config
 
diff --git a/caikit/core/module_backends/backend_types.py b/caikit/core/module_backends/backend_types.py
index 8656303bf..7b5e44d1f 100644
--- a/caikit/core/module_backends/backend_types.py
+++ b/caikit/core/module_backends/backend_types.py
@@ -23,8 +23,8 @@
 import alog
 
 # Local
+from ..exceptions import error_handler
 from ..registries import module_backend_classes, module_backend_types
-from ..toolkit.errors import error_handler
 from ..toolkit.wip_decorator import Action, WipCategory, work_in_progress
 from .base import BackendBase
 
diff --git a/caikit/core/module_backends/local_backend.py b/caikit/core/module_backends/local_backend.py
index 567de1bb9..79a83db5f 100644
--- a/caikit/core/module_backends/local_backend.py
+++ b/caikit/core/module_backends/local_backend.py
@@ -19,7 +19,7 @@
 import alog
 
 # Local
-from ..toolkit.errors import error_handler
+from ..exceptions import error_handler
 from ..toolkit.wip_decorator import TempDisableWIP
 from .backend_types import register_backend_type
 from .base import BackendBase
diff --git a/caikit/core/modules/base.py b/caikit/core/modules/base.py
index 417e324d2..4f9fa4688 100644
--- a/caikit/core/modules/base.py
+++ b/caikit/core/modules/base.py
@@ -37,8 +37,9 @@
 
 # Local
 from ..data_model import DataBase, DataStream
+from ..exceptions import error_handler
+from ..exceptions.validation_error import DataValidationError
 from ..toolkit import fileio
-from ..toolkit.errors import DataValidationError, error_handler
 from .loader import ModuleLoader
 from .meta import _ModuleBaseMeta
 from caikit import core
diff --git a/caikit/core/modules/config.py b/caikit/core/modules/config.py
index 50b3b4658..262197b8b 100644
--- a/caikit/core/modules/config.py
+++ b/caikit/core/modules/config.py
@@ -21,7 +21,7 @@
 
 # Local
 from .. import toolkit
-from ..toolkit.errors import error_handler
+from ..exceptions import error_handler
 
 log = alog.use_channel("MODULE_CFG")
 error = error_handler.get(log)
diff --git a/caikit/core/modules/decorator.py b/caikit/core/modules/decorator.py
index fea6bef96..d1326ce9c 100644
--- a/caikit/core/modules/decorator.py
+++ b/caikit/core/modules/decorator.py
@@ -28,10 +28,10 @@
 
 # Local
 from ..data_model import ProducerId
+from ..exceptions import error_handler
 from ..registries import module_backend_registry, module_backend_types, module_registry
 from ..signature_parsing import CaikitMethodSignature
 from ..task import TaskBase
-from ..toolkit.errors import error_handler
 from .base import ModuleBase
 import caikit.core
 
diff --git a/caikit/core/modules/loader.py b/caikit/core/modules/loader.py
index a0b7b3bdc..94936ad8d 100644
--- a/caikit/core/modules/loader.py
+++ b/caikit/core/modules/loader.py
@@ -23,7 +23,7 @@
 import alog
 
 # Local
-from ..toolkit.errors import error_handler
+from ..exceptions import error_handler
 from .config import ModuleConfig
 from caikit import core
 
diff --git a/caikit/core/modules/meta.py b/caikit/core/modules/meta.py
index 45f681189..e88a8bb5d 100644
--- a/caikit/core/modules/meta.py
+++ b/caikit/core/modules/meta.py
@@ -73,8 +73,8 @@ def injected_load(*args):
 import alog
 
 # Local
+from ..exceptions import error_handler
 from .config import ModuleConfig
-from caikit.core.toolkit.errors import error_handler
 
 log = alog.use_channel("METADATA_INJECT")
 error = error_handler.get(log)
diff --git a/caikit/core/modules/saver.py b/caikit/core/modules/saver.py
index 8343e9c5e..d6b0024ee 100644
--- a/caikit/core/modules/saver.py
+++ b/caikit/core/modules/saver.py
@@ -27,9 +27,9 @@
 import alog
 
 # Local
+from ..exceptions import error_handler
 from ..modules.config import ModuleConfig
 from ..toolkit import ObjectSerializer
-from ..toolkit.errors import error_handler
 from ..toolkit.wip_decorator import TempDisableWIP
 from .base import ModuleBase
 from .loader import ModuleLoader
diff --git a/caikit/core/registries.py b/caikit/core/registries.py
index 259a54778..53305a30a 100644
--- a/caikit/core/registries.py
+++ b/caikit/core/registries.py
@@ -25,7 +25,7 @@
 import alog
 
 # Local
-from .toolkit.errors import error_handler
+from .exceptions import error_handler
 
 log = alog.use_channel("REGISTRIES")
 error = error_handler.get(log)
diff --git a/caikit/core/task.py b/caikit/core/task.py
index 9dfd9ea6b..d251901a1 100644
--- a/caikit/core/task.py
+++ b/caikit/core/task.py
@@ -24,8 +24,8 @@
 # Local
 from .data_model import DataStream
 from .data_model.base import DataBase
+from .exceptions import error_handler
 from .signature_parsing import CaikitMethodSignature
-from .toolkit.errors import error_handler
 
 log = alog.use_channel("TASK_BASE")
 error = error_handler.get(log)
diff --git a/caikit/core/toolkit/__init__.py b/caikit/core/toolkit/__init__.py
index 273be365f..c6a947d9b 100644
--- a/caikit/core/toolkit/__init__.py
+++ b/caikit/core/toolkit/__init__.py
@@ -18,7 +18,6 @@
 """
 # Local
 from . import compatibility, logging
-from .errors import *
 from .fileio import *
 from .quality_evaluation import (
     EvalTypes,
diff --git a/caikit/core/toolkit/compatibility.py b/caikit/core/toolkit/compatibility.py
index a1ff81379..157a13217 100644
--- a/caikit/core/toolkit/compatibility.py
+++ b/caikit/core/toolkit/compatibility.py
@@ -21,7 +21,7 @@
 import alog
 
 # Local
-from .errors import error_handler
+from ..exceptions import error_handler
 
 log = alog.use_channel("COMPATIBILITY")
 error = error_handler.get(log)
diff --git a/caikit/core/toolkit/errors/__init__.py b/caikit/core/toolkit/errors/__init__.py
index ce5d267a5..58e5565b5 100644
--- a/caikit/core/toolkit/errors/__init__.py
+++ b/caikit/core/toolkit/errors/__init__.py
@@ -13,5 +13,20 @@
 # limitations under the License.
 
 
+"""This file exists for backwards compatibility.
+It imports from the caikit.core.exceptions package where things moved"""
+
+# Standard
+import warnings as _warnings
+
 # Local
-from .validation_error import DataValidationError
+from caikit.core.exceptions import DataValidationError, error_handler
+
+# 🌶️🌶️🌶️ Warn if this package is ever imported
+# Allow DeprecationWarnings through if anything tries to import from `toolkit.errors`
+_warnings.filterwarnings("default", category=DeprecationWarning)
+# And actually warn them
+_warnings.warn(
+    "The caikit.toolkit.errors package has moved to caikit.core.exceptions",
+    DeprecationWarning,
+)
diff --git a/caikit/core/toolkit/factory.py b/caikit/core/toolkit/factory.py
index c2682978d..e5b88cb79 100644
--- a/caikit/core/toolkit/factory.py
+++ b/caikit/core/toolkit/factory.py
@@ -25,7 +25,7 @@
 import alog
 
 # Local
-from .errors import error_handler
+from ..exceptions import error_handler
 
 log = alog.use_channel("FCTRY")
 error = error_handler.get(log)
diff --git a/caikit/core/toolkit/quality_evaluation.py b/caikit/core/toolkit/quality_evaluation.py
index 6aaacdf30..f57006883 100644
--- a/caikit/core/toolkit/quality_evaluation.py
+++ b/caikit/core/toolkit/quality_evaluation.py
@@ -26,7 +26,7 @@
 import alog
 
 # Local
-from .errors import error_handler
+from ..exceptions import error_handler
 
 log = alog.use_channel("TLKIT")
 error = error_handler.get(log)
diff --git a/caikit/core/toolkit/wip_decorator.py b/caikit/core/toolkit/wip_decorator.py
index c5dfcf8ad..58022ca04 100644
--- a/caikit/core/toolkit/wip_decorator.py
+++ b/caikit/core/toolkit/wip_decorator.py
@@ -22,7 +22,7 @@
 import alog
 
 # Local
-from .errors import error_handler
+from ..exceptions import error_handler
 
 log = alog.use_channel("WIPDC")
 error = error_handler.get(log)
diff --git a/caikit/interfaces/common/data_model/producer.py b/caikit/interfaces/common/data_model/producer.py
index 868de1701..ec28ea745 100644
--- a/caikit/interfaces/common/data_model/producer.py
+++ b/caikit/interfaces/common/data_model/producer.py
@@ -25,7 +25,7 @@
     ProducerId,
     dataobject,
 )
-from caikit.core.toolkit.errors import error_handler
+from caikit.core.exceptions import error_handler
 
 log = alog.use_channel("DATAM")
 error = error_handler.get(log)
diff --git a/caikit/runtime/model_management/loaded_model.py b/caikit/runtime/model_management/loaded_model.py
index de3ca51d2..0b318a1b2 100644
--- a/caikit/runtime/model_management/loaded_model.py
+++ b/caikit/runtime/model_management/loaded_model.py
@@ -26,7 +26,7 @@ class that contains the additional information needed to manage that model in
 
 # Local
 from caikit.core import ModuleBase
-from caikit.core.toolkit.errors import error_handler
+from caikit.core.exceptions import error_handler
 from caikit.runtime.types.caikit_runtime_exception import CaikitRuntimeException
 
 log = alog.use_channel("LOADED-MODEL")
diff --git a/caikit/runtime/model_management/model_manager.py b/caikit/runtime/model_management/model_manager.py
index 486b27085..1637f9d99 100644
--- a/caikit/runtime/model_management/model_manager.py
+++ b/caikit/runtime/model_management/model_manager.py
@@ -30,7 +30,7 @@
 # Local
 from caikit import get_config
 from caikit.core import ModuleBase
-from caikit.core.toolkit.errors import error_handler
+from caikit.core.exceptions import error_handler
 from caikit.runtime.model_management.loaded_model import LoadedModel
 from caikit.runtime.model_management.model_loader import ModelLoader
 from caikit.runtime.model_management.model_sizer import ModelSizer
diff --git a/caikit/runtime/service_generation/data_stream_source.py b/caikit/runtime/service_generation/data_stream_source.py
index 607de0a82..3ea476584 100644
--- a/caikit/runtime/service_generation/data_stream_source.py
+++ b/caikit/runtime/service_generation/data_stream_source.py
@@ -29,7 +29,7 @@
 from caikit.core.data_model.base import DataBase
 from caikit.core.data_model.dataobject import _make_oneof_init, make_dataobject
 from caikit.core.data_model.streams.data_stream import DataStream
-from caikit.core.toolkit.errors import error_handler
+from caikit.core.exceptions import error_handler
 from caikit.interfaces.common.data_model.stream_sources import (
     Directory,
     File,
diff --git a/caikit/runtime/servicers/global_train_servicer.py b/caikit/runtime/servicers/global_train_servicer.py
index 175700f1d..9c87a74ad 100644
--- a/caikit/runtime/servicers/global_train_servicer.py
+++ b/caikit/runtime/servicers/global_train_servicer.py
@@ -41,7 +41,7 @@
 import caikit.core
 
 log = alog.use_channel("GT-SERVICR-I")
-error = caikit.core.toolkit.errors.error_handler.get(log)
+error = caikit.core.exceptions.error_handler.get(log)
 
 # Protobuf non primitives
 # Ref: https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.descriptor


Test patch:
diff --git a/tests/core/data_model/streams/test_resolver.py b/tests/core/data_model/streams/test_resolver.py
index 6bbef561b..a759329a0 100644
--- a/tests/core/data_model/streams/test_resolver.py
+++ b/tests/core/data_model/streams/test_resolver.py
@@ -22,7 +22,7 @@
 # Local
 from caikit.core.data_model import DataStream
 from caikit.core.data_model.streams.resolver import DataStreamResolver
-from caikit.core.toolkit.errors import DataValidationError
+from caikit.core.exceptions.validation_error import DataValidationError
 from tests.base import TestCaseBase
 
 
diff --git a/tests/core/data_model/streams/test_validator.py b/tests/core/data_model/streams/test_validator.py
index 78b121d8a..7ad1ae99e 100644
--- a/tests/core/data_model/streams/test_validator.py
+++ b/tests/core/data_model/streams/test_validator.py
@@ -15,7 +15,7 @@
 # Local
 from caikit.core.data_model import DataStream
 from caikit.core.data_model.streams.validator import DataStreamValidator
-from caikit.core.toolkit.errors import DataValidationError
+from caikit.core.exceptions.validation_error import DataValidationError
 
 # Unit Test Infrastructure
 from tests.base import TestCaseBase
diff --git a/tests/core/toolkit/test_error_handler.py b/tests/core/toolkit/test_error_handler.py
index 5cf56d2b1..ed0908f48 100644
--- a/tests/core/toolkit/test_error_handler.py
+++ b/tests/core/toolkit/test_error_handler.py
@@ -24,7 +24,7 @@
 import alog
 
 # Local
-from caikit.core.toolkit.errors import error_handler
+from caikit.core.exceptions import error_handler
 
 # Unit Test Infrastructure
 from tests.base import TestCaseBase