use of com.oracle.labs.mlrg.olcut.config.ConfigurationManager in project tribuo by oracle.
the class TrainTest method main.
/**
* Runs a TrainTest CLI.
* @param args the command line arguments
* @throws IOException if there is any error reading the examples.
*/
public static void main(String[] args) throws IOException {
TrainTestOptions o = new TrainTestOptions();
try (ConfigurationManager cm = new ConfigurationManager(args, o)) {
Trainer<Label> trainer = o.mnbOptions.getTrainer();
trainer = o.ensembleOptions.wrapTrainer(trainer);
TrainTestHelper.run(cm, o.general, trainer);
} catch (UsageException e) {
logger.info(e.getMessage());
}
}
use of com.oracle.labs.mlrg.olcut.config.ConfigurationManager in project tribuo by oracle.
the class TrainTest method main.
/**
* Runs a TrainTest CLI.
* @param args the command line arguments
* @throws IOException if there is any error reading the examples.
*/
public static void main(String[] args) throws IOException {
TrainTestOptions o = new TrainTestOptions();
try (ConfigurationManager cm = new ConfigurationManager(args, o)) {
Trainer<Label> trainer = o.trainerOptions.getTrainer();
trainer = o.ensembleOptions.wrapTrainer(trainer);
TrainTestHelper.run(cm, o.general, trainer);
} catch (UsageException e) {
logger.info(e.getMessage());
}
}
use of com.oracle.labs.mlrg.olcut.config.ConfigurationManager in project tribuo by oracle.
the class TestFMClassification method fmRoundTripTest.
@Test
public void fmRoundTripTest() {
Pair<Dataset<Label>, Dataset<Label>> p = LabelledDataGenerator.denseTrainTest();
Model<Label> model = testFMClassification(p);
ConfigurationManager cm = new ConfigurationManager();
List<ConfigurationData> provConfig = ProvenanceUtil.extractConfiguration(model.getProvenance());
cm.addConfiguration(provConfig);
FMClassificationTrainer trainer = (FMClassificationTrainer) cm.lookup("fmclassificationtrainer-0");
Model<Label> newModel = trainer.train(p.getA());
assertNotNull(newModel);
}
use of com.oracle.labs.mlrg.olcut.config.ConfigurationManager in project tribuo by oracle.
the class TrainTest method main.
public static void main(String[] args) throws IOException {
TrainTestOptions o = new TrainTestOptions();
try (ConfigurationManager cm = new ConfigurationManager(args, o)) {
Trainer<Label> trainer = o.trainerOptions.getTrainer();
trainer = o.ensembleOptions.wrapTrainer(trainer);
TrainTestHelper.run(cm, o.general, trainer);
} catch (UsageException e) {
logger.info(e.getMessage());
}
}
use of com.oracle.labs.mlrg.olcut.config.ConfigurationManager in project tribuo by oracle.
the class TrainTest method main.
/**
* Runs a TrainTest CLI.
* @param args the command line arguments
* @throws IOException if there is any error reading the examples.
*/
public static void main(String[] args) throws IOException {
TrainTestOptions o = new TrainTestOptions();
try (ConfigurationManager cm = new ConfigurationManager(args, o)) {
Trainer<Label> trainer = o.trainerOptions.getTrainer();
TrainTestHelper.run(cm, o.general, trainer);
} catch (UsageException e) {
logger.info(e.getMessage());
}
}
Aggregations