Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createAndTrainProcedure(config, name)
{
var start = new Date();
var createOutput = mldb.put("/v1/procedures/" + name, config);
assertSucceeded("procedure " + name + " creation", createOutput);
// Run the training
var trainingOutput = mldb.put("/v1/procedures/" + name + "/runs/1", {});
assertSucceeded("procedure " + name + " training", trainingOutput);
var end = new Date();
plugin.log("procedure " + name + " took " + (end - start) / 1000 + " seconds");
}
function createAndRunProcedure(config, name)
{
var start = new Date();
var createOutput = mldb.put("/v1/procedures/" + name, config);
assertSucceeded("procedure " + name + " creation", createOutput);
// Run the training
var trainingOutput = mldb.put("/v1/procedures/" + name + "/runs/1", {});
assertSucceeded("procedure " + name + " training", trainingOutput);
var end = new Date();
plugin.log("procedure " + name + " took " + (end - start) / 1000 + " seconds");
}
function createAndTrainProcedure(config, name)
{
var createOutput = mldb.put("/v1/procedures/" + name, config);
assertSucceeded("procedure " + name + " creation", createOutput);
// Run the training
var trainingOutput = mldb.put("/v1/procedures/" + name + "/runs/1", {});
assertSucceeded("procedure " + name + " training", trainingOutput);
}
function createAndRunProcedure(config, name)
{
var start = new Date();
var createOutput = mldb.put("/v1/procedures/" + name, config);
assertSucceeded("procedure " + name + " creation", createOutput);
// Run the training
var trainingOutput = mldb.put("/v1/procedures/" + name + "/runs/1", {});
assertSucceeded("procedure " + name + " training", trainingOutput);
var end = new Date();
plugin.log("procedure " + name + " took " + (end - start) / 1000 + " seconds");
}