Skip to content

Commit

Permalink
[api] Fixes bug in Criteria (deepjavalibrary#1964)
Browse files Browse the repository at this point in the history
Fixes deepjavalibrary#1961

Change-Id: Ic3b1ca69ddbfffc030a9f301ca129d4ee7fedd2b
  • Loading branch information
frankfliu authored and patins1 committed Aug 26, 2022
1 parent 47b5bce commit 6beb6bd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api/src/main/java/ai/djl/repository/zoo/Criteria.java
Original file line number Diff line number Diff line change
Expand Up @@ -406,25 +406,30 @@ public static final class Builder<I, O> {
Block block;
String modelName;
Progress progress;
private Translator<I, O> translator;
Translator<I, O> translator;

Builder() {
application = Application.UNDEFINED;
}

@SuppressWarnings("unchecked")
private Builder(Class<I> inputClass, Class<O> outputClass, Builder<?, ?> parent) {
this.inputClass = inputClass;
this.outputClass = outputClass;
application = parent.application;
engine = parent.engine;
device = parent.device;
groupId = parent.groupId;
artifactId = parent.artifactId;
modelZoo = parent.modelZoo;
filters = parent.filters;
arguments = parent.arguments;
options = parent.options;
factory = parent.factory;
block = parent.block;
modelName = parent.modelName;
progress = parent.progress;
translator = (Translator<I, O>) parent.translator;
}

/**
Expand Down

0 comments on commit 6beb6bd

Please sign in to comment.