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/05/05 20:46:59 UTC

[incubator-nlpcraft] branch master updated: Update NCCliCommands.scala

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

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


The following commit(s) were added to refs/heads/master by this push:
     new f493da9  Update NCCliCommands.scala
f493da9 is described below

commit f493da9ab4a4110a79e8923813e9bf6da71b067f
Author: unknown <ar...@datalingvo.com>
AuthorDate: Wed May 5 13:46:46 2021 -0700

    Update NCCliCommands.scala
---
 .../model/tools/cmdline/NCCliCommands.scala        | 59 ++++++++++------------
 1 file changed, 28 insertions(+), 31 deletions(-)

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 a7df0e9..8fe5387 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
@@ -640,8 +640,8 @@ private [cmdline] object NCCliCommands {
                     value = Some("path"),
                     optional = true,
                     desc =
-                        s"Configuration file path. Server will automatically look for ${y("'nlpcraft.conf'")} " +
-                        s"configuration file in the same directory as NLPCraft JAR file. If the configuration file has " +
+                        s"Configuration file path. Server will automatically look for ${y("'server.conf'")} " +
+                        s"configuration file in ${y("'resources'")} folder or on the classpath. If the configuration file has " +
                         s"different name or in different location use this parameter to provide an alternative path. " +
                         s"Note that the server and the probe can use the same file for their configuration. " +
                         s"Note also that you can use ${y("'~'")} at the beginning of the path to specify user home directory."
@@ -690,7 +690,7 @@ private [cmdline] object NCCliCommands {
                     desc = "Starts local server with default configuration."
                 ),
                 Example(
-                    usage = Seq(s"$PROMPT $SCRIPT_NAME start-server -c=~/myapp/nlpcraft.conf -t=5"),
+                    usage = Seq(s"$PROMPT $SCRIPT_NAME start-server -c=~/myapp/my_cofig.conf -t=5"),
                     desc = "Starts local server with alternative configuration file and timeout of 5 mins."
                 )
             )
@@ -706,30 +706,28 @@ private [cmdline] object NCCliCommands {
             body = NCCli.cmdStartProbe,
             params = Seq(
                 Parameter(
+                    id = "cp",
+                    names = Seq("--cp", "-p"),
+                    value = Some("path"),
+                    desc =
+                        s"Additional JVM classpath that will be appended to the default NLPCraft JVM classpath. " +
+                        s"When starting a probe with your own models you must " +
+                        s"provide this additional classpath for the models and their dependencies this probe will be hosting. " +
+                        s"Note that you can use ${y("'~'")} at the beginning of the classpath component to specify user home directory."
+                ),
+                Parameter(
                     id = "config",
                     names = Seq("--cfg", "-c"),
                     value = Some("path"),
                     optional = true,
                     desc =
-                        s"Configuration file path. Probe will automatically look for ${y("'nlpcraft.conf'")} " +
-                        s"configuration file in the same directory as NLPCraft JAR file. If the configuration file has " +
+                        s"Configuration file path. Probe will automatically look for ${y("'probe.conf'")} " +
+                        s"in ${y("'resources'")} folder or on the classpath. If the configuration file has " +
                         s"different name or in different location use this parameter to provide an alternative path. " +
                         s"Note that the server and the probe can use the same file for their configuration. " +
                         s"Note also that you can use ${y("'~'")} at the beginning of the path to specify user home directory."
                 ),
                 Parameter(
-                    id = "cp",
-                    names = Seq("--cp", "-p"),
-                    value = Some("path"),
-                    optional = true,
-                    desc =
-                        s"Additional JVM classpath that will be appended to the default NLPCraft JVM classpath. " +
-                        s"Although this configuration property is optional, when deploying your own models you must " +
-                        s"provide this additional classpath for the models and their dependencies this probe will be hosting. " +
-                        s"Note that this is only optional if you are running example models shipped with NLPCraft. " +
-                        s"Note also that you can use ${y("'~'")} at the beginning of the classpath component to specify user home directory."
-                ),
-                Parameter(
                     id = "models",
                     names = Seq("--mdls", "-m"),
                     value = Some("<model list>"),
@@ -774,9 +772,9 @@ private [cmdline] object NCCliCommands {
                 Example(
                     usage = Seq(
                         s"$PROMPT $SCRIPT_NAME start-probe ",
-                        "  --cfg=~/myapp/nlpcraft.conf ",
-                        "  --mdls=my.package.Model ",
                         "  --cp=~/myapp/target/classes ",
+                        "  --cfg=~/myapp/my_probe_config.conf ",
+                        "  --mdls=my.package.Model ",
                         "  --jmvOpts=\"-ea -Xms2048m\" ",
                         "  --timeoutMins=5"
                     ),
@@ -800,21 +798,9 @@ private [cmdline] object NCCliCommands {
             body = NCCli.cmdTestModel,
             params = Seq(
                 Parameter(
-                    id = "config",
-                    names = Seq("--cfg", "-c"),
-                    value = Some("path"),
-                    optional = true,
-                    desc =
-                        s"Configuration file path. By default, the embedded probe will automatically look for ${y("'nlpcraft.conf'")} " +
-                        s"configuration file in the same directory as NLPCraft JAR file. If the configuration file has " +
-                        s"different name or in different location use this parameter to provide an alternative path. " +
-                        s"Note also that you can use ${y("'~'")} at the beginning of the path to specify user home directory."
-                ),
-                Parameter(
                     id = "cp",
                     names = Seq("--cp", "-p"),
                     value = Some("path"),
-                    optional = true,
                     desc =
                         s"Additional JVM classpath that will be appended to the default NLPCraft JVM classpath. " +
                         s"Although this configuration property is optional, when testing your own models you must " +
@@ -823,6 +809,17 @@ private [cmdline] object NCCliCommands {
                         s"Note also that you can use ${y("'~'")} at the beginning of the classpath component to specify user home directory."
                 ),
                 Parameter(
+                    id = "config",
+                    names = Seq("--cfg", "-c"),
+                    value = Some("path"),
+                    optional = true,
+                    desc =
+                        s"Configuration file path. By default, the embedded probe will automatically look for ${y("'probe.conf'")} " +
+                        s"in ${y("'resources'")} folder or on the classpath. If the configuration file has " +
+                        s"different name or in different location use this parameter to provide an alternative path. " +
+                        s"Note also that you can use ${y("'~'")} at the beginning of the path to specify user home directory."
+                ),
+                Parameter(
                     id = "models",
                     names = Seq("--mdls", "-m"),
                     value = Some("<model list>"),