Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLIPPER-107][CLIPPER-109] Implement JSON-formatted responses for query frontend #2

Closed

Conversation

Corey-Zumar
Copy link
Collaborator

Modifies query frontend and dependent infrastructure to return JSON-formatted responses to prediction queries.

From [CLIPPER-107] and the functional spec:

The format of the response body is a JSON object with the following fields:

  • Output (JSON key name “output”): The prediction JSON object.
  • Default used (JSON key name “default”): A boolean set to true if the model did not return in time and the default output was used. False otherwise.

If there is a non-recoverable error during query execution, an error JSON object will be returned instead and the HTTP response code will be set to the most appropriate error code (a 400 or 500 error code). The format of the error is a JSON object with the following fields:

  • Error (JSON key name “error”): The name of the error.
  • Cause (JSON key name “cause”): A string describing the source of the error.

Note: This PR is currently based on the branch corresponding to ucbrise#89 which has not been rebased. As a result, the diff is much larger than it should be. @dcrankshaw Rebasing ucbrise#89 should make this easier to review.

Corey-Zumar and others added 22 commits April 1, 2017 17:19
* Add Java container - working

* Remove unused class

* Performance improvements, string parsing

* Serialize string outputs as ascii bytes

* Add public access to underlying datavector data - vectors are useless without this

* Create maven project

* Remove skeleton apptest

* Make test easier to run

* fixed some bugs in java container

* fixed byte order error and issue where last input of message was dropped

* removed some debug print statements

* Fixed package naming and imports

* Remove unnecessary method, commented code

* Throw exceptions where necessary

* More throwing

* streaming iterator approach

* Remove unused import

* Send input metadata and serialized input sizes in rpc message

* Performance optimizations

* Remove unused toBytes() method

* remove unnecessary parameterization

* remove another tobytes() call

* Performance improvements - strings

* Resvert rapidjson version change

* Change port based on rpc bench rebase

* Bug fixes, run container class

* Remove com from package name

* Remove unnecessary whitespace

* whitespace
* Fix input serialization tests

* Format code
…g containers (ucbrise#102)

* Allows for registering external models without deploying containers

* Removed extra space

* Formatting now PEP8 compliant
@Corey-Zumar
Copy link
Collaborator Author

Wrong repository. Closing.

@Corey-Zumar Corey-Zumar closed this Apr 9, 2017
dcrankshaw added a commit that referenced this pull request May 10, 2017
# This is the 1st commit message:
started work on spark container

# This is the commit message #2:

rearranged files in maven packages

# This is the commit message #3:

training example works

# This is the commit message #4:

Copies jar to known location

# This is the commit message #5:

loading container class from jar not working yet

# This is the commit message #6:

got jar loading working
dcrankshaw added a commit that referenced this pull request May 17, 2017
# This is the 1st commit message:
started work on spark container

# This is the commit message #2:

rearranged files in maven packages

# This is the commit message #3:

training example works

# This is the commit message #4:

Copies jar to known location

# This is the commit message #5:

loading container class from jar not working yet

# This is the commit message #6:

got jar loading working
dcrankshaw added a commit that referenced this pull request May 17, 2017
# This is the 1st commit message:
started work on spark container

# This is the commit message #2:

rearranged files in maven packages

# This is the commit message #3:

training example works

# This is the commit message #4:

Copies jar to known location

# This is the commit message #5:

loading container class from jar not working yet

# This is the commit message #6:

got jar loading working
dcrankshaw added a commit that referenced this pull request May 18, 2017
…o repl support (ucbrise#133)

* # This is a combination of 6 commits.
# This is the 1st commit message:
started work on spark container

# This is the commit message #2:

rearranged files in maven packages

# This is the commit message #3:

training example works

# This is the commit message #4:

Copies jar to known location

# This is the commit message #5:

loading container class from jar not working yet

# This is the commit message #6:

got jar loading working

* initial work on incorporating REPL classes.

some cleanup and re-org. untested

basic example working

loading classes defined in REPL still doesn't work

started java reorg

Reorganized code. Everything compiles

Finished implementation. Now need docker container and lots of debugging.

start work on docker container

fixed bug in docker file

Fixed some bugs

Clipper local deploy seems to be working

Fixed some bugs

Deploy is working but there's something wrong with the container

Remote deploy is working!

Spark scala deploy is working both locally and remotely

Formatting

started to add tests

* mostly done with rebase

* rebase complete with existing tests passing

* Format code

* Fix typo

* added unit tests

* addressed review comments

* add some notes on how to run Spark example

* fixed typo in comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants