mirror of
https://github.com/finegrain-ai/refiners.git
synced 2024-11-21 21:58:47 +00:00
avoid OOMs in SAM tests
This commit is contained in:
parent
91c0fd24d8
commit
9be3580ab3
|
@ -1,9 +1,17 @@
|
|||
import gc
|
||||
from pathlib import Path
|
||||
from warnings import warn
|
||||
|
||||
from pytest import fixture, skip
|
||||
|
||||
|
||||
@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"
|
||||
|
|
Loading…
Reference in a new issue