Skip to content

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

Merged
merged 2 commits into from
Sep 13, 2023
Merged

Conversation

evan-cao-wb
Copy link
Contributor

No description provided.

@@ -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);
Copy link
Member

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?

Copy link
Contributor Author

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")]
Copy link
Member

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);
Copy link
Member

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

@Oceania2018 Oceania2018 merged commit f158f82 into SciSharp:master Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants