Skip to content

[BUG] Some OD tests execute only on GPU but should also execute on CPU #416

Open
@PatrickBue

Description

@PatrickBue

Description

Some of the object detection tests have the gpu marker and hence only get tested on GPU machines, even though these tests could also run on CPU. See an example below. The reason is the dependency on od_detection_learner which internally runs 1 training epoch and as part of that runs coco evaluation which has the dependency on GPU. In theory this (and other) tests should also run on un-trained models.

@pytest.mark.gpu
@pytest.fixture(scope="session")
def saved_model(od_detection_learner, tiny_od_data_path) -> Union[str, Path]:
""" A saved model so that loading functions can reuse. """
model_name = "test_fixture_model"
od_detection_learner.save(model_name)
assert (Path(tiny_od_data_path) / "models" / model_name).exists()
return model_name, Path(tiny_od_data_path) / "models"

In which platform does it happen?

Only non-gpu tests are affected.

Expected behavior (i.e. solution)

More tests get executed on CPU-only machines

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions