0

我正在尝试使用在 h2​​o 无人驾驶 AI 中构建的两个模型的结果。其中一个是在 1.6.0 版本中构建的,另一个是在最新的 1.7.0 版本中构建的。当我尝试在我的 java 应用程序中加载这两个模型的 pipeline.mojo(其中一个是 pb 格式,另一个是 toml 格式)时,第一个模型文件读取良好,因为它在读取时抛出 IllegalArgumentException同一个 JVM 实例中的第二个模型文件。

正在使用的 mojo2-runtime jar 来自 1.7.0 版本。

String toml_fileName = "/usr/toml/pipeline.mojo";
MojoPipeline toml_model = MojoPipeline.loadFrom(toml_fileName);

String pb_fileName = "/usr/pb/pipeline.mojo";
MojoPipeline pb_model = MojoPipeline.loadFrom(pb_fileName);

我在尝试加载第二个模型文件时遇到以下异常,在我的例子中是 pb_model 。

有人可以帮我找出问题所在吗?

java.lang.IllegalArgumentException: wrong number of arguments
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at ai.h2o.mojos.runtime.b.aj.a(SourceFile:62)
    at ai.h2o.mojos.runtime.b.J.a(SourceFile:35)
    at ai.h2o.mojos.runtime.readers.MojoReader.read(SourceFile:133)
    at ai.h2o.mojos.runtime.readers.MojoTransformerReader.readExecPipeTransformer(SourceFile:311)
    at ai.h2o.mojos.runtime.readers.MojoTransformerReader.read(SourceFile:41)
    at ai.h2o.mojos.runtime.readers.MojoReader.read(SourceFile:121)
    at ai.h2o.mojos.runtime.MojoPipelineFactoryImpl.loadFrom(SourceFile:59)
    at ai.h2o.mojos.runtime.MojoPipelineFactoryImpl.loadFrom(SourceFile:22)
    at ai.h2o.mojos.runtime.MojoPipeline.loadFrom(SourceFile:41)
4

0 回答 0