I am stuck with one engine and multiple algorithms and need help further.
I have one engine and 2 algorithms, let's call AL1 and AL2. In src/main/scala having 2 algorithm scala files, name AL1Algorithm.scala and AL2Algorithm.scala each algorithm have its own param and model (AL1AlgorithmParams and AL1Model for AL1 and AL2AlgorithmParams and AL2Model for AL2). Therefore there are 2 train functions and 2 predict functions.
I can train 2 algorithms by calling pio train. When I call send_query to test, the program always return the result of the algorithm I put on the top of engine.json file
For instance, if I put AL1Algorithm on top, send_query will run AL1Algorithm
"algorithms": [
{
"name": "AL1Algorithm",
"params": {
"n": 100
}
},
{
"name": "AL2Algorithm",
"params": {
"n": 100
}
}
if I put AL2Algorithm on top, send_query will run AL2Algorithm'
"algorithms": [
{
"name": "AL2Algorithm",
"params": {
"n": 100
}
},
{
"name": "AL1Algorithm",
"params": {
"n": 100
}
}
My question is, can I call 2 algorithms for one send_query, how to distinguish which algorithm should be called in send_query instead of engine.json. There is something weird here, I think there are problems with my configuration. Will Serving.scala produce results of 2 algorithms at the same time. Can I split the results of each algorithm in serving.
Thank you very much