-
-
Notifications
You must be signed in to change notification settings - Fork 569
solve RoutingSpeeder path issue #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -24,9 +25,17 @@ public RoutingSpeederController(IServiceProvider service) | |||
public IActionResult TrainIntentClassifier(TrainingParams trainingParams) | |||
{ | |||
var intentClassifier = _service.GetRequiredService<IntentClassifier>(); | |||
intentClassifier.InitClassifer(trainingParams.Inference); | |||
// intentClassifier.InitClassifer(trainingParams.Inference); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we comment this for training?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The InitClassifer will call LoadWeights method. If we still want to re-train model when some weights exist, calling this method will load that weights first and then continue training.
intentClassifier.Train(trainingParams); | ||
return Ok(intentClassifier.Labels); | ||
} | ||
|
||
[HttpPost("/routing-speeder/classifier/inference")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this API for train or inference?
The function name doesn't match with endpoint.
{ | ||
_model.load_weights(weightsFile); | ||
_isModelReady = true; | ||
Console.WriteLine($"Successfully load the weights!"); | ||
} | ||
else | ||
{ | ||
var logInfo = inference ? "No available weights." : "Will implement model training process and write trained weights into local"; | ||
var logInfo = _inferenceMode ? "No available weights." : "Will implement model training process and write trained weights into local"; | ||
_isModelReady = false; | ||
Console.WriteLine(logInfo); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use _logger.info
instead of Console.WriteLine
No description provided.