You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by se...@apache.org on 2021/01/19 10:10:32 UTC
[incubator-nlpcraft] 01/01: WIP.
This is an automated email from the ASF dual-hosted git repository.
sergeykamov pushed a commit to branch NLPCRAFT-191
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
commit 15d7453f753d9d92e52936329dc8028125e98e5d
Author: Sergey Kamov <sk...@gmail.com>
AuthorDate: Tue Jan 19 13:09:44 2021 +0300
WIP.
---
.../apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
index d7f6d2a..1119c27 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/probe/mgrs/deploy/NCDeployManager.scala
@@ -207,7 +207,7 @@ object NCDeployManager extends NCService with DecorateAsScala {
if (syns.add(holder)) {
cnt += 1
- if (cnt > maxCnt)
+ if (mdl.isMaxSynonymsThresholdError && cnt > maxCnt)
throw new NCE(s"Too many total synonyms detected [" +
s"mdlId=$mdlId, " +
s"cnt=$cnt, " +
@@ -369,6 +369,15 @@ object NCDeployManager extends NCService with DecorateAsScala {
}
}
+ if (cnt > maxCnt && !mdl.isMaxSynonymsThresholdError)
+ logger.warn(
+ s"Too many total synonyms detected [" +
+ s"mdlId=$mdlId, " +
+ s"cnt=$cnt, " +
+ s"max=$maxCnt" +
+ s"]"
+ )
+
// Discard value loaders.
for (elm ← mdl.getElements.asScala) {
val ldr = elm.getValueLoader