Skip to content
Permalink
Browse files

Spark/JNI multipass fixes and AllReduce quiet support (#1949)

* fixed cache file support by passing --no_stdin
added quiet for AllReduce
replaced cerr with THROW for AllReduce

* added CMake foo to .gitignore
  • Loading branch information...
eisber committed Jun 27, 2019
1 parent 5d1527c commit 855f0c572b30df3beee6a5e17c04ef8233721a87
@@ -16,6 +16,11 @@ libtool
ltmain.sh
missing
vowpalwabbit/Makefile.in
CMakeFiles
CMakeCache.txt
CTestCostData.txt
CTestTestfile.cmake
cmake_install.cmake
config.h
*.la
*.lo
@@ -2,11 +2,12 @@
#include "util.h"
#include "spanning_tree.h"

JNIEXPORT jlong JNICALL Java_org_vowpalwabbit_spark_ClusterSpanningTree_create(JNIEnv *env, jclass, jint port)
JNIEXPORT jlong JNICALL Java_org_vowpalwabbit_spark_ClusterSpanningTree_create(
JNIEnv *env, jclass, jint port, jboolean quiet)
{
try
{
return (jlong) new VW::SpanningTree(port);
return (jlong) new VW::SpanningTree(port, quiet);
}
catch (...)
{
@@ -83,7 +83,6 @@ JNIEXPORT void JNICALL Java_org_vowpalwabbit_spark_VowpalWabbitNative_performRem
{
if (all->numpasses > 1)
{
adjust_used_index(*all);
all->do_reset_source = true;
VW::start_parser(*all);
LEARNER::generic_driver(*all);
@@ -148,8 +147,15 @@ JNIEXPORT void JNICALL Java_org_vowpalwabbit_spark_VowpalWabbitNative_endPass(JN

try
{
// note: this code duplication seems bound for trouble
// from parse_dispatch_loop.h:26
// from learner.cc:41
reset_source(*all, all->num_bits);
all->do_reset_source = false;
all->passes_complete++;

all->current_pass++;
all->l->end_pass();
VW::sync_stats(*all);
}
catch (...)
{
@@ -163,6 +169,7 @@ JNIEXPORT void JNICALL Java_org_vowpalwabbit_spark_VowpalWabbitNative_finish(JNI

try
{
VW::sync_stats(*all);
VW::finish(*all);
}
catch (...)

0 comments on commit 855f0c5

Please sign in to comment.
You can’t perform that action at this time.