Skip to content

Commit

Permalink
Merge branch 'master' of github.com:JohnLangford/vowpal_wabbit
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnLangford committed Jun 23, 2015
2 parents cd535c9 + 43dd785 commit c5f4c8e
Show file tree
Hide file tree
Showing 74 changed files with 3,011 additions and 1,357 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ ifeq ($(UNAME), Darwin)
# but /opt/local seems to be preferred by some users
# so we try them both
ifneq (,$(wildcard /usr/local/include))
BOOST_INCLUDE += -I /usr/local/include
BOOST_LIBRARY += -L /usr/local/lib
BOOST_INCLUDE = -I /usr/local/include
BOOST_LIBRARY = -L /usr/local/lib
endif
ifneq (,$(wildcard /opt/local/include))
BOOST_INCLUDE += -I /opt/local/include
BOOST_LIBRARY += -L /opt/local/lib
BOOST_INCLUDE = -I /opt/local/include
BOOST_LIBRARY = -L /opt/local/lib
endif
NPROCS:=$(shell sysctl -n hw.ncpu)
endif
Expand Down
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ noinst_HEADERS = vowpalwabbit/accumulate.h \
vowpalwabbit/nn.h \
vowpalwabbit/noop.h \
vowpalwabbit/oaa.h \
vowpalwabbit/boosting.h \
vowpalwabbit/parse_args.h \
vowpalwabbit/parse_example.h \
vowpalwabbit/parse_regressor.h \
Expand Down
4 changes: 1 addition & 3 deletions demo/dependencyparsing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ python_exe=python2.7

train_data=wsj_train_subset
test_data=wsj_test_subset
train_data=wsj_train
test_data=wsj_test
tag=tags

.SECONDARY:
Expand All @@ -28,7 +26,7 @@ clean:
@$(python_exe) parse_data.py $(test_data) $(test_data).vw

dep.model: $(train_data).vw
@$(VW) --passes 3 -d $< -k -c --search_rollin mix_per_roll --search_task dep_parser --search 12 --search_alpha 1e-5 --search_rollout oracle --holdout_off -f $@ --search_history_length 3 --search_no_caching -b 26 --root_label 8 --num_label 12 --nn 5 --ftrl_proximal --search_metatask selective_branching --search_max_branch 5
@$(VW) --passes 3 -d $< -k -c --search_rollin mix_per_roll --search_task dep_parser --search 12 --search_alpha 1e-5 --search_rollout oracle --holdout_off -f $@ --search_history_length 3 --search_no_caching -b 26 --root_label 8 --num_label 12 --nn 5 --ftrl --search_metatask selective_branching --search_max_branch 5

dep.test.predictions: $(test_data).vw dep.model
@$(VW) -d $< -t $(search_option) -i dep.model --search_metatask selective_branching --search_max_branch 5 -p $@
Expand Down
6 changes: 3 additions & 3 deletions deployvw.bat
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ goto :eof
:usage
echo Error in script usage. The correct usage is:
echo %0 [option]
echo where [option] is: x86 ^| x64
echo where [option] is: x86 ^| x64
echo:
echo For example:
echo %0 x86
goto :eof

:missing
echo The varhiable "VSINSTALLDIR" is missing. Visual Studio 2013 might not be installed.
echo The variable "VSINSTALLDIR" is missing. Visual Studio 2013 might not be installed.
goto :eof

:eof
:eof
9 changes: 6 additions & 3 deletions java/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,14 @@ all:
test:
cd ..; $(MAKE) test

things: target/vw_jni.lib
things: pom_version target/vw_jni.lib

target/vw_jni.lib: src/main/c++/vw_VWScorer.cc ../vowpalwabbit/main.o ../vowpalwabbit/libvw.a ../vowpalwabbit/liballreduce.a
pom_version: pom.xml
ver=$$(grep AC_INIT ../configure.ac | cut -d '[' -f 3 | cut -d ']' -f 1) && perl -pi -e "s/(\s*)<version>.*-SNAPSHOT/\1<version>$$ver-SNAPSHOT/" pom.xml

