Package: antinex-client
AntiNex Python ClientPython API Client for training deep neural networks with the REST API runninghttps://github.com/jay-johnson/train-ai-with-django-swagger-jwtInstallpip install antinex-clientAntiNex Stack StatusAntiNex client is part of the AntiNex stack:ComponentBuildDocs LinkDocs BuildREST APIDocsCore WorkerDocsNetwork PipelineDocsAI UtilsDocsClientDocsRun PredictionsThese examples use the default userrootwith password123321. It is advised to change this to your own user in the future.Train a Deep Neural Network with a JSON List of Recordsai -u root -p 123321 -f examples/predict-rows-scaler-django-simple.jsonTrain a Deep Neural Network to Predict Attacks with the AntiNex DatasetsPlease make sure the datasets are available to the REST API, Celery worker, and AntiNex Core worker. The datasets are already included in the docker containerai-coreprovided in the defaultcompose.ymlfile:https://github.com/jay-johnson/train-ai-with-django-swagger-jwt/blob/51f731860daf134ea2bd3b68468927c614c83ee5/compose.yml#L53-L104If you’re running outside docker make sure to clone the repo with:git clone https://github.com/jay-johnson/antinex-datasets.git /opt/antinex/antinex-datasetsTrain the Django Defensive Deep Neural NetworkPlease wait as this will take a few minutes to return and convert the predictions to a pandas DataFrame.ai -u root -p 123321 -f examples/scaler-full-django-antinex-simple.json

...

[30200 rows x 72 columns]Using Pre-trained Neural Networks to make PredictionsTheAntiNex Coremanages pre-trained deep neural networks in memory. These can be used with the REST API by adding the"publish_to_core": trueto a request while running with theREST API compose.ymldocker containers running.Run:ai -u root -p 123321 -f examples/publish-to-core-scaler-full-django.jsonHere is the diff between requests that will run using a pre-trained model and one that will train a new neural network:antinex-client$ diff examples/publish-to-core-scaler-full-django.json examples/scaler-full-django-antinex-simple.json
5d4
<     "publish_to_core": true,
antinex-client$Prepare a Datasetai_prepare_dataset.py -u root -p 123321 -f examples/prepare-new-dataset.jsonGet Job Record for a Deep Neural NetworkGet a user’s MLJob record by setting:-i<MLJob.id>This include the model json or model description for the Keras DNN.ai_get_job.py -u root -p 123321 -i 4Get Predictions Results for a Deep Neural NetworkGet a user’s MLJobResult record by setting:-i<MLJobResult.id>This includes predictions from the training or prediction job.ai_get_results.py -u root -p 123321 -i 4Get a Prepared DatasetGet a user’s MLPrepare record by setting:-i<MLPrepare.id>ai_get_prepared_dataset.py -u root -p 123321 -i 15Using a Client Built from Environment VariablesThis is how theNetwork Pipelinestreams data to theAntiNex Coreto make predictions with pre-trained models.Export the example environment file:source examples/example-prediction.envRun the client prediction stream scriptai_env_predict.py -f examples/predict-rows-scaler-full-django.jsonDevelopmentvirtualenv -p python3 ~/.venvs/antinexclient && source ~/.venvs/antinexclient/bin/activate && pip install -e .TestingRun allpython setup.py testLintingflake8 .pycodestyle .LicenseApache 2.0 - Please refer to theLICENSEfor more details