bug fixes

This commit is contained in:
Rebecca McFadden 2019-07-19 08:56:18 -07:00
parent fcd1e4bce1
commit 1d425a1931
4 changed files with 6 additions and 5 deletions

View File

@ -17,4 +17,4 @@ while getopts "m:n:i:d:s:p:u:r:w:t:b:" option;
esac
done
az login --service-principal --username ${SERVICE_PRINCIPAL_ID} --password ${SERVICE_PRINCIPAL_PASSWORD} -t $TENANT_ID
az ml model deploy -n $MODEL_NAME -m ${MODEL}:1 --ic $INFERENCE_CONFIG --pi ${BASE_PATH}/model/myprofileresult.json --dc $DEPLOYMENTCONFIG -w $WORKSPACE -g $RESOURCE_GROUP --overwrite -v
az ml model deploy -n $MODEL_NAME -m ${MODEL}:26 --ic $INFERENCE_CONFIG --pi ${BASE_PATH}/myprofileresult.json --dc $DEPLOYMENTCONFIG -w $WORKSPACE -g $RESOURCE_GROUP --overwrite -v

View File

@ -41,7 +41,7 @@ def run(raw_data):
inference_time = datetime.timedelta(seconds=current_time - prev_time)
payload = {
'time': inference_time.total_seconds(),
'prediction': 'burrito' if o < 0.5 else 'tacos',
'prediction': 'burrito' if o > 0.5 else 'tacos',
'scores': str(o)
}

View File

@ -16,5 +16,6 @@ while getopts "m:n:i:d:s:p:u:r:w:t:b:" option;
esac
done
az login --service-principal --username ${SERVICE_PRINCIPAL_ID} --password ${SERVICE_PRINCIPAL_PASSWORD} -t $TENANT_ID
az ml model profile -n $PROFILE_NAME -m ${MODEL}:1 --ic $INFERENCE_CONFIG -d $DATA -t myprofileresult.json -w $WORKSPACE -g $RESOURCE_GROUP
mv myprofileresult.json ${BASE_PATH}/model/myprofileresult.json
az ml model profile -n $PROFILE_NAME -m ${MODEL}:26 --ic $INFERENCE_CONFIG -d $DATA -t myprofileresult.json -w $WORKSPACE -g $RESOURCE_GROUP
mv myprofileresult.json ${BASE_PATH}/myprofileresult.json
echo ${BASE_PATH}

View File

@ -41,7 +41,7 @@ def run(raw_data):
inference_time = datetime.timedelta(seconds=current_time - prev_time)
payload = {
'time': inference_time.total_seconds(),
'prediction': 'burrito' if o < 0.5 else 'tacos',
'prediction': 'burrito' if o > 0.5 else 'tacos',
'scores': str(o)
}