Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/xray report generation #144

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Prev Previous commit
updated sequence.py
  • Loading branch information
samarthkeshari committed Apr 27, 2023
commit 8ed1dd5d667142048e68bca66bf3d3b617a233a2
11 changes: 6 additions & 5 deletions pyhealth/metrics/sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,19 @@ def sequence_metrics_fn(
if metrics:
for metric in metrics:
if metric not in allowed_metrics:
raise ValueError(f"Unknown metric for \
sequence evaluation: {metric}")

raise ValueError(f"Unknown metric for evaluation: {metric}")
else:
metrics = allowed_metrics

output = {}
for scorer, method in scorers:
score, scores = scorer.compute_score(y_true, y_generated)
if type(score) == list:
for m, s in zip(method, score):
if m in allowed_metrics:
if m in metrics:
output[m] = s
else:
if m in allowed_metrics:
if method in metrics:
output[method] = score

return output
288 changes: 0 additions & 288 deletions test.py

This file was deleted.