Details

      Description

      Add an NeuralNetwork example to the example package.

      1. HAMA-804.patch
        115 kB
        Yexi Jiang

        Activity

        Hide
        Edward J. Yoon added a comment -

        Sorry, I made a bug.

        I've changed from this.testNeuralNetworkTraining(); to
        this.neuralNetworkTraining(); and, moved delete() calls to finally
        block.

        } finally

        { fs.delete(new Path(RESULT_PATH), true); fs.delete(new Path(MODEL_PATH), true); fs.delete(new Path(SEQTRAIN_DATA), true); }


        Best Regards, Edward J. Yoon
        @eddieyoon

        Show
        Edward J. Yoon added a comment - Sorry, I made a bug. I've changed from this.testNeuralNetworkTraining(); to this.neuralNetworkTraining(); and, moved delete() calls to finally block. } finally { fs.delete(new Path(RESULT_PATH), true); fs.delete(new Path(MODEL_PATH), true); fs.delete(new Path(SEQTRAIN_DATA), true); } – Best Regards, Edward J. Yoon @eddieyoon
        Hide
        Edward J. Yoon added a comment -

        Fixed.

        Show
        Edward J. Yoon added a comment - Fixed.
        Hide
        Edward J. Yoon added a comment -

        Here's my solution.

        Index: bin/hama
        ===================================================================
        --- bin/hama	(revision 1526329)
        +++ bin/hama	(working copy)
        @@ -117,6 +117,14 @@
           CLASSPATH=${CLASSPATH}:$HAMA_HOME/graph/target/test-classes
         fi
         
        +# for developers, add ML classes to CLASSPATH
        +if [ -d "$HAMA_HOME/ml/target/classes" ]; then
        +  CLASSPATH=${CLASSPATH}:$HAMA_HOME/ml/target/classes
        +fi
        +if [ -d "$HAMA_HOME/ml/target/test-classes/classes" ]; then
        +  CLASSPATH=${CLASSPATH}:$HAMA_HOME/ml/target/test-classes
        +fi
        +
        
        Show
        Edward J. Yoon added a comment - Here's my solution. Index: bin/hama =================================================================== --- bin/hama (revision 1526329) +++ bin/hama (working copy) @@ -117,6 +117,14 @@ CLASSPATH=${CLASSPATH}:$HAMA_HOME/graph/target/test-classes fi +# for developers, add ML classes to CLASSPATH + if [ -d "$HAMA_HOME/ml/target/classes" ]; then + CLASSPATH=${CLASSPATH}:$HAMA_HOME/ml/target/classes +fi + if [ -d "$HAMA_HOME/ml/target/test-classes/classes" ]; then + CLASSPATH=${CLASSPATH}:$HAMA_HOME/ml/target/test-classes +fi +
        Hide
        Edward J. Yoon added a comment -

        I don't know why yet but there seems some bug.

        Show
        Edward J. Yoon added a comment - I don't know why yet but there seems some bug.
        Hide
        Yexi Jiang added a comment -

        Edward J. YoonIt is true that the classes defined in ml cannot be used?

        Show
        Yexi Jiang added a comment - Edward J. Yoon It is true that the classes defined in ml cannot be used?
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Hama-Nightly-for-Hadoop-1.x #1047 (See https://builds.apache.org/job/Hama-Nightly-for-Hadoop-1.x/1047/)
        HAMA-804: Fix rat check fail (edwardyoon: rev 1526167)

        • /hama/trunk/examples/src/test/java/org/apache/hama/examples/NeuralNetworkTest.java
        Show
        Hudson added a comment - SUCCESS: Integrated in Hama-Nightly-for-Hadoop-1.x #1047 (See https://builds.apache.org/job/Hama-Nightly-for-Hadoop-1.x/1047/ ) HAMA-804 : Fix rat check fail (edwardyoon: rev 1526167) /hama/trunk/examples/src/test/java/org/apache/hama/examples/NeuralNetworkTest.java
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Hama-Nightly-for-Hadoop-2.x #44 (See https://builds.apache.org/job/Hama-Nightly-for-Hadoop-2.x/44/)
        HAMA-804: Fix rat check fail (edwardyoon: rev 1526167)

        • /hama/trunk/examples/src/test/java/org/apache/hama/examples/NeuralNetworkTest.java
        Show
        Hudson added a comment - SUCCESS: Integrated in Hama-Nightly-for-Hadoop-2.x #44 (See https://builds.apache.org/job/Hama-Nightly-for-Hadoop-2.x/44/ ) HAMA-804 : Fix rat check fail (edwardyoon: rev 1526167) /hama/trunk/examples/src/test/java/org/apache/hama/examples/NeuralNetworkTest.java
        Hide
        Edward J. Yoon added a comment -

        I still get:

        edward@udanax:~/workspace/hama-trunk$ bin/hama jar examples/target/hama-examples-0.6.3-SNAPSHOT.jar
        java.lang.NoClassDefFoundError: org/apache/hama/ml/math/DoubleVector
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2521)
        at java.lang.Class.getMethod0(Class.java:2764)
        at java.lang.Class.getMethod(Class.java:1653)
        at org.apache.hama.util.ProgramDriver$ProgramDescription.<init>(ProgramDriver.java:56)
        at org.apache.hama.util.ProgramDriver.addClass(ProgramDriver.java:99)
        at org.apache.hama.examples.ExampleDriver.main(ExampleDriver.java:42)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hama.util.RunJar.main(RunJar.java:146)
        Caused by: java.lang.ClassNotFoundException: org.apache.hama.ml.math.DoubleVector
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 12 more

        Show
        Edward J. Yoon added a comment - I still get: edward@udanax:~/workspace/hama-trunk$ bin/hama jar examples/target/hama-examples-0.6.3-SNAPSHOT.jar java.lang.NoClassDefFoundError: org/apache/hama/ml/math/DoubleVector at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2521) at java.lang.Class.getMethod0(Class.java:2764) at java.lang.Class.getMethod(Class.java:1653) at org.apache.hama.util.ProgramDriver$ProgramDescription.<init>(ProgramDriver.java:56) at org.apache.hama.util.ProgramDriver.addClass(ProgramDriver.java:99) at org.apache.hama.examples.ExampleDriver.main(ExampleDriver.java:42) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.hama.util.RunJar.main(RunJar.java:146) Caused by: java.lang.ClassNotFoundException: org.apache.hama.ml.math.DoubleVector at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 12 more
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Hama-trunk #179 (See https://builds.apache.org/job/Hama-trunk/179/)
        HAMA-804: Fix rat check fail (edwardyoon: rev 1526167)

        • /hama/trunk/examples/src/test/java/org/apache/hama/examples/NeuralNetworkTest.java
        Show
        Hudson added a comment - SUCCESS: Integrated in Hama-trunk #179 (See https://builds.apache.org/job/Hama-trunk/179/ ) HAMA-804 : Fix rat check fail (edwardyoon: rev 1526167) /hama/trunk/examples/src/test/java/org/apache/hama/examples/NeuralNetworkTest.java
        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hama-Nightly-for-Hadoop-1.x #1046 (See https://builds.apache.org/job/Hama-Nightly-for-Hadoop-1.x/1046/)
        HAMA-804: Create NeuralNetwork Example. (yxjiang: rev 1525911)

        • /hama/trunk/CHANGES.txt
        • /hama/trunk/examples/src/main/java/org/apache/hama/examples/ExampleDriver.java
        • /hama/trunk/examples/src/main/java/org/apache/hama/examples/NeuralNetwork.java
        • /hama/trunk/examples/src/test/java/org/apache/hama/examples/NeuralNetworkTest.java
        • /hama/trunk/examples/src/test/resources/neuralnets_classification_label.txt
        • /hama/trunk/examples/src/test/resources/neuralnets_classification_test.txt
        • /hama/trunk/examples/src/test/resources/neuralnets_classification_training.txt
        Show
        Hudson added a comment - FAILURE: Integrated in Hama-Nightly-for-Hadoop-1.x #1046 (See https://builds.apache.org/job/Hama-Nightly-for-Hadoop-1.x/1046/ ) HAMA-804 : Create NeuralNetwork Example. (yxjiang: rev 1525911) /hama/trunk/CHANGES.txt /hama/trunk/examples/src/main/java/org/apache/hama/examples/ExampleDriver.java /hama/trunk/examples/src/main/java/org/apache/hama/examples/NeuralNetwork.java /hama/trunk/examples/src/test/java/org/apache/hama/examples/NeuralNetworkTest.java /hama/trunk/examples/src/test/resources/neuralnets_classification_label.txt /hama/trunk/examples/src/test/resources/neuralnets_classification_test.txt /hama/trunk/examples/src/test/resources/neuralnets_classification_training.txt
        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hama-Nightly-for-Hadoop-2.x #43 (See https://builds.apache.org/job/Hama-Nightly-for-Hadoop-2.x/43/)
        HAMA-804: Create NeuralNetwork Example. (yxjiang: rev 1525911)

        • /hama/trunk/CHANGES.txt
        • /hama/trunk/examples/src/main/java/org/apache/hama/examples/ExampleDriver.java
        • /hama/trunk/examples/src/main/java/org/apache/hama/examples/NeuralNetwork.java
        • /hama/trunk/examples/src/test/java/org/apache/hama/examples/NeuralNetworkTest.java
        • /hama/trunk/examples/src/test/resources/neuralnets_classification_label.txt
        • /hama/trunk/examples/src/test/resources/neuralnets_classification_test.txt
        • /hama/trunk/examples/src/test/resources/neuralnets_classification_training.txt
        Show
        Hudson added a comment - FAILURE: Integrated in Hama-Nightly-for-Hadoop-2.x #43 (See https://builds.apache.org/job/Hama-Nightly-for-Hadoop-2.x/43/ ) HAMA-804 : Create NeuralNetwork Example. (yxjiang: rev 1525911) /hama/trunk/CHANGES.txt /hama/trunk/examples/src/main/java/org/apache/hama/examples/ExampleDriver.java /hama/trunk/examples/src/main/java/org/apache/hama/examples/NeuralNetwork.java /hama/trunk/examples/src/test/java/org/apache/hama/examples/NeuralNetworkTest.java /hama/trunk/examples/src/test/resources/neuralnets_classification_label.txt /hama/trunk/examples/src/test/resources/neuralnets_classification_test.txt /hama/trunk/examples/src/test/resources/neuralnets_classification_training.txt
        Hide
        Yexi Jiang added a comment -

        Seems that the the test result shows no failure.

        Show
        Yexi Jiang added a comment - Seems that the the test result shows no failure.
        Hide
        Hudson added a comment -

        FAILURE: Integrated in Hama-trunk #178 (See https://builds.apache.org/job/Hama-trunk/178/)
        HAMA-804: Create NeuralNetwork Example. (yxjiang: rev 1525911)

        • /hama/trunk/CHANGES.txt
        • /hama/trunk/examples/src/main/java/org/apache/hama/examples/ExampleDriver.java
        • /hama/trunk/examples/src/main/java/org/apache/hama/examples/NeuralNetwork.java
        • /hama/trunk/examples/src/test/java/org/apache/hama/examples/NeuralNetworkTest.java
        • /hama/trunk/examples/src/test/resources/neuralnets_classification_label.txt
        • /hama/trunk/examples/src/test/resources/neuralnets_classification_test.txt
        • /hama/trunk/examples/src/test/resources/neuralnets_classification_training.txt
        Show
        Hudson added a comment - FAILURE: Integrated in Hama-trunk #178 (See https://builds.apache.org/job/Hama-trunk/178/ ) HAMA-804 : Create NeuralNetwork Example. (yxjiang: rev 1525911) /hama/trunk/CHANGES.txt /hama/trunk/examples/src/main/java/org/apache/hama/examples/ExampleDriver.java /hama/trunk/examples/src/main/java/org/apache/hama/examples/NeuralNetwork.java /hama/trunk/examples/src/test/java/org/apache/hama/examples/NeuralNetworkTest.java /hama/trunk/examples/src/test/resources/neuralnets_classification_label.txt /hama/trunk/examples/src/test/resources/neuralnets_classification_test.txt /hama/trunk/examples/src/test/resources/neuralnets_classification_training.txt

          People

          • Assignee:
            Yexi Jiang
            Reporter:
            Yexi Jiang
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development