Skip to content

Commit

Permalink
disable hard exception
Browse files Browse the repository at this point in the history
  • Loading branch information
maziyarpanahi committed Feb 19, 2024
1 parent 1bf9220 commit eb91fde
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/com/johnsnowlabs/ml/ai/Albert.scala
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ private[johnsnowlabs] class Albert(
case e: Exception =>
// Log the exception as a warning
logger.warn("Exception: ", e)
// Rethrow the exception to propagate it further
throw e
// Rethrow the exception to propagate it further
// throw e
}
case _ =>
val tensors = new TensorResources()
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/com/johnsnowlabs/ml/ai/Bert.scala
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private[johnsnowlabs] class Bert(
// Log the exception as a warning
logger.warn("Exception: ", e)
// Rethrow the exception to propagate it further
throw e
// throw e
}
case _ =>
val tensors = new TensorResources()
Expand Down Expand Up @@ -242,7 +242,7 @@ private[johnsnowlabs] class Bert(
// Log the exception as a warning
logger.warn("Exception: ", e)
// Rethrow the exception to propagate it further
throw e
// throw e
}
case _ =>
val tensors = new TensorResources()
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/johnsnowlabs/ml/ai/CamemBert.scala
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private[johnsnowlabs] class CamemBert(
// Log the exception as a warning
logger.warn("Exception: ", e)
// Rethrow the exception to propagate it further
throw e
// throw e
}
case _ =>
val tensors = new TensorResources()
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/johnsnowlabs/ml/ai/DeBerta.scala
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class DeBerta(
// Log the exception as a warning
logger.warn("Exception: ", e)
// Rethrow the exception to propagate it further
throw e
// throw e
}
case _ =>
val tensors = new TensorResources()
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/johnsnowlabs/ml/ai/DistilBert.scala
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private[johnsnowlabs] class DistilBert(
// Log the exception as a warning
logger.warn("Exception: ", e)
// Rethrow the exception to propagate it further
throw e
// throw e
}
case _ =>
val tensors = new TensorResources()
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/johnsnowlabs/ml/ai/RoBerta.scala
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ private[johnsnowlabs] class RoBerta(
// Log the exception as a warning
logger.warn("Exception: ", e)
// Rethrow the exception to propagate it further
throw e
// throw e
}
case _ =>
val tensors = new TensorResources()
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/com/johnsnowlabs/ml/ai/XlmRoberta.scala
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ private[johnsnowlabs] class XlmRoberta(
// Log the exception as a warning
logger.warn("Exception: ", e)
// Rethrow the exception to propagate it further
throw e
// throw e
}
case _ =>
val tensors = new TensorResources()
Expand Down

0 comments on commit eb91fde

Please sign in to comment.