Skip to content

Commit

Permalink
Make NoOpEvaluator return 1.0 (#71)
Browse files Browse the repository at this point in the history
* Make NoOpEvaluator return 1.0

* Fix pytest
  • Loading branch information
timonegk authored Apr 29, 2024
1 parent 0aa9e6f commit d89ddaf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scripts/test_reach.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ def test_run_reach_study_mixed(self):

results = db.calculateResults()
logger.printResults(results)
self.assertAlmostEqual(results.total_pose_score, 0.0)
self.assertAlmostEqual(results.total_pose_score, 100.0)
self.assertAlmostEqual(results.reach_percentage, 100.0)
self.assertAlmostEqual(results.norm_total_pose_score, 0.0)
self.assertAlmostEqual(results.norm_total_pose_score, 100.0)

display.showEnvironment()

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/no_op.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace reach
{
double NoOpEvaluator::calculateScore(const std::map<std::string, double>&) const
{
return 0.0;
return 1.0;
}

Evaluator::ConstPtr NoOpEvaluatorFactory::create(const YAML::Node&) const
Expand Down

0 comments on commit d89ddaf

Please sign in to comment.