Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion tests/core/test_sdoh.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from pathlib import Path
from typing import Set
from tests.base import BaseTestCase
from pyhealth.models.sdoh import SdohClassifier
Expand Down Expand Up @@ -25,7 +26,10 @@ def test_is_initialized_nn_module(self):
def test_parse_reponse(self):
"""Test the parsing of the SDOH output."""
import pandas as pd
df = pd.read_csv('test-resources/core/sdoh-test-cases.csv')
cases = (
Path(__file__).parents[2] / "test-resources" / "core" / "sdoh-test-cases.csv"
)
df = pd.read_csv(cases)
sdoh = SdohClassifier()
response: str
preds: str
Expand Down
4 changes: 3 additions & 1 deletion tests/nlp/test_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ def test_object_graph(self):

def test_pandas(self):
WRITE: bool = 0
should_file: Path = Path('test-resources/nlp/metrics.csv')
should_file: Path = (
Path(__file__).parents[2] / "test-resources" / "nlp" / "metrics.csv"
)
self._set_debug()
scorer = Scorer()
ss: ScoreSet = scorer.score(ScoreContext(self.pairs))
Expand Down
Loading