MCPcopy Index your code
hub / github.com/mudler/LocalAI / test_load_model

Method test_load_model

backend/python/diffusers/test.py:58–74  ·  view source on GitHub ↗

This method tests if the model is loaded successfully

(self)

Source from the content-addressed store, hash-verified

56 self.tearDown()
57
58 def test_load_model(self):
59 """
60 This method tests if the model is loaded successfully
61 """
62 time.sleep(20)
63 try:
64 self.setUp()
65 with grpc.insecure_channel("localhost:50051") as channel:
66 stub = backend_pb2_grpc.BackendStub(channel)
67 response = stub.LoadModel(backend_pb2.ModelOptions(Model="Lykon/dreamshaper-8"))
68 self.assertTrue(response.success)
69 self.assertEqual(response.message, "Model loaded successfully")
70 except Exception as err:
71 print(err)
72 self.fail("LoadModel service failed")
73 finally:
74 self.tearDown()
75
76 def test(self):
77 """

Callers

nothing calls this directly

Calls 3

setUpMethod · 0.95
tearDownMethod · 0.95
LoadModelMethod · 0.65

Tested by

no test coverage detected