Skip to content

Commit

Permalink
Fix test_predict_activity to use correct latest file path for models
Browse files Browse the repository at this point in the history
  • Loading branch information
priyappillai committed May 6, 2021
1 parent f168638 commit 886ffde
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions adapt/utils/tests/test_predict_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from adapt import alignment
from adapt.utils import predict_activity
from adapt.utils.version import get_project_path
from adapt.utils.version import get_project_path, get_model_version

__author__ = 'Hayden Metsky <hayden@mit.edu>'

Expand All @@ -20,8 +20,13 @@ class TestPredictor(unittest.TestCase):
def setUp(self):
# Use the provided models with default thresholds
dir_path = get_project_path()
cla_path = os.path.join(dir_path, 'models', 'classify', 'cas13a', 'latest')
reg_path = os.path.join(dir_path, 'models', 'regress', 'cas13a', 'latest')
cla_path_all = os.path.join(dir_path, 'models', 'classify', 'cas13a')
reg_path_all = os.path.join(dir_path, 'models', 'regress', 'cas13a')
cla_version = get_model_version(cla_path_all)
reg_version = get_model_version(reg_path_all)
cla_path = os.path.join(cla_path_all, cla_version)
reg_path = os.path.join(reg_path_all, reg_version)

self.predictor = predict_activity.Predictor(cla_path, reg_path)

def test_model_input_from_nt(self):
Expand Down

0 comments on commit 886ffde

Please sign in to comment.