Commit 30cf78be authored by Yanghan Wang's avatar Yanghan Wang Committed by Facebook GitHub Bot
Browse files

remove caffe2 from oss CI

Summary: Pull Request resolved: https://github.com/facebookresearch/d2go/pull/154

Reviewed By: zhanghang1989

Differential Revision: D33352204

fbshipit-source-id: e1a9ac6eb2574dfe6931435275e27c9508f66352
parent 62a97445
......@@ -57,13 +57,13 @@ class GeneralizedRCNNPatch:
@RCNN_PREPARE_FOR_EXPORT_REGISTRY.register()
def default_rcnn_prepare_for_export(self, cfg, inputs, predictor_type):
from detectron2.export.caffe2_modeling import META_ARCH_CAFFE2_EXPORT_TYPE_MAP
if (
"@c2_ops" in predictor_type
or "caffe2" in predictor_type
or "onnx" in predictor_type
):
from detectron2.export.caffe2_modeling import META_ARCH_CAFFE2_EXPORT_TYPE_MAP
C2MetaArch = META_ARCH_CAFFE2_EXPORT_TYPE_MAP[cfg.MODEL.META_ARCHITECTURE]
c2_compatible_model = C2MetaArch(cfg, self)
......
......@@ -2,6 +2,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import os
import unittest
import torch
......@@ -11,6 +12,7 @@ from detectron2.structures import Boxes
class TestBoxWithNMSLimit(unittest.TestCase):
@unittest.skipIf(os.getenv("OSSRUN") == "1", "Caffe2 is not available for OSS")
def test_caffe2_pytorch_eq(self):
ims_per_batch = 8
post_nms_topk = 100
......
......@@ -36,6 +36,8 @@ class TestFBNetV3MaskRCNNFP32(RCNNBaseTestCases.TemplateTestCase):
]
)
def test_export(self, predictor_type, compare_match):
if os.getenv("OSSRUN") == "1" and "@c2_ops" in predictor_type:
self.skipTest("Caffe2 is not available for OSS")
self._test_export(predictor_type, compare_match=compare_match)
......@@ -65,6 +67,8 @@ class TestFBNetV3MaskRCNNQATEager(RCNNBaseTestCases.TemplateTestCase):
]
)
def test_export(self, predictor_type, compare_match):
if os.getenv("OSSRUN") == "1" and "@c2_ops" in predictor_type:
self.skipTest("Caffe2 is not available for OSS")
self._test_export(predictor_type, compare_match=compare_match)
......@@ -92,6 +96,8 @@ class TestFBNetV3KeypointRCNNFP32(RCNNBaseTestCases.TemplateTestCase):
]
)
def test_export(self, predictor_type, compare_match):
if os.getenv("OSSRUN") == "1" and "@c2_ops" in predictor_type:
self.skipTest("Caffe2 is not available for OSS")
self._test_export(predictor_type, compare_match=compare_match)
......
......@@ -83,5 +83,6 @@ def maskrcnn_export_caffe2_vs_torchvision_opset_format_example():
class TestOptimizer(unittest.TestCase):
def test_maskrcnn_export_legacy_vs_new_format_example(self):
@unittest.skipIf(os.getenv("OSSRUN") == "1", "Caffe2 is not available for OSS")
def test_maskrcnn_export_caffe2_vs_torchvision_opset_format_example(self):
maskrcnn_export_caffe2_vs_torchvision_opset_format_example()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment