Skip to content

Konduit CLI - don't log build tool output when starting server #447

@AlexDBlack

Description

@AlexDBlack

Currently, when I do konduit serve ... I get the full build tool output (see below)
The build info is very useful under some circumstances. However, for a 'normal' KS launch: we shouldn't show it.
Instead, we should:

  • Add a "quiet" mode to the build CLI that collects the output, and only prints it to the console after/if something goes wrong
  • Use the quiet mode by default when running konduit serve
  • Add a "-v" or "--verbose" option or similar to the 'konduit serve' command to override the "build tool quiet mode by default"

Generally, we should not log the whole generated gradle file either (that was useful during development but is now unnecessary)

================================== Konduit Serving Build Tool ==================================
------------------------------------- Build Configuration --------------------------------------
Pipeline:                     C:\Users\Alex\.konduit-serving\build\demo_server\pipeline.json
Target OS:                    WINDOWS
Target CPU arch.:             x86
Target Device:                CUDA_10.2
Server type(s):               HTTP, GRPC
Deployment type(s):           CLASSPATH


Deployment configuration: ClassPathDeployment
  classpath.outputFile:       C:\Users\Alex\.konduit-serving\build\demo_server\manifest.jar
  classpath.type:             JAR_MANIFEST


--------------------------------------- Validating Build ---------------------------------------
Resolving modules required for pipeline execution...
  konduit-serving-pipeline
  konduit-serving-vertx
  konduit-serving-cli
  konduit-serving-http
  konduit-serving-grpc
  konduit-serving-image
  konduit-serving-deeplearning4j

Resolving module optional/configurable dependencies for deployment target: Target(WINDOWS,x86,CUDADevice(cudaVersion=10.2))
  konduit-serving-pipeline:          OK
  konduit-serving-vertx:             OK
  konduit-serving-cli:               OK
  konduit-serving-http:              OK
  konduit-serving-grpc:              OK
  konduit-serving-image:             OK
  konduit-serving-deeplearning4j:    OK

Resolved dependencies:
  ai.konduit.serving:konduit-serving-pipeline:0.1.0-SNAPSHOT
  ai.konduit.serving:konduit-serving-vertx:0.1.0-SNAPSHOT
  ai.konduit.serving:konduit-serving-cli:0.1.0-SNAPSHOT
  ai.konduit.serving:konduit-serving-http:0.1.0-SNAPSHOT
  ai.konduit.serving:konduit-serving-grpc:0.1.0-SNAPSHOT
  ai.konduit.serving:konduit-serving-image:0.1.0-SNAPSHOT
  ai.konduit.serving:konduit-serving-deeplearning4j:0.1.0-SNAPSHOT
  org.bytedeco:cuda:10.2-7.6-1.5.3:windows-x86_64
  org.nd4j:nd4j-cuda-10.2:1.0.0-beta7
  org.nd4j:nd4j-cuda-10.2:1.0.0-beta7:windows-x86_64

Checking deployment configurations:
  ClassPathDeployment:              OK

>> Validation Passed

-------------------------------------------- Build ---------------------------------------------
Generating build files...
        repositories {
mavenCentral()
mavenLocal()
jcenter()
}
plugins { java

}
group = "ai.konduit"
dependencies {
        implementation("ai.konduit.serving:konduit-serving-pipeline:0.1.0-SNAPSHOT")
        implementation("ai.konduit.serving:konduit-serving-vertx:0.1.0-SNAPSHOT")
        implementation("ai.konduit.serving:konduit-serving-cli:0.1.0-SNAPSHOT")
        implementation("ai.konduit.serving:konduit-serving-http:0.1.0-SNAPSHOT")
        implementation("ai.konduit.serving:konduit-serving-grpc:0.1.0-SNAPSHOT")
        implementation("ai.konduit.serving:konduit-serving-image:0.1.0-SNAPSHOT")
        implementation("ai.konduit.serving:konduit-serving-deeplearning4j:0.1.0-SNAPSHOT")
        implementation("org.bytedeco:cuda:10.2-7.6-1.5.3:windows-x86_64")
        implementation("org.nd4j:nd4j-cuda-10.2:1.0.0-beta7")
        implementation("org.nd4j:nd4j-cuda-10.2:1.0.0-beta7:windows-x86_64")
}
//Write a JAR with a manifest containing the path of all dependencies, but no other content
tasks.withType(Jar::class) {
    manifest {
        attributes["Manifest-Version"] = "1.0"
        attributes["Main-Class"] = "ai.konduit.serving.cli.launcher.KonduitServingLauncher"
        attributes["Class-Path"] = "file:/" + configurations.runtimeClasspath.get().getFiles().joinToString(separator=" file:/")
    }
setProperty("archiveFileName", "C:/Users/Alex/.konduit-serving/build/demo_server/manifest.jar")
}
Dependencies: [Dependency(ai.konduit.serving:konduit-serving-pipeline:0.1.0-SNAPSHOT), Dependency(ai.konduit.serving:konduit-serving-vertx:0.1.0-SNAPSHOT), Dependency(ai.konduit.serving:konduit-serving-cli:0.1.0-SNAPSHOT), Dependency(ai.konduit.serving:konduit-serving-http:0.1.0-SNAPSHOT), Dependency(ai.konduit.serving:konduit-serving-grpc:0.1.0-SNAPSHOT), Dependency(ai.konduit.serving:konduit-serving-image:0.1.0-SNAPSHOT), Dependency(ai.konduit.serving:konduit-serving-deeplearning4j:0.1.0-SNAPSHOT), Dependency(org.bytedeco:cuda:10.2-7.6-1.5.3:windows-x86_64), Dependency(org.nd4j:nd4j-cuda-10.2:1.0.0-beta7), Dependency(org.nd4j:nd4j-cuda-10.2:1.0.0-beta7:windows-x86_64)]
Deployments: [ClassPathDeployment(outputFile=C:\Users\Alex\.konduit-serving\build\demo_server\manifest.jar, type=JAR_MANIFEST)]
>> Build file generation complete


Starting build...
> Task :wrapper
> Task :compileJava NO-SOURCE
> Task :processResources NO-SOURCE
> Task :classes UP-TO-DATE
> Task :jar
> Task :assemble
> Task :compileTestJava NO-SOURCE
> Task :processTestResources NO-SOURCE
> Task :testClasses UP-TO-DATE
> Task :test NO-SOURCE
> Task :check UP-TO-DATE
> Task :build

BUILD SUCCESSFUL in 11s
2 actionable tasks: 2 executed

>> Build complete


---------------------------------------- Build Summary -----------------------------------------
Build duration:               11 sec
Output artifacts:             1

 ----- ClassPathDeployment -----
Classpath file location:        C:\Users\Alex\.konduit-serving\build\demo_server\manifest.jar
Number of classpath entries:    110


Starting konduit server...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions