Git Product home page Git Product logo

h2oai / dai-deployment-templates Goto Github PK

View Code? Open in Web Editor NEW
17.0 63.0 9.0 5.07 MB

Production ready templates for deploying Driverless AI (DAI) scorers. https://h2oai.github.io/dai-deployment-templates/

License: Apache License 2.0

Java 89.60% HCL 1.97% Jupyter Notebook 1.82% Python 2.07% Scala 4.36% Dockerfile 0.18%
machine-learning model-deployment model-serving model-server h2oai h2o mojo

dai-deployment-templates's Introduction

Driverless AI Deployment Templates

This repository contains different deployment templates for Driverless AI (DAI) scorers.

The structure is as follows:

  • common: Code shared by multiple deployment templates
    • swagger: The shared REST API definitions. Please don't duplicate.
    • rest-{framework}-model/api: Modules with Java classes autogenerated from the API Swagger definition.
    • transform: Shared transformers between mojo and API classes.
  • {target}-scorer: One module per deployment target.

Note: Please look to each subproject for additional deployment information.

Build

This is a Gradle multi-project repository. To get the resulting distribution archive, run:

$ ./gradlew distributionZip

The result of which is ./build/dai-deployment-templates-{CURRENT_VERSION}.zip, which is in turn integrated in the DAI build and deployment process.

Note that each of the templates is expected to inject its files in this archive in their respective gradle files. Please see and follow examples in the existing deployment templates.

Test Build

The ci process for building the above artifacts also performs linting and styling checks, and will fail if there are any issues found. In order test this before pushing to the remote, these checks can be performed locally.

To test builds locally, with respect to linting and styling use the following steps:

  1. run ./gradlew applySpotless
  • this will help clean the code base with proper linting/styling
  1. run ./gradlew check
  • this will run the same check as in Jenkins, to check for styling/linting errors.
  • will identify issues such as missing javadoc strings etc.

Release

The deployment templates zip archives are stored in S3 at:

The push is handled by Jenkins from master and release* branches with versioning defined by a value in gradle.properties. The snapshots are versions with the -SNAPSHOT suffix in version value defined in gradle.properties.

The master branch is expected to be a snapshot (otherwise Jenkins pipeline fails). The release* branches may be both snapshot and release versions. Beware that Jenkins is happy to overwrite the release artifact, if there is a new commit with the same version.

In addition to this, we maintain GitHub releases that mirror the released artifacts. For example an artifact versioned 0.0.5 is tagged as v0.0.5 with the actual release called Release v0.0.5. This step is not automated yet.

Step-by-step

  1. Prepare PR with two commits:
    • First, "Release X.Y.Z" that removes the -SNAPSHOT suffix in gradle.properties form version. The diff will look like:
      - version = 1.2.3-SNAPSHOT
      + version = 1.2.3
    • Second, "Dev X.Y.(Z+1)" that bumps the version and adds the -SNAPSHOT suffix back to version in gradle.properties. The diff will look like:
      - version = 1.2.3
      + version = 1.2.4-SNAPSHOT
    • Once approved, rebase the PR on top of master, so that both the commits exist in the history as separate commits.
    • Create a release branch pointing to the first commit of the two, the release one, called release-X.Y.Z. Once in GitHub, Jenkins will automatically pick it up and push the corresponding release packages to S3.
    • Create a GitHub release "Release vX.Y.Z" with meaningful description, tag vX.Y.Z, and branch release-X.Y.Z.

Release Lines

Currently, we have two lines of releases:

  • DriverlessAI 1.7.x, bleeding edge: These releases are meant for the latest version of DriverlessAI and contains the most up to date version of the templates. Git branch: master, release versions: 1.x.y, immutable release branch names: release-1.x.y.
  • DriverlessAI 1.6.x, LTS: These releases are meant to support the LTS branch of DriverlessAI marked as 1.6.x. Changes in this branch must not break compatibility, so please keep the Terraform version fixed. Git branch support-1.6, release versions 0.0.x, immutable release branch names: release-0.0.x.

Upgrading Mojo2 Runtime

To upgrade the mojo2 runtime dependency version, just edit the corresponding line in the gradle.properties file a push a new version of the deployment templates out as described above.

Note that in order to be able to build against the new mojo2 runtime, the mojo2 runtime implementation and the api jars have to be available in the public Maven repository: https://mvnrepository.com/artifact/ai.h2o/mojo2-runtime-api and https://mvnrepository.com/artifact/ai.h2o/mojo2-runtime-impl.

Both the steps are handled by the DAI Build: mojo2 Jenkins pipeline: http://mr-0xc1:8080/view/H2OAI/job/mojo2/job/master/ if the doRelease parameter is checked when clicking on Build with Parameters on the master branch (again, the master should currently contain a version without the -SNAPSHOT suffix).

Note that there is an extra step to push the mojo2-runtime-api to the public Maven repo. One has to login to Sonatype using H2o public nexus credentials, manually close the appropriate staging repository with the new artifacts (usually the first one called aih2o.*, but check the contents first!), and then release it. The Maven UI takes time to display the new version, but the artifacts themselves usually appear in the order of seconds/minutes after the release (i.e., you will not see the new version on https://mvnrepository.com/artifact/ai.h2o/mojo2-runtime-api, but you will be able to build against it).

dai-deployment-templates's People

Contributors

achraf-mer avatar chathurindaranasinghe avatar ericgudgion avatar g-eoj avatar hasithjp avatar itsmunishbhardwaj avatar jackjii79 avatar jahodfra avatar jherna17 avatar michal-raska avatar mmalohlava avatar neema-m avatar nidhimehta avatar nkpng2k avatar orendain avatar osery avatar pkozelka avatar rajimut avatar sh1ng avatar susankha avatar thirdwing avatar this avatar tomkraljevic avatar zainhaq-h2o avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dai-deployment-templates's Issues

[Feature Request] Expose rest-scorer expected input schema as an XSD

This is a feature request from the customer
Support ticket - https://support.h2o.ai/a/tickets/100147

Enhance local rest scorer to expose an XSD and JSON schema (if possible) for the structure of the input request it expects to get in the scoring call. This schema information would be critical for the applications that would be consuming the scorer as it lays out the interface/contract for the communication.

Customer Ascend Learning is integrating local rest scorer with the DEFI their loan originating software and this is a critical requirement for them.

@mmalohlava based on our discussion last night I have communicated to the customer that we will implement this and release by EOM (November). I hope this timeline works.

Add Mojo metadata endpoints

See the swagger file and

  • Implement the endpoints for querying for supported models and their descriptions
  • Map these in the ApiGatewayWrapper based on the request path
  • Ensure API Gateway actually forwards the requests to these additional request paths.

[JDBC] Gradle build fails due to the common/JDBC module.

./gradlew build results in an error, due to the common/jdbc module:

> Task :common:jdbc:compileScala FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':common:jdbc:compileScala
> java.lang.NullPointerException (no error message)

Additionally, the version of zinc is 2.10.5, while the major version of Scala being brought in is 2.11. Mixing major versions of scala packages often results in issues (plus zinc has been deprecated for a while) - this may or may not be related, I haven't done any digging for the issue above.

[LRS] Model UUID for H2O-3 models are not returned by API

curl -X GET "http://localhost:8080/model/id" should return a model's UUID. For example:

*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8080 (#0)
> GET /model/id HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.64.1
> accept: text/plain
>
< HTTP/1.1 200
< Content-Type: text/plain;charset=UTF-8
< Content-Length: 36
< Date: Thu, 26 Mar 2020 15:57:07 GMT
<
* Connection #0 to host localhost left intact
0a61c3d2-59cc-11ea-8693-da81fb130f52* Closing connection 0

However, for H2O-3 models, the server responds with an OK, but no UUID:

*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8080 (#0)
> GET /model/id HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.64.1
> accept: text/plain
>
< HTTP/1.1 200
< Content-Type: text/plain;charset=UTF-8
< Content-Length: 0
< Date: Thu, 26 Mar 2020 15:56:51 GMT
<
* Connection #0 to host localhost left intact
* Closing connection 0

Additionally, if a UUID can not be retrieved, a 200 response should not be returned.

Integrate Java REST server into dai-deployment-templates repo

PR: https://github.com/h2oai/h2oai/pull/4725 contains a prototype of the REST server code.
We want that built&packed in the same way as the AWS lambda.

Changes needed:

  • don't commit swagger generated code (generate at build time instead)
  • if possible, don't edit the code in DAI, just pass the correct parameters to the jar file.
  • only one swagger if possible (can we use the shared one?)
  • fix the tests, the following hides all errors:
} catch (Exception e) {
}

[CHORE] Refactor Repo Structure to Allow Multiple Languages

@osery with cpp mojo's there will me more deployment strategies that implement python/alternative language to java.

Opening this issue to track thoughts here:

  1. perhaps we can do something similar to what we have in DAI with a Makefile, and nest the projects into their own separate directories. e.g.
dai-deployment-templates
|-- Makefile
|-- python
        |-- cpp mojo project
        |-- azureml project
|-- java
        |-- original java mojo projects.

then we can change the java build process to dump the builds into a build directory... same as whatever we chose for the python side and then compile both build directories and zip them to ship.

WDYT?

db-mojo-scorer template

Template

  • Build process
  • How to push the scorer
  • Where you deploying
  • Example how to score with it

Allow user to submit extra columns

Currently if you give the MOJO scorer extra columns that weren't used for training it ignores them. However for lamda deployment we throw an error:

ai.h2o.mojos.deploy.common.transform.ScoreRequestFormatException: Input fields don't match the Mojo

The behavior of lambda deployment should match local MOJO behavior.

Cache the Mojo Pipeline so that it is not fetched from S3 on every request.

Currently the MojoScorer loads the Mojo pipeline from S3 on each request. This is clearly suboptimal.

  • Make the Mojo pipeline a lazy singleton.
  • Ensure that the singleton is reloaded is Terraform is used to push a new mojo version to S3. E.g. add an env variable with a fingerprint of the mojo file.

[REST] Introduce scoring warnings in response payload

The rest api should return warning (for example, missing value) as a part of JSON response. The capability should be controlled by request (e.g., user has to explicitly ask to include warning in response).

Actions:
(1) modify IDL to include optional payload in response to contain list of warnings (strings)
(2) modify IDL to include a flag in request to control presense of (1) in response

Follow up actions:
(1) modify MOJO to be report any interesting in pipeline (e.g., missing value, or implicit cast from string to int)

CC: @nkpng2k - let's keep this one for some intern.

Error 2335

Running a MOJO pipeline under local-rest-scorer shows an unexpected errors 2335 (total is 0.9999999999999998, expected 1.0). Any idea to fix?

Thanks

2021-11-28 11:26:26.238 ERROR 2335 --- [ main] ai.h2o.mojos.runtime.readers.protobuf.d : Mapping coeffs for 'contrib_998_TruncSVD:AAA:BBB:CCC:DDD:EEE:FFF:GGG' total is 0.9999999999999998, expected 1.0
2021-11-28 11:26:26.238 ERROR 2335 --- [ main] ai.h2o.mojos.runtime.readers.protobuf.d : Mapping coeffs for 'contrib_998_TruncSVD:AAA:BBB:CCC:DDD:EEE:FFF:GGG' total is 0.9999999999999998, expected 1.0
2021-11-28 11:26:26.238 ERROR 2335 --- [ main] ai.h2o.mojos.runtime.readers.protobuf.d : Mapping coeffs for 'contrib_998_TruncSVD:AAA:BBB:CCC:DDD:EEE:FFF:GGG' total is 0.9999999999999998, expected 1.0

[TRANSFORM/REST] Handle mismatched column names in the requests

Currently, if the input request contains columns that do not match the columns expected by the pipeline, these are silently ignored and the input has NaNs instead. This leads to rather cryptic behavior in real life cases where the input request contains a typo or a lower/upper case differences in the column names.

It would be safer to return error on these requests to make the discrepancy obvious and let the caller decide if an empty value should be used instead or not (= fail fast).

[Docs] Create docs template

Create a docs template for this repository. The goal is to produce a document with deployment scenarios/examples.

Implement enabled features for the scorers

This comes as a continuation of the shapley contribution endpoint implemented in the local rest scorer recently
The /contribution endpoint is effectively implemented only for local rest scorer. In order for the consumer to know if the a scorer has a specific feature implemented via its API endpoints we proposing an endpoint called enabled-features which contains a list of strings like ["contribution", "score", "powerangers"]. This would represents the capabilities of the model supported by the scorer’s API endpoints

Automate release process

Currently, any push to master is built and depending on the version in gradle.properties containing SNAPSHOT or not, it is either released (pushed to S3) or not.

This means that in order to make a release, one has to:

  1. edit gradle.properties to remove -SNAPSHOT suffix, push to master
  2. Jenkins will pick this up and publish the artifacts
  3. edit gradle.properties to bump the version and add the -SHAPSHOT suffix again.

This is tedious and error prone. A one-click solution would be preferred, either initialised from GitHub but creating a GitHub release and let Jenkins pick it up and publish the artefacts, or from Jenkins by triggering a corresponding type of a pipeline.

Docker install on MAC failed

Hello,

I tried downloading and installing the Docker images on MAC, and it fails. (http://docs.h2o.ai/driverless-ai/latest-stable/docs/userguide/install/mac-osx.html)

I faced a number of issues with permissions and installation of the Docker image on MAC:

https://stackoverflow.com/questions/42784396/docker-error-error-processing-tar-fileexit-status-1-unexpected-eof

docker image prune

sudo chown -R 655 ./dai-docker-centos7-x86_64-1.9.1.1-10.0.tar

docker import dai-docker-centos7-x86_64-1.9.1.1-10.0.tar

docker import dai-docker-centos7-x86_64-1.9.1.1-10.0.tar
sha256:1d9f15acd46f6a3dcd8a014520dfbd52337c3976a70c9e8594c9dfa122e01b9a

docker image tag 1d9f15acd46f6a3dcd8a014520dfbd52337c3976a70c9e8594c9dfa122e01b9a h2oai/dai-centos7-x86_64:latest

docker images

h2oai/dai-centos7-x86_64 latest 1d9f15acd46f 14 minutes ago 28GB


sudo docker run
--pid=host
--init
--rm
--shm-size=256m
-u id -u:id -g
-p 12345:12345
-v pwd/data:/data
-v pwd/log:/log
-v pwd/license:/license
-v pwd/tmp:/tmp
h2oai/dai-centos7-x86_64:latest
MacBook-Pro:/dai-1.9.1 quantum-fusion$ pwd
/Users/hottelet/dai-1.9.1
MacBook-Pro:
/dai-1.9.1 quantum-fusion$ ls
dai-docker-centos7-x86_64-1.9.1.1-10.0.tar license run.sh
data log tmp
MacBook-Pro:~/dai-1.9.1 quantum-fusion$ ./run.sh
Password:
docker: Error response from daemon: No command specified.
See 'docker run --help'.

I ran from the docker GUI without command line arguments, and still same result.

Screen Shot 2021-04-02 at 2 08 30 PM

[AWS/Sagemaker] Reduce Code Base

After research stemming from gcp deployment methodology. I believe it is possible to remove a fair amount of code from AWS Sagemaker deployment template and make it depend on the local rest scorer/extend it.

There are only 2 requirements that would need to change as is different from local-rest-scorer

  • override /model/score endpoint to /invocations
  • add endpoint for /ping for health check

Lambda Null Pointer Exception

Was working with a prospect to test out AWS Lambda deployment. He was getting these errors. The problem was that his JSON file (test.json) was malformed. Need a more graceful way to fail in these cases.

Error details:
java.lang.NullPointerException
at ai.h2o.mojos.deploy.common.transform.RequestChecker.getProblemMessageOrNull(RequestChecker.java:52)
at ai.h2o.mojos.deploy.common.transform.RequestChecker.verify(RequestChecker.java:25)
at ai.h2o.mojos.deploy.aws.lambda.MojoScorer.score(MojoScorer.java:48)
at ai.h2o.mojos.deploy.aws.lambda.ApiGatewayWrapper.handleRequest(ApiGatewayWrapper.java:39)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at lambdainternal.EventHandlerLoader$PojoMethodRequestHandler.handleRequest(EventHandlerLoader.java:263)
at lambdainternal.EventHandlerLoader$PojoHandlerAsStreamHandler.handleRequest(EventHandlerLoader.java:180)
at lambdainternal.EventHandlerLoader$2.c

MAC install failure for driverlessAI

Hello,

I tried installing driverlessAI using your GitHub instructions.

The result failed:

./gradlew distributionZip
Downloading https://services.gradle.org/distributions/gradle-5.6.4-all.zip
.....................................................................................................................................

Welcome to Gradle 5.6.4!

Here are the highlights of this release:

  • Incremental Groovy compilation
  • Groovy compile avoidance
  • Test fixtures for Java projects
  • Manage plugin versions via settings script

For more details see https://docs.gradle.org/5.6.4/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
at org.codehaus.groovy.vmplugin.VMPluginFactory.(VMPluginFactory.java:43)
at org.codehaus.groovy.reflection.GroovyClassValueFactory.(GroovyClassValueFactory.java:35)
at org.codehaus.groovy.reflection.ClassInfo.(ClassInfo.java:109)
at org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:95)
at org.codehaus.groovy.reflection.ReflectionCache.(ReflectionCache.java:39)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerMethods(MetaClassRegistryImpl.java:209)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.(MetaClassRegistryImpl.java:107)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.(MetaClassRegistryImpl.java:85)
at groovy.lang.GroovySystem.(GroovySystem.java:36)
at org.codehaus.groovy.runtime.InvokerHelper.(InvokerHelper.java:86)
at groovy.lang.GroovyObjectSupport.getDefaultMetaClass(GroovyObjectSupport.java:59)
at groovy.lang.GroovyObjectSupport.(GroovyObjectSupport.java:32)
at org.gradle.internal.extensibility.DefaultExtraPropertiesExtension.(DefaultExtraPropertiesExtension.java:29)
at org.gradle.internal.extensibility.DefaultConvention.(DefaultConvention.java:48)
at org.gradle.api.internal.plugins.DefaultConvention.(DefaultConvention.java:28)
at org.gradle.internal.extensibility.ExtensibleDynamicObject.(ExtensibleDynamicObject.java:60)
at org.gradle.internal.instantiation.MixInExtensibleDynamicObject.(MixInExtensibleDynamicObject.java:34)
at org.gradle.initialization.DefaultSettings_Decorated.getAsDynamicObject(Unknown Source)
at org.gradle.initialization.SettingsFactory.createSettings(SettingsFactory.java:58)
at org.gradle.initialization.ScriptEvaluatingSettingsProcessor.process(ScriptEvaluatingSettingsProcessor.java:61)
at org.gradle.initialization.PropertiesLoadingSettingsProcessor.process(PropertiesLoadingSettingsProcessor.java:38)
at org.gradle.initialization.SettingsEvaluatedCallbackFiringSettingsProcessor.process(SettingsEvaluatedCallbackFiringSettingsProcessor.java:34)
at org.gradle.initialization.RootBuildCacheControllerSettingsProcessor.process(RootBuildCacheControllerSettingsProcessor.java:36)
at org.gradle.initialization.BuildOperationSettingsProcessor$2.call(BuildOperationSettingsProcessor.java:50)
at org.gradle.initialization.BuildOperationSettingsProcessor$2.call(BuildOperationSettingsProcessor.java:47)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
at org.gradle.initialization.BuildOperationSettingsProcessor.process(BuildOperationSettingsProcessor.java:47)
at org.gradle.initialization.DefaultSettingsLoader.findSettingsAndLoadIfAppropriate(DefaultSettingsLoader.java:104)
at org.gradle.initialization.DefaultSettingsLoader.findAndLoadSettings(DefaultSettingsLoader.java:45)
at org.gradle.initialization.SettingsAttachingSettingsLoader.findAndLoadSettings(SettingsAttachingSettingsLoader.java:35)
at org.gradle.internal.composite.CommandLineIncludedBuildSettingsLoader.findAndLoadSettings(CommandLineIncludedBuildSettingsLoader.java:34)
at org.gradle.internal.composite.ChildBuildRegisteringSettingsLoader.findAndLoadSettings(ChildBuildRegisteringSettingsLoader.java:47)
at org.gradle.internal.composite.CompositeBuildSettingsLoader.findAndLoadSettings(CompositeBuildSettingsLoader.java:35)
at org.gradle.initialization.DefaultSettingsPreparer.prepareSettings(DefaultSettingsPreparer.java:36)
at org.gradle.initialization.BuildOperatingFiringSettingsPreparer$LoadBuild.doLoadBuild(BuildOperatingFiringSettingsPreparer.java:59)
at org.gradle.initialization.BuildOperatingFiringSettingsPreparer$LoadBuild.run(BuildOperatingFiringSettingsPreparer.java:54)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.initialization.BuildOperatingFiringSettingsPreparer.prepareSettings(BuildOperatingFiringSettingsPreparer.java:42)
at org.gradle.initialization.DefaultGradleLauncher.prepareSettings(DefaultGradleLauncher.java:190)
at org.gradle.initialization.DefaultGradleLauncher.doClassicBuildStages(DefaultGradleLauncher.java:134)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:126)
at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:106)
at org.gradle.internal.invocation.GradleBuildController$1.execute(GradleBuildController.java:60)
at org.gradle.internal.invocation.GradleBuildController$1.execute(GradleBuildController.java:57)
at org.gradle.internal.invocation.GradleBuildController$3.create(GradleBuildController.java:85)
at org.gradle.internal.invocation.GradleBuildController$3.create(GradleBuildController.java:78)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:189)
at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:40)
at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:78)
at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:57)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:31)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:63)
at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:39)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:51)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:45)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:45)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:50)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$1.transform(InProcessBuildActionExecuter.java:47)
at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:78)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:47)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:31)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:42)
at org.gradle.launcher.exec.BuildTreeScopeBuildActionExecuter.execute(BuildTreeScopeBuildActionExecuter.java:28)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:78)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:52)
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:59)
at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:36)
at org.gradle.tooling.internal.provider.SessionScopeBuildActionExecuter.execute(SessionScopeBuildActionExecuter.java:68)
at org.gradle.tooling.internal.provider.SessionScopeBuildActionExecuter.execute(SessionScopeBuildActionExecuter.java:38)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:37)
at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:26)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:43)
at org.gradle.tooling.internal.provider.ParallelismConfigurationBuildActionExecuter.execute(ParallelismConfigurationBuildActionExecuter.java:29)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:60)
at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:32)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:55)
at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:41)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:48)
at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:32)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:68)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:27)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:82)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.base/java.lang.Thread.run(Thread.java:832)

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not initialize class org.codehaus.groovy.reflection.ReflectionCache

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 50s

