Once a machine learning request has been processed and a reply message is available, we want to consume it right away. We will know of the completion because the performing microservice will be responsible for sending a response/completion message so that others may know of the status.
Here is our ProcessMLMessage function that will handle the incoming message. Depending upon the message type, it will display the appropriate information:
bool ProcessMLMessage([NotNull] MLMessage msg, [NotNull] MessageReceivedInfo mri)
{
Console.WriteLine("Received Machine Learning Message");
RILogManager.Default?.SendInformation("Received Machine Learning Message");
switch ((MLMessageType)msg.MessageType)
{
- Add a LayerType type of layer to the ConvNet:
case MLMessageType.AddLayer:
RILogManager.Default?.SendInformation("Adding a layer command...