You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Grant Ingersoll <gs...@apache.org> on 2008/08/01 23:14:45 UTC

Taste Examples

Hi,

(more or less a newbie to Taste :-)   )
I downloaded the MovieLens dataset per the Taste docs and am now  
trying to get it running.  I fixed one minor problem in step #2 in the  
docs (should be src/main/examples/....), but then I can't get ant  
build-grouplens-example to work either.  I see that it isn't in the  
main build file, but when I run ant with -f taste-build.xml I get all  
kinds of compile errors.  Anyone know what I need to do to fix it?

Also, what's the status of Taste on Hadoop?  Does it work on it now?   
Has anyone tried it out?

Thanks,
Grant

Re: Taste Examples

Posted by Sean Owen <sr...@gmail.com>.
I fixed this by just fixing the Hadoop import on one line.

We can include Axis. I just thought it was quite big and not sure how
often people use this part of the distro, so I made it optional and
put in a message to add it if you need to use it.

Yeah I am not opposed to moving examples even farther away from the
core source code. Here this example depends neatly on the target that
would build a server from your own code, rather than an example. Not a
big deal, just means an extra step or two in the example instructions
to put it all together.

On Sat, Aug 2, 2008 at 7:02 AM, Grant Ingersoll <gs...@apache.org> wrote:
> I got paste the compile errors with the patch below.  Now it's looking for
> the Axis jars.  Those are Apache right?  I think we could add them in,
> although if they are only needed for the examples, maybe we don't want them
> in the main lib dir.
>
> I think we may want to refactor our examples to be off from the core.  That
> is have:
>
> mahout/
>   core
>   examples
>
>
>
>

Re: Taste Examples

Posted by Grant Ingersoll <gs...@apache.org>.
I got paste the compile errors with the patch below.  Now it's looking  
for the Axis jars.  Those are Apache right?  I think we could add them  
in, although if they are only needed for the examples, maybe we don't  
want them in the main lib dir.

I think we may want to refactor our examples to be off from the core.   
That is have:

mahout/
    core
    examples






Index: taste-build.xml
===================================================================
--- taste-build.xml     (revision 681945)
+++ taste-build.xml     (working copy)
@@ -39,7 +39,23 @@
    <property name="name" value="${ant.project.name}"/>
    <property name="release-jar" value="${name}.jar"/>
    <property name="release-war" value="${name}.war"/>
+  <property name="dest" value="build"/>
+  <path id="compile.classpath">
+    <fileset dir="lib">
+      <include name="*.jar" />
+      <exclude name="junit*.jar"/>
+    </fileset>
+  </path>

+  <path id="examples.classpath">
+    <path refid="compile.classpath"/>
+    <pathelement location="${dest}/test-classes"/>
+    <pathelement location="${dest}/classes"/>
+    <pathelement location="${dest}/examples-test-classes"/>
+    <pathelement location="${dest}/examples"/>
+  </path>
+
+
    <target name="init">
      <tstamp/>
      <available file="${proguard.jar}"  
property="proguard.jar.present"/>
@@ -51,17 +67,13 @@
      <javac source="1.5"
             target="1.5"
             deprecation="true"
-           destdir="build"
+           destdir="build/classes"
             debug="true"
             optimize="true"
             srcdir="src/main/java">
        <compilerarg value="-Xlint:all,-serial,-unchecked"/>
        <classpath>
-        <pathelement location="${servlet.jar}"/>
-        <pathelement location="${dbcp.jar}"/>
-        <pathelement location="${pool.jar}"/>
-        <pathelement location="${hadoop.jar}"/>
-        <pathelement location="${slf4j-api.jar}"/>
+        <path refid="compile.classpath"/>
        </classpath>
        <include name="org/apache/mahout/cf/taste/**"/>
      </javac>
@@ -100,6 +112,7 @@
      <delete file="temp.jar"/>
    </target>

+
    <target depends="build" name="build-test" description="Builds test  
classes">
      <mkdir dir="build-test"/>
      <javac source="1.5"
