Skip to content

Commit

Permalink
added get_logs_metric to test_logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
djl11 committed Nov 7, 2024
1 parent cb88b66 commit 3658f32
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_evals/test_utils/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,19 @@ def test_log_caching():
log = unify.get_log_by_id(log.id)
assert isinstance(log, unify.Log)

# get_logs_metric
unify.log(project=project, b=3)
unify.get_logs_metric(project=project, metric="mean", key="b")
assert (
_get_cache(
fn_name="get_logs_metric",
kw={"project": project, "metric": "mean", "key": "b"},
)
is not None
)
metric = unify.get_logs_metric(project=project, metric="mean", key="b")
assert metric == 2.5


if __name__ == "__main__":
pass

0 comments on commit 3658f32

Please sign in to comment.