use of com.spotify.zoltar.FeatureExtractFns.ExtractFn in project zoltar by spotify.
the class PredictorTest method empty.
@Test
public void empty() throws InterruptedException, ExecutionException, TimeoutException {
final Duration wait = Duration.ofSeconds(1);
final ExtractFn<Object, Object> extractFn = inputs -> Collections.emptyList();
final AsyncPredictFn<DummyModel, Object, Object, Object> predictFn = (model, vectors) -> CompletableFuture.completedFuture(Collections.emptyList());
final ModelLoader<DummyModel> loader = ModelLoader.lift(DummyModel::new);
DefaultPredictorBuilder.create(loader, extractFn, predictFn).predictor().predict().toCompletableFuture().get(wait.toMillis(), TimeUnit.MILLISECONDS);
}
Aggregations