private static OnnxModelsConfig.Model.Builder toConfig(OnnxModel model) {
        OnnxModelsConfig.Model.Builder builder = new OnnxModelsConfig.Model.Builder();
        builder.dry_run_on_setup(true);
        builder.name(model.getName());
        builder.fileref(model.getFileReference());
        model.getInputMap().forEach((name, source) -> builder.input(new OnnxModelsConfig.Model.Input.Builder().name(name).source(source)));
        model.getOutputMap().forEach((name, as) -> builder.output(new OnnxModelsConfig.Model.Output.Builder().name(name).as(as)));
        if (model.getStatelessExecutionMode().isPresent())
            builder.stateless_execution_mode(model.getStatelessExecutionMode().get());
        if (model.getStatelessInterOpThreads().isPresent())
            builder.stateless_interop_threads(model.getStatelessInterOpThreads().get());
        if (model.getStatelessIntraOpThreads().isPresent())
            builder.stateless_intraop_threads(model.getStatelessIntraOpThreads().get());
        if (model.getGpuDevice().isPresent()) {
            builder.gpu_device(model.getGpuDevice().get().deviceNumber());
            builder.gpu_device_required(model.getGpuDevice().get().required());
        }
        return builder;
    }
ONNX models distributed as files.

@author bratseth
config-model/src/main/java/com/yahoo/schema/derived/FileDistributedOnnxModels.java