test_model_zoo.py 454 Bytes
Newer Older
facebook-github-bot's avatar
facebook-github-bot committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import os
import unittest

from d2go.model_zoo import model_zoo

OSSRUN = os.getenv('OSSRUN') == '1'

class TestD2GoModelZoo(unittest.TestCase):
    @unittest.skipIf(not OSSRUN, "OSS test only")
    def test_model_zoo_pretrained(self):
        configs = list(model_zoo._ModelZooUrls.CONFIG_PATH_TO_URL_SUFFIX.keys())
        for cfgfile in configs:
            model = model_zoo.get(cfgfile, trained=True)

if __name__ == "__main__":
    unittest.main()