MachineLearningRun.js 1.86 KB
/**
 * Project      : AMDA-NG
 * Name         : MachineLearningRun.js
 * Description  : MachineLearningRun Business Object Definition
 * @class amdaModel.MachineLearningRun
 * @extends amdaModel.AmdaObject 
 * 
 * @author benjamin
 * @version $Id: MachineLearningRun.js 2068 2022-01-19 11:27:38Z benjamin $
 ******************************************************************************
 *    FT Id     :   Date   : Name - Description
 ******************************************************************************
 *	:           :19/01/2022: benjamin – creation 
 */
 
 		
Ext.define('amdaModel.MachineLearningRun', {
	extend: 'amdaModel.AmdaObject',
    
    	fields : [
		{ name: 'resultId', type: 'string'},
		{ name: 'folderId', type: 'string'},
		{name: 'moduleId', type: 'string'},
		{name: 'mode', type: 'string'},
		{name: 'start', type : 'date', defaultValue : new Date()},
                {name: 'stop', type : 'date', defaultValue : new Date()},
		{name: 'output', type: 'auto', defaultValue : null},
		{name: 'args', type: 'auto', defaultValue : null},
		{name: 'hyperparameters', type: 'auto', defaultValue : null},
                {name: 'request_obj', type: 'auto', defaultValue : null}
	],
	
	propertiesToCopy : 'id,name,moduleId,start,stop,request_obj',

	getJsonValues : function(){
        	var myValues  = new Object();
		myValues.nodeType = 'machinelearning';
		myValues.moduleId = this.get('moduleId');
        	myValues.mode = this.get('mode');
		myValues.startDate = this.get('start');
		myValues.stopDate  = this.get('stop');
		myValues.output = this.get('output');
		myValues.args = {}
		if (this.get('args')) {
			myValues.args = this.get('args');
		}
		myValues.hyperparameters = {};
		if (this.get('hyperparameters')) {
			myValues.hyperparameters = this.get('hyperparameters');
		}
		myValues.request_obj = this.get('request_obj');
        	return myValues;
	}
      
});