Tested API Untest API Building API Tested Method Extendable Method Scheduled
MYSQL
python
db
, images
, log
, models
, tmp
folersecret.cfg
which is the config of the system
python3 ./src/apps.py
Two ways to enable debug mode (auto clone, auto restart)
python3 ./src/apps.py --debug
self.maintaining
to True
in src/params.py
When requesting a service, the request should contain a jwt token token
to validate the request source.
Contact DevOps for the audience in jwt.
The validator is tokenValidator
in src/utils.py
src/params.py
from params import params
to importparam=params()
param.var
src/controller/getConfig.py
Description: Get supported project of one dataType
Usage: GET http://host/sys/dataproject
Description: Get supported extension of one dataType
Usage: GET http://host/sys/dataextension
with param
and get response
src/service/dataService
File location: src/service/dataService/controller/upload.py
Description: This py is a upload API. When uploading a file, the service will check the file type and project type. Then generate a file UID. After that, the service will check the file content with checkers in src/resources/dataService/fileChecker.py
.
Usage: POST http://host/data/upload
with a form
and get a response
Acceptable file types and their rules:
csv
with column name and their values. The values should be numerical data (classifiable text will be supported in v2.0). For example:
tsv
with column name. For project with label, there should be at least one column which contains the numerical value. For example:
or
zip
file. There should be a (only one) csv
file in the zip directly, not in a folder. For project with label, here should be at least one column that contains the numerical value. Other columns are the image file path (related path in zip). For example:
and the csv is
File location: src/service/dataService/controller/download.py
Description: Download file
Usage: GET http://host/data/download
with a form
and get a binary response
File location: src/service/dataService/controller/delete.py
Description: Delete file
Usage: POST http://host/data/delete
with a form
get a json
File location: src/service/dataService/controller/getColumn.py
Description: Get column names and types
Usage: POST http://host/data/getcol
with a form
get a json
File location: src/service/dataService/controller/getFileStatus.py
Description: Get file (batch) status
Usage: POST http://host/data/getstatus
with a form
get a json
0 for not in-use, 1 for in-use
File location: src/service/dataService/utils.py
Description: Generate unique file id
Usage:
File location: src/service/dataService/utils.py
Description: Validate file content
Usage:
File location: src/service/dataService/utils.py
Description: Get column names and type
Usage:
This is how coltype
looks like:
File location: src/service/dataService/utils.py
Description: Get column names and type
Usage:
Data is a dataframe.
src/resources/visualizationService
bokeh
to show data and image. If the data is not supported by bokeh, it will return the image result of matplotlib
and shown by bokeh.bokeh
with js
, please refer to section 2 of this article.File location: src/service/visualizeService/controller/dataviz.py
Description: get data visualize algorithm
Usage: GET http://host/viz/data/getalgo
get a json
File location: src/service/visualizeService/controller/dataViz.py
Description: Visualizing data
Usage: POST http://host/viz/data/do
with param
and get a response
File location: src/service/visualizeService/controller/getImg.py
Description: Get binary img
Usage: GET http://host/viz/getimg
with param
src/service/visualizeService/core/dataViz.py
src/service/analuticService/core/preprocess/missingFiltering.py
filtCols
get a filted data
Args:
get a 2D array of filted data
getRetainIndex
get which row to be retained
Args:
get a 1D np array of retain or not
File location: src/service/analuticService/core/preprocess/normalize.py
Discription: Normalize the column
Usage:
Call imeplemented algo class, do
to normalize
Args:
get a 1D array of normalized data
File location: src/service/analuticService/core/preprocess/outlierFiltering.py
Discription: Filt outlier
Usage:
Call imeplemented algo class, getRetainIndex
get which row to be retained
Args:
get a 1D np array of retain or not
File location: src/service/analuticService/core/preprocess/stringCleaning.py
Discription: Clean string
Usage:
Call imeplemented algo class, do
to get a clean string
Args:
get a 1D np array of retain or not
File location: src/service/analuticService/core/correlation.py
Discription: Clean string
Usage:
Call imeplemented algo class, do
to get a clean string
Args:
get a correlation dataframe and its bokeh div and script
File location: src/service/analyticService/controller/preprocess.py
Description: get preprocess algorithm list
Usage: GET http://host/preprocess/getalgo
get a json
File location: src/service/analyticService/controller/preprocess.py
Description: preprocess a file and save it to another file
Usage: POST http://host/preprocess/do
with param
and get a response
File location: src/service/analyticService/controller/preprocess.py
Description: Preview the result of preprocessed numerical column (classifiable text will be supported in v2.0)
Usage: POST http://host/preprocess/preview
with param
and get a response
src/service/analyticService/controller/preprocess.py
GET http://host/preprocess/get/param
with form
and get a response
File location: src/service/analyticService/controller/correlation.py
Description: get data correlation algorithm
Usage: GET http://host/correlation/getalgo
get a json
File location: src/service/analyticService/controller/correlation.py
Description: get correlation of a data (ONLY FOR NUM PROJECT)
Usage: POST http://host/correlation/do
with param
and get a response
analyticBase
regressionBase
, classificationBase
, abnormalBase
, clusteringBase
are designed to adapt each kind of training purposeself.outputData
and self.result
. Save the string to self.txtRes
self.outputData
, self.result
, self.model
. The bokeh figures should be saved to self.vizRes
as
File location: src/service/analyticService/controller/analytic.py
Description: get analytic algorithm list
Usage: GET http://host/analytic/getalgo
with param
get a response
File location: src/service/analyticService/controller/analytic.py
Description: get parameter of an analytic algorithm
Usage: GET http://host/analytic/getparam
with param
get a response
src/service/analyticService/controller/analytic.py
POST http://host/analytic/train
with param (algoInfo in core)
and get a response
File location: src/service/analyticService/controller/analytic.py
Description: stop a model training
Usage: DELETE http://host/analytic/stop
with form
and get a response
File location: src/service/analyticService/controller/analytic.py
Description: get the preview of model
Usage: GET http://host/analytic/preview
with form
and get a response
File location: src/service/analyticService/controller/analytic.py
Description: perform tprediction on a model using another file
Usage: POST http://host/analytic/predict
with form
and get a response
File location: src/service/analyticService/controller/analytic.py
Description: perform test on a model using another file
Usage: POST http://host/analytic/test
with form
and get a response
File location: src/service/analyticService/controller/analytic.py
Description: delete model
Usage: POST http://host/analytic/delete
with form
and get a response
File location: src/service/analyticService/controller/analytic.py
Description: get the status of a model
Usage: GET http://host/analytic/get/status
with form
and get a response
src/service/analyticService/controller/analytic.py
GET http://host/analytic/get/param
with form
and get a response
File location: src/service/analyticService/controller/analytic.py
Description: get the fail reason of a model
Usage: GET http://host/analytic/get/fail
with form
and get a response