Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TorchFX] Test implementation of YoloV8 is removed #2858

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

366 changes: 183 additions & 183 deletions tests/torch/data/reference_graphs/fx/yolov8n.dot

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions tests/torch/fx/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import torch.utils.data.distributed
import torchvision.models as models
from torch._export import capture_pre_autograd_graph
from ultralytics.models.yolo import YOLO

from nncf.common.graph.graph import NNCFNodeName
from nncf.common.graph.operator_metatypes import OperatorMetatype
Expand All @@ -35,7 +36,6 @@
from nncf.torch.dynamic_graph.patch_pytorch import disable_patching
from tests.shared.paths import TEST_ROOT
from tests.torch.test_compressed_graph import check_graph
from tests.torch.test_models.yolov8.model import YoloV8Model

FX_DIR_NAME = "fx"

Expand All @@ -54,9 +54,12 @@ def torchvision_model_case(model_id: str, input_shape: Tuple[int,]):

def yolo_v8_case(model_id, input_shape):
def get_model() -> torch.nn.Module:
model = YoloV8Model().eval()
model_config = model_id + ".yaml"
model = YOLO(model_config)
model = model.model
model.eval()
# Warmup model
model(torch.empty(input_shape))
model(torch.ones(input_shape))
return model

return ModelCase(get_model, model_id, input_shape)
Expand Down
1 change: 1 addition & 0 deletions tests/torch/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ timm==0.9.2
# Required for torch/fx tests
torchvision
fastdownload==0.0.7
ultralytics==8.2.56
Loading
Loading