linkedin / dagli

Framework for defining machine learning models, including feature generation and transformations, as directed acyclic graphs (DAGs).
BSD 2-Clause "Simplified" License
354 stars 40 forks source link

Execution failed for task ':examples:fasttext-and-avro:FastTextExample.main()'. #2

Closed afiqmuzaffar closed 3 years ago

afiqmuzaffar commented 3 years ago

Task :examples:fasttext-and-avro:FastTextExample.main() FAILED SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Exception in thread "main" java.lang.IllegalArgumentException: capacity < 0: (-4698104 < 0) at java.base/java.nio.Buffer.createCapacityException(Buffer.java:251) at java.base/java.nio.ByteBuffer.allocate(ByteBuffer.java:340) at org.apache.avro.io.BinaryDecoder.readBytes(BinaryDecoder.java:288) at org.apache.avro.file.DataFileStream.initialize(DataFileStream.java:112) at org.apache.avro.file.DataFileReader.(DataFileReader.java:97) at org.apache.avro.file.DataFileReader.(DataFileReader.java:89) at com.linkedin.dagli.objectio.avro.AvroReader.lambda$size64$2(AvroReader.java:98) at java.base/java.util.stream.ReferencePipeline$5$1.accept(ReferencePipeline.java:229) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1494) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.LongPipeline.reduce(LongPipeline.java:452) at java.base/java.util.stream.LongPipeline.sum(LongPipeline.java:410) at com.linkedin.dagli.objectio.avro.AvroReader.size64(AvroReader.java:116) at com.linkedin.dagli.objectio.avro.AvroReader.size64(AvroReader.java:77) at com.linkedin.dagli.objectio.SampleReader.size64(SampleReader.java:39) at com.linkedin.dagli.dag.MultithreadedDAGExecutor.executeUnsafe(MultithreadedDAGExecutor.java:1509) at com.linkedin.dagli.dag.MultithreadedDAGExecutor.prepareUnsafeImpl(MultithreadedDAGExecutor.java:1497) at com.linkedin.dagli.dag.LocalDAGExecutor.prepareUnsafeImpl(LocalDAGExecutor.java:71) at com.linkedin.dagli.dag.AbstractDAGExecutor.prepareUnsafe(AbstractDAGExecutor.java:99) at com.linkedin.dagli.dag.DAG1x1.prepare(DAG1x1.java:253) at com.linkedin.dagli.examples.fasttextandavro.FastTextExample.main(FastTextExample.java:89)

Execution failed for task ':examples:fasttext-and-avro:FastTextExample.main()'.

Process 'command 'C:/Program Files/Java/jdk-9.0.1/bin/java.exe'' finished with non-zero exit value 1

jeffpasternack commented 3 years ago

Thanks for reporting this! The root cause was that the Avro data file had been generated with a now out-of-date schema. I've regenerated the Avro file, pushed the change, and verified the example runs as expected.