Skip to content

Commit

Permalink
Fix issue #1869
Browse files Browse the repository at this point in the history
Add coveralls badge to README.md
remove coverage stats of examples, tests, benchmark, cmake
  • Loading branch information
vigsterkr committed Feb 14, 2014
1 parent dea8e10 commit 3fcb4a5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ script:
- ctest --output-on-failure -j 2
after_success:
- cd ..
- coveralls -e /usr/include -e build/GoogleMock -e build/NLopt -e build/Eigen3 -e build/JSON -e build/CMakeFiles -E '.*\.h' > /dev/null
- coveralls -e tests -e examples -e cmake -e benchmarks -e src/interfaces -e /usr/include -e build/GoogleMock -e build/NLopt -e build/Eigen3 -e build/JSON -e build/CMakeFiles -E '.*\.h' > /dev/null
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Develop branch build status:

[![Build Status](https://travis-ci.org/shogun-toolbox/shogun.png?branch=develop)](https://travis-ci.org/shogun-toolbox/shogun)
[![Coverage Status](https://coveralls.io/repos/shogun-toolbox/shogun/badge.png?branch=develop)](https://coveralls.io/r/shogun-toolbox/shogun?branch=develop)

Buildbot: http://buildbot.shogun-toolbox.org/waterfall.

Expand Down
11 changes: 9 additions & 2 deletions src/shogun/classifier/vw/VwRegressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ CVwRegressor::~CVwRegressor()
{
// TODO: the number of weight_vectors depends on num_threads
// this should be reimplemented using SGVector (for reference counting)
SG_FREE(weight_vectors);
release_weight_vectors(weight_vectors);
SG_UNREF(loss);
SG_UNREF(env);
}
Expand Down Expand Up @@ -222,7 +222,7 @@ void CVwRegressor::load_regressor(char* file)

// Initialize the weight vector
if (weight_vectors)
SG_FREE(weight_vectors);
release_weight_vectors();
init(env);

vw_size_t local_ngram;
Expand Down Expand Up @@ -254,3 +254,10 @@ void CVwRegressor::load_regressor(char* file)
}
source.close_file();
}

void CVwRegressor::release_weight_vectors()
{
for (int i = 0; i < num_threads; i++)
SG_FREE(weight_vectors[i]);
SG_FREE(weight_vectors);
}
3 changes: 3 additions & 0 deletions src/shogun/classifier/vw/VwRegressor.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ class CVwRegressor: public CSGObject
protected:
/// Environment
CVwEnvironment* env;

private:
void release_weight_vectors();
};

}
Expand Down

0 comments on commit 3fcb4a5

Please sign in to comment.