示例#1
0
 def test_dl_latest_saved_model_no_path(self):
     with self.assertRaises(InvalidQueryError):
         client = Client(
             api_token="57c60ade109be36ef1a1c89f56247109fa448741")
         client.checkout_project(
             project_token="4b003477-3b31-4f74-8952-8a9dc879b0ec")
         client.checkout_network(network_name="ssd_inceptionV2_COCO")
         client.dl_latest_saved_model()
示例#2
0
 def test_dl_latest_saved_model_path(self):
     client = Client(api_token="57c60ade109be36ef1a1c89f56247109fa448741")
     client.checkout_project(
         project_token="4b003477-3b31-4f74-8952-8a9dc879b0ec")
     client.checkout_network(network_name="ssd_inceptionV2_COCO")
     self.assertEqual(client.network_id,
                      "ff3fb57d-6f95-46f6-a6dc-aeb0985dd6a4")
     client.dl_latest_saved_model(path_to_save="test_saved/ici")
     self.assertTrue(os.path.isdir("test_saved/ici"))
     self.assertTrue(
         os.path.isfile(os.path.join("test_saved/ici", "saved_model.pb")))
     shutil.rmtree("test_saved/ici")