Implement Shapley values for original features

As a part of this PR #241 the Shapley values are implemented for transformed features in local rest scorer. We need to extend this implemented for original features as well since Shapley values for original features are available in the latest runtime MOJO2 2.7.0

Docker image generation for local-rest-server

Per another conversation: Adding a Docker image for the local-rest-server, incorporated into the build process so as to pull in the generated local-rest-scorer.jar, may be beneficial.

I'll put together a PR for review as a first pass - will get it filed soon.

[CHORE] Adopt Naming Convention for Scorers

As Per Comments Here:
#156 (comment)

Is a good idea to restructure this repository to adopt a naming convention for scorers. This will help to avoid confusion and also make the repository easier to manage.

personally, I'd advocate for nested dirs if possible, however, @osery comment suggested something similar to rest-scorer-local and rest-scorer-aws-lambda which would also work (and be less difficult to implement, since it more or less comes down to renaming dirs and projects. 😄 )

dai-deployment-templates
|-- aws
    |-- lambda
    |-- sagemaker
|-- gcp
    |-- cloud-run
|-- azure
|-- local 

Create a sample request endpoint for Shapley contribution

There is a sample request endpoint available for getting the score. Similarly it will nice to have a sample contribution endpoint that can provide a sample request for the users who would want to get the Shapley contribution in local rest scorer.
The contribution endpoint is implemented in PR #241

mojo-runtime version check

We need to ensure that we have the latest version of mojo runtime used by deployment templates when releasing DAI.

Find a way to enforce this.

Options:

  • as a test in the DAI repo that would fail if the version in templates is different from the version in DAI, or
  • by having the templates use the mojo runtime that is bundled with DAI

Add optional Auth to the AWS lambda

We want the auth to be optional (though could be the default) so that demoing this is straightforward.

  • Implement auth API gateway (e.g., via API key)
  • Add a flag variable to the Terraform recipe

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.