@@ -166,6 +179,7 @@
             srcdir="src/main/examples">
        <compilerarg value="-Xlint:all,-serial"/>
        <classpath>
+        <path refid="examples.classpath"/>
          <pathelement location="${release-jar}"/>
        </classpath>
      </javac>




On Aug 2, 2008, at 6:52 AM, Grant Ingersoll wrote:

> FYI, still doesn't compile.  Gets stuck in the grouplens build on  
> the compile phase there.
>
>
> On Aug 1, 2008, at 5:27 PM, Grant Ingersoll wrote:
>
>>
>> On Aug 1, 2008, at 5:19 PM, Sean Owen wrote:
>>
>>> Oh OK let me try to run through the steps myself to see what  
>>> happens.
>>>
>>> Yeah I hadn't completely merged into the main build file. Well, I  
>>> have
>>> in the sense that the code compiles and builds through that. I left
>>> the more project-specific targets in a separate file.
>>>
>>> I am not against combining it all, in fact, I was just worried about
>>> polluting the main build file.
>>
>> No worries about polluting.  We've got a few releases to work out  
>> things, etc.  I think we will have a clean up at some point.
>>
>>>
>>>
>>> What kind of compile errors do you get? maybe I can diagnose from  
>>> that.
>>
>> Pretty much looks like missing Hadoop jars.  I see the problem.  We  
>> upgraded the hadoop jar.
>>
>>>
>>>
>>> Yes I committed two integrations with Hadoop: one, a job that will  
>>> run
>>> n copies of a Recommender and use it to generate recommendations for
>>> users. So this is a way to crudely parallelize recommending items to
>>> all users at once in batch. This would be good for recomputing
>>> everyone's recommendations, say, every night.
>>>
>>> I also added a job to compute item-item pref diffs, which is an
>>> expensive preprocessing phase for slope-one recommenders. This is  
>>> very
>>> amenable to Hadoop even if may be of somewhat narrow interest.
>>>
>>> It works locally but in honesty I have not tried it on a real  
>>> cluster yet.
>>
>> No worries, I _may_ be doing a session tomorrow at BarCampRDU on  
>> Mahout and Hadoop and someone asked about Taste, so I thought it  
>> would be cool to know a thing or two more about it than I currently  
>> do and what it's status is.
>>
>> -Grant
>
> --------------------------
> Grant Ingersoll
> http://www.lucidimagination.com
>
> Lucene Helpful Hints:
> http://wiki.apache.org/lucene-java/BasicsOfPerformance
> http://wiki.apache.org/lucene-java/LuceneFAQ
>
>
>
>
>
>
>

--------------------------
Grant Ingersoll
http://www.lucidimagination.com

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ








Re: Taste Examples

Posted by Grant Ingersoll <gs...@apache.org>.
FYI, still doesn't compile.  Gets stuck in the grouplens build on the  
compile phase there.


On Aug 1, 2008, at 5:27 PM, Grant Ingersoll wrote:

>
> On Aug 1, 2008, at 5:19 PM, Sean Owen wrote:
>
>> Oh OK let me try to run through the steps myself to see what happens.
>>
>> Yeah I hadn't completely merged into the main build file. Well, I  
>> have
>> in the sense that the code compiles and builds through that. I left
>> the more project-specific targets in a separate file.
>>
>> I am not against combining it all, in fact, I was just worried about
>> polluting the main build file.
>
> No worries about polluting.  We've got a few releases to work out  
> things, etc.  I think we will have a clean up at some point.
>
>>
>>
>> What kind of compile errors do you get? maybe I can diagnose from  
>> that.
>
> Pretty much looks like missing Hadoop jars.  I see the problem.  We  
> upgraded the hadoop jar.
>
>>
>>
>> Yes I committed two integrations with Hadoop: one, a job that will  
>> run
>> n copies of a Recommender and use it to generate recommendations for
>> users. So this is a way to crudely parallelize recommending items to
>> all users at once in batch. This would be good for recomputing
>> everyone's recommendations, say, every night.
>>
>> I also added a job to compute item-item pref diffs, which is an
>> expensive preprocessing phase for slope-one recommenders. This is  
>> very
>> amenable to Hadoop even if may be of somewhat narrow interest.
>>
>> It works locally but in honesty I have not tried it on a real  
>> cluster yet.
>
> No worries, I _may_ be doing a session tomorrow at BarCampRDU on  
> Mahout and Hadoop and someone asked about Taste, so I thought it  
> would be cool to know a thing or two more about it than I currently  
> do and what it's status is.
>
> -Grant

