T
- model-typepublic interface CreateModelForPool<T extends InferenceModel>
Modifier and Type | Method and Description |
---|---|
Optional<ConcurrentModel<T>> |
create(boolean useGPU)
Creates a model.
|
Optional<ConcurrentModel<T>> create(boolean useGPU) throws CreateModelFailedException
useGPU
- whether to use a GPU if possible (if not possible, revert to CPU).CreateModelFailedException
- if something unexpected happened. If a GPU is unavailable,
prefer to return Optional.empty()
.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.