Skip to content

Commit

Permalink
Remove context tests and imports in optional duckDB reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasjng committed Oct 26, 2024
1 parent a6b271b commit 2fbf462
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 112 deletions.
3 changes: 1 addition & 2 deletions src/nnbench/reporter/duckdb_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import weakref
from pathlib import Path

from nnbench.context import Context

try:
import duckdb
Expand Down Expand Up @@ -122,7 +121,7 @@ def read_sql(
results = rel.fetchall()

benchmarks = [dict(zip(columns, r)) for r in results]
context = Context()
context = {}
for bm in benchmarks:
context.update(bm.pop("context", {}))

Expand Down
108 changes: 0 additions & 108 deletions tests/test_context.py

This file was deleted.

3 changes: 1 addition & 2 deletions tests/test_fileio.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import pytest

from nnbench.context import Context
from nnbench.reporter.file import FileIO
from nnbench.types import BenchmarkRecord

Expand All @@ -20,7 +19,7 @@ def test_fileio_writes_no_compression_inline(
f = FileIO()

rec = BenchmarkRecord(
context=Context.make({"a": "b", "s": 1, "b.c": 1.0}),
context={"a": "b", "s": 1, "b.c": 1.0},
benchmarks=[{"name": "foo", "value": 1}, {"name": "bar", "value": 2}],
)
file = tmp_path / f"record.{ext}"
Expand Down

0 comments on commit 2fbf462

Please sign in to comment.