--------------------------
Grant Ingersoll
http://www.lucidimagination.com

Lucene Helpful Hints:
http://wiki.apache.org/lucene-java/BasicsOfPerformance
http://wiki.apache.org/lucene-java/LuceneFAQ








Re: Taste Examples

Posted by Grant Ingersoll <gs...@apache.org>.
On Aug 1, 2008, at 5:19 PM, Sean Owen wrote:

> Oh OK let me try to run through the steps myself to see what happens.
>
> Yeah I hadn't completely merged into the main build file. Well, I have
> in the sense that the code compiles and builds through that. I left
> the more project-specific targets in a separate file.
>
> I am not against combining it all, in fact, I was just worried about
> polluting the main build file.

No worries about polluting.  We've got a few releases to work out  
things, etc.  I think we will have a clean up at some point.

>
>
> What kind of compile errors do you get? maybe I can diagnose from  
> that.

Pretty much looks like missing Hadoop jars.  I see the problem.  We  
upgraded the hadoop jar.

>
>
> Yes I committed two integrations with Hadoop: one, a job that will run
> n copies of a Recommender and use it to generate recommendations for
> users. So this is a way to crudely parallelize recommending items to
> all users at once in batch. This would be good for recomputing
> everyone's recommendations, say, every night.
>
> I also added a job to compute item-item pref diffs, which is an
> expensive preprocessing phase for slope-one recommenders. This is very
> amenable to Hadoop even if may be of somewhat narrow interest.
>
> It works locally but in honesty I have not tried it on a real  
> cluster yet.

No worries, I _may_ be doing a session tomorrow at BarCampRDU on  
Mahout and Hadoop and someone asked about Taste, so I thought it would  
be cool to know a thing or two more about it than I currently do and  
what it's status is.

-Grant

Re: Taste Examples

Posted by Sean Owen <sr...@gmail.com>.
Oh OK let me try to run through the steps myself to see what happens.

Yeah I hadn't completely merged into the main build file. Well, I have
in the sense that the code compiles and builds through that. I left
the more project-specific targets in a separate file.

I am not against combining it all, in fact, I was just worried about
polluting the main build file.

What kind of compile errors do you get? maybe I can diagnose from that.

Yes I committed two integrations with Hadoop: one, a job that will run
n copies of a Recommender and use it to generate recommendations for
users. So this is a way to crudely parallelize recommending items to
all users at once in batch. This would be good for recomputing
everyone's recommendations, say, every night.

I also added a job to compute item-item pref diffs, which is an
expensive preprocessing phase for slope-one recommenders. This is very
amenable to Hadoop even if may be of somewhat narrow interest.

It works locally but in honesty I have not tried it on a real cluster yet.

Sean

On Fri, Aug 1, 2008 at 5:14 PM, Grant Ingersoll <gs...@apache.org> wrote:
> Hi,
>
> (more or less a newbie to Taste :-)   )
> I downloaded the MovieLens dataset per the Taste docs and am now trying to
> get it running.  I fixed one minor problem in step #2 in the docs (should be
> src/main/examples/....), but then I can't get ant build-grouplens-example to
> work either.  I see that it isn't in the main build file, but when I run ant
> with -f taste-build.xml I get all kinds of compile errors.  Anyone know what
> I need to do to fix it?
>
> Also, what's the status of Taste on Hadoop?  Does it work on it now?  Has
> anyone tried it out?
>
> Thanks,
> Grant
>