target/vw_jni.lib: src/main/c++/vw_VW.cc ../vowpalwabbit/main.o ../vowpalwabbit/libvw.a ../vowpalwabbit/liballreduce.a
mkdir -p target;
$(CXX) -fPIC -std=c++0x -shared $(FLAGS) -o $@ $< $(VWLIBS) $(STDLIBS) $(JAVA_INCLUDE)
$(CXX) -shared $(FLAGS) -o $@ $< $(VWLIBS) $(STDLIBS) $(JAVA_INCLUDE)

clean:
rm -f target/vw_jni.lib
229 changes: 132 additions & 97 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,62 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.github.EmergentOrder</groupId>
<artifactId>vw-jni-${os.version}-${os.arch}</artifactId>
<version>1.0.0-SNAPSHOT</version>
<groupId>com.github.johnlangford</groupId>
<artifactId>vw-jni</artifactId>
<version>7.10.2-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Vowpal Wabbit JNI Layer</name>
<url>https://github.com/EmergentOrder/vowpal_wabbit</url>
<description>
A wrapper around Vowpal Wabbit that allows use through Java. This wrapper is designed to be self contained. Because
of the use of JNI, a number of platforms are supported in this JAR. If your platform is not supported please feel free to add it
by modifying src/main/bin/build.sh accordingly.
</description>
<url>https://github.com/JohnLangford/vowpal_wabbit</url>

<scm>
<connection>scm:git:[email protected]:EmergentOrder/vowpal_wabbit.git</connection>
<developerConnection>scm:git:[email protected]:EmergentOrder/vowpal_wabbit.git</developerConnection>
<url>[email protected]:EmergentOrder/vowpal_wabbit.git</url>
<connection>scm:git:[email protected]:JohnLangford/vowpal_wabbit.git</connection>
<developerConnection>scm:git:[email protected]:JohnLangford/vowpal_wabbit.git</developerConnection>
<url>[email protected]:JohnLangford/vowpal_wabbit.git</url>
</scm>

<properties>
<slf4j.version>1.7.6</slf4j.version>
<junit.version>4.11</junit.version>
</properties>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<licenses>
<license>
<name>Vowpal Wabbit License</name>
<url>https://github.com/JohnLangford/vowpal_wabbit/blob/master/LICENSE</url>
</license>
</licenses>

<developers>
<developer>
<name>Jonathan Morra</name>
<email>[email protected]</email>
</developer>
<developer>
<name>Ryan Deak</name>
<email>[email protected]</email>
</developer>
<developer>
<name>John Langford</name>
<email>[email protected]</email>
</developer>
</developers>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -38,11 +67,27 @@
<testResource>
<directory>${project.build.directory}</directory>
<includes>
<include>vw_jni.lib</include>
<include>vw_jni.*lib</include>
</includes>
</testResource>
</testResources>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.6.1</version>
<configuration>
<excludeDefaultDirectories>true</excludeDefaultDirectories>
<filesets>
<fileset>
<directory>${project.build.directory}</directory>
<excludes>
<exclude>vw_jni.*lib</exclude>
</excludes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand All @@ -52,41 +97,6 @@
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>Build VW</id>
<phase>process-classes</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<exportAntProperties>true</exportAntProperties>
<target>
<exec executable="make" failonerror="true" />
</target>
</configuration>
</execution>
<execution>
<id>Clean VW</id>
<phase>clean</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<exportAntProperties>true</exportAntProperties>
<target>
<exec executable="make" failonerror="true">
<arg value="clean" />
</exec>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
Expand All @@ -99,9 +109,6 @@
</goals>
<configuration>
<rules>
<requireJavaVersion>
<version>[1.6,)</version>
</requireJavaVersion>
<banDuplicateClasses>
<findAllDuplicates>true</findAllDuplicates>
</banDuplicateClasses>
Expand Down Expand Up @@ -162,7 +169,7 @@
<resource>
<directory>${project.build.directory}</directory>
<includes>
<include>vw_jni.lib</include>
<include>vw_jni.*lib</include>
</includes>
</resource>
</resources>
Expand All @@ -175,11 +182,11 @@
<artifactId>maven-release-plugin</artifactId>
<version>2.5</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
Expand All @@ -200,43 +207,71 @@
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.2</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.2</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>




</distributionManagement>
<profiles>
<profile>
<id>release-sign-artifacts</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Loading

0 comments on commit c5f4c8e

Please sign in to comment.