The Protocols and Structures for Inference project aims to develop a general purpose web API for machine learning. This starter kit is a Play 1-based application that implements version 2 of the PSI Specification. It may be used to create a new PSI service or to assist those wishing to implement completely new services.
This kit was extracted from the source for our demonstration service at http://poseidon.cecs.anu.edu.au. While every effort has been made to make the software robust, it is 'research' rather than 'production' code, so there are many places where it can be made more efficient and robust. It is distributed under an MIT Licence.
- A number of datasets from the UCI Machine Learning Repository that become relation resources n the service.
- Bindings for using Weka classifiers and clustering algorithms
- Bindings for using scikit learn (using a companion micro-service)
Requirements:
- Play Framework, version 1.2.7
- JUnit Contrib (only for testing, and specifically the Assumes extension)
- The companion sklearn-service (if using scikit learn)
The project also requires Weka 3.7 and the json-schema-validator, but these are captured in the depdencies.yml
file.
-
Run
play dependencies
in the application's directory to have Play resolve dependencies. This will download required libraries to thelib
directory and add amodules
directory.Remaining instructions assume the app is being run in DEV mode, which runs the service on port 9000.
-
Administration pages (which are outside the PSI specification) are secured using Play's secure module, with the username-password combination of "admin"-"admin". To change these:
- Run the application with
play run
and browse to http://localhost:9000/admin/chpass. - Enter a new pass phrase and a string of random characters (remember both) to generate a new hashed password suitable for storing in the application's configuration file.
- In
conf/application.yml
, changepsi.admin.name
to a new name of your choosing,psi.admin.password
to the hashed result generated above, andpsi.admin.salt
to the random string used. The changes will take effect when the service is restarted.
- Run the application with
-
Load dataset and learner models into the database. Start the service and navigate to http://localhost:9000/admin. The links for loading these models trigger the system to read JSON definition files in
private/datasets
andprivate/learners
. These operations may be performed again after adding new dataset or learner definitions; only new definitions will be loaded.
This document will be expanded to include more help soon. See the Play documentation for issues relating to the web framework.