You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nlpcraft.apache.org by ar...@apache.org on 2021/06/25 06:53:32 UTC

[incubator-nlpcraft] branch NLPCRAFT-344 updated: WIP.

This is an automated email from the ASF dual-hosted git repository.

aradzinski pushed a commit to branch NLPCRAFT-344
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git


The following commit(s) were added to refs/heads/NLPCRAFT-344 by this push:
     new e68d5c8  WIP.
e68d5c8 is described below

commit e68d5c8bb3a8990e20a02b7963fe12120d113ddf
Author: Aaron Radzinzski <ar...@datalingvo.com>
AuthorDate: Thu Jun 24 23:53:12 2021 -0700

    WIP.
---
 .../main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala | 2 +-
 .../org/apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala    | 7 ++++---
 .../org/apache/nlpcraft/model/tools/cmdline/NCCliProbeBeacon.scala | 6 +++++-
 3 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
index f21dd50..2676651 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
@@ -1384,7 +1384,7 @@ object NCCli extends NCCliBase {
 
         val logPath = if (beacon.logPath != null) g(beacon.logPath) else y("<not available>")
         val jarsFolder = if (beacon.jarsFolder != null) g(beacon.jarsFolder) else y("<not set>")
-        val mdlSeq = beacon.models.split(",").map(s => g(s.strip)).toSeq
+        val mdlSeq = beacon.modelsSeq.map(s => g(s.strip))
 
         tbl += ("PID", s"${g(beacon.pid)}")
         tbl += ("Version", s"${g(beacon.ver)} released on ${g(beacon.relDate)}")
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala
index c6e9853..e0760d8 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliCommands.scala
@@ -738,7 +738,7 @@ private [cmdline] object NCCliCommands {
                         s"Comma separated list of fully qualified class names for models to deploy. This will override " +
                         s"${y("'nlpcraft.probe.models'")} configuration property from either default configuration file " +
                         s"or the one provided by ${c("--cfg")} parameter. Note that you also must provide the additional " +
-                        s"classpath via ${c("--cp")} parameter."
+                        s"classpath in this case via ${c("--cp")} parameter."
                 ),
                 Parameter(
                     id = "jvmopts",
@@ -826,8 +826,9 @@ private [cmdline] object NCCliCommands {
                     value = Some("<model list>"),
                     optional = true,
                     desc =
-                        s"Comma separated list of fully qualified class names for models to test. Note that you also " +
-                        s"must provide the additional classpath via ${c("--cp")} parameter."
+                        s"Comma separated list of fully qualified class names for models to deploy and test. Note that you also " +
+                        s"must provide the additional classpath via ${c("--cp")} parameter. If not provided, the models " +
+                        s"specified in configuration file (${c("--cfg")} parameter) will be used instead."
                 ),
                 Parameter(
                     id = "jvmopts",
diff --git a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliProbeBeacon.scala b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliProbeBeacon.scala
index 34aeb97..b43beaf 100644
--- a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliProbeBeacon.scala
+++ b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCliProbeBeacon.scala
@@ -17,6 +17,8 @@
 
 package org.apache.nlpcraft.model.tools.cmdline
 
+import org.apache.nlpcraft.common._
+
 /**
  *
  * @param pid
@@ -47,4 +49,6 @@ case class NCCliProbeBeacon (
     startMs: Long,
     @transient var logPath: String = null,
     @transient var ph: ProcessHandle = null
-)
+) {
+    lazy val modelsSeq: Seq[String] = U.splitTrimFilter(models, ",")
+}