'StepOut' : {'Value': [3,3], 'Minimum':[2,2]},
	'Select' : {'Name': 'Selection', 'Values': ['Item 0', 'Item 1', 'Item 2', 'Item 3'], 'Selection': 2},
	'Par_0': {'Name': 'Parameter 0', 'Value': 0},
	'Par_1': {'Name': 'Parameter 1', 'Value': 1},
	'Par_2': {'Name': 'Parameter 2', 'Value': 2},
	'Par_3': {'Name': 'Parameter 3', 'Value': 3},
	'Par_4': {'Name': 'Parameter 4', 'Value': 4},
	'Par_5': {'Name': 'Parameter 5', 'Value': 5},
	'Parallel': False,
	'Help': 'https://github.com/waynegm'
}
#
# Define the compute function
#
def doCompute():
	while True:
		xa.doInput()
		xa.doOutput()
	


#
# Assign the compute function to the attribute
#
xa.doCompute = doCompute
#
# Do it
#
xa.run(sys.argv[1:])
  
Esempio n. 2
0
    predictor = TensorFlowPredictor(endpoint_name)

    myfile = open(
        r"C:\Users\Polash-Dell\coder_guy\PycharmProjects\aws_dl\1_aws_dl.txt",
        'w+')
    myfile.write("Norm Amp : Porosity")
    while True:
        xa.doInput()
        x_test_list = xa.Input['Input'][0, 0, :].tolist()
        x_test = pd.DataFrame(x_test_list)
        stats = x_test.describe()
        stats = stats.transpose()
        x_test = (x_test - stats['mean']) / stats['std']
        for a in x_test.values:
            myfile.write(str(a) + ": ")
            try:
                test_predictions = predictor.predict(a)
                myfile.write(str(test_predictions['predictions'][0][0]) + "\n")
            except:
                e = sys.exc_info()[0]
                myfile.write("\nError:" + str(e))
        xa.Output['Output'] = xa.Input['Input']
        xa.doOutput()
    myfile.close()


xa.doCompute = doCompute

xa.run(sys.argv[1:])