refiners/tests/foundationals/segment_anything/conftest.py
2024-10-14 15:12:59 +02:00

17 lines
345 B
Python

import gc
from pathlib import Path
from pytest import fixture
@fixture(autouse=True)
def ensure_gc():
# Avoid GPU OOMs
# See https://github.com/pytest-dev/pytest/discussions/8153#discussioncomment-214812
gc.collect()
@fixture(scope="package")
def ref_path(test_sam_path: Path) -> Path:
return test_sam_path / "test_sam_ref"