This method tests if the model is loaded successfully
(self)
| 42 | finally: |
| 43 | self.tearDown() |
| 44 | def test_load_model(self): |
| 45 | """ |
| 46 | This method tests if the model is loaded successfully |
| 47 | """ |
| 48 | try: |
| 49 | self.setUp() |
| 50 | with grpc.insecure_channel("localhost:50051") as channel: |
| 51 | stub = backend_pb2_grpc.BackendStub(channel) |
| 52 | response = stub.LoadModel(backend_pb2.ModelOptions(Model="mlx-community/Llama-3.2-1B-Instruct-4bit")) |
| 53 | self.assertTrue(response.success) |
| 54 | self.assertEqual(response.message, "MLX model loaded successfully") |
| 55 | except Exception as err: |
| 56 | print(err) |
| 57 | self.fail("LoadModel service failed") |
| 58 | finally: |
| 59 | self.tearDown() |
| 60 | |
| 61 | def test_text(self): |
| 62 | """ |