in amzn-smt-prediction/scripts/generate_predictions.py [0:0]
def do_solver_configuration(theory, endpoint_fmf, on_features):
# Check that the config file includes a reference to a SageMaker endpoint for the Solver Configuration Model
if endpoint_fmf == None:
missing_endpoint_error(theory, "endpoint_fmf")
exit(1)
# Already generated the features for this model (the online features from the Runtime Prediction Model above)
# So we can skip right to calling the predictor
##### GENERATE INFERENCE #####
# Create a Predictor object which references the endpoint in AWS SageMaker
predictor = Predictor(endpoint_fmf, serializer=CSVSerializer())
# Call the endpoint to get a prediction for our example
prediction = get_prediction(predictor, on_features) # This model only uses the online features
confidence = round(prediction * 100, 2)
if v == 'Full' or v == 'Pretty':
if confidence <= 50:
print(start_green + "But, the Solver Configuration Model predicted -- with " + str(100 - confidence) + "% confidence -- that CVC4 will find a solution faster with --strings-fmf DISABLED." + end_green)
else:
print(start_green + "Additionally, the Solver Configuration Model predicted -- with " + str(confidence) + "% confidence -- that CVC4 will find a solution fastest with --strings-fmf ENABLED." + end_green)
elif v == 'Vector':
print(prediction)