Source code for api.views.runmanager_auto_stat

import json
from rest_framework.response import Response
from rest_framework.views import APIView
from master.automl.automl import AutoMlCommon
import coreapi

[docs]class RunManagerAutoStat(APIView): coreapi_fields = ( coreapi.Field( name='version', required=True, type='string', ), coreapi.Field( name='batch', required=True, type='string', ), )
[docs] def get(self, request, nnid): """ Manage AutoML define information include (id, desc and etc ) \n Structure : AutoML - NetID - NetVer(Auto Generated by GA) - NetBatch (auto generated on every batch) \n (1) Define AutoML Graph definition \n (2) Select Type of Data \n (3) Select Type of Anal algorithm \n (4) Select range of hyper parameters \n (5) Run - AutoML \n (6) Check result of each generation with UI/UX (<- for this step) \n (7) Select Best model you want use and activate it \n --- # Class Name : RunManagerAutoStat # Description: Get Result of Train for each population """ try: aml = AutoMlCommon(nnid) stat_info = aml.get_stat_obj(nnid) return_data = stat_info return Response(json.dumps(return_data)) except Exception as e: return_data = {"status": "404", "result": str(e)} return Response(json.dumps(return_data))
[docs] def put(self, request, nnid): """ Manage AutoML define information include (id, desc and etc ) \n Structure : AutoML - NetID - NetVer(Auto Generated by GA) - NetBatch (auto generated on every batch) \n (1) Define AutoML Graph definition \n (2) Select Type of Data \n (3) Select Type of Anal algorithm \n (4) Select range of hyper parameters \n (5) Run - AutoML \n (6) Check result of each generation with UI/UX (<- for this step) \n (7) Select Best model you want use and activate it \n --- # Class Name : RunManagerAutoStat # Description: Set flags on each population """ try: return_data = "" return Response(json.dumps(return_data)) except Exception as e: return_data = {"status": "404", "result": str(e)} return Response(json.dumps(return_data))
[docs] def delete(self, request, nnid): """ Manage AutoML define information include (id, desc and etc ) \n Structure : AutoML - NetID - NetVer(Auto Generated by GA) - NetBatch (auto generated on every batch) \n (1) Define AutoML Graph definition \n (2) Select Type of Data \n (3) Select Type of Anal algorithm \n (4) Select range of hyper parameters \n (5) Run - AutoML \n (6) Check result of each generation with UI/UX (<- for this step) \n (7) Select Best model you want use and activate it \n --- # Class Name : RunManagerAutoStat # Description: Delete selected set of populations """ try: return_data = "" return Response(json.dumps(return_data)) except Exception as e: return_data = {"status": "404", "result": str(e)} return Response(json.dumps(return_data))