raise kgtk error exception on text embedding function
@@ -631,7 +631,8 @@ def main(**kwargs):
# formatter = logging.Formatter("%(asctime)s [%(levelname)s] %(name)s %(lineno)d -- %(message)s", '%m-%d %H:%M:%S')
# console.setFormatter(formatter)
# logging.getLogger('').addHandler(console)
-
+ from kgtk.exceptions import KGTKException
+ try:
import logging
import os
import time
@@ -715,7 +716,6 @@ def main(**kwargs):
run_TSNE = kwargs.get("run_TSNE", True)
- try:
for each_model_name in all_models_names:
for each_input_file in input_uris:
_logger.info("Running {} model on {}".format(each_model_name, each_input_file))
@@ -731,7 +731,7 @@ def main(**kwargs):
_logger.info("*" * 20 + "finished" + "*" * 20)
except Exception as e:
_logger.debug(e, exc_info=True)
-
+ raise KGTKException(str(e))
def parser():
return {
