diff --git a/src/viam/services/mlmodel/client.py b/src/viam/services/mlmodel/client.py index c1690303f..e55c2e858 100644 --- a/src/viam/services/mlmodel/client.py +++ b/src/viam/services/mlmodel/client.py @@ -1,13 +1,11 @@ -from typing import Dict, Mapping, Optional +from typing import Dict, Optional from grpclib.client import Channel from numpy.typing import NDArray -from viam.proto.common import DoCommandRequest, DoCommandResponse from viam.proto.service.mlmodel import InferRequest, InferResponse, MetadataRequest, MetadataResponse, MLModelServiceStub from viam.resource.rpc_client_base import ReconfigurableResourceRPCClientBase from viam.services.mlmodel.utils import flat_tensors_to_ndarrays, ndarrays_to_flat_tensors -from viam.utils import ValueTypes, dict_to_struct, struct_to_dict from .mlmodel import Metadata, MLModel @@ -27,8 +25,3 @@ async def metadata(self, *, timeout: Optional[float] = None) -> Metadata: request = MetadataRequest(name=self.name) response: MetadataResponse = await self.client.Metadata(request) return response.metadata - - async def do_command(self, command: Mapping[str, ValueTypes], *, timeout: Optional[float] = None, **kwargs) -> Mapping[str, ValueTypes]: - request = DoCommandRequest(name=self.name, command=dict_to_struct(command)) - response: DoCommandResponse = await self.client.DoCommand(request, timeout=timeout) - return struct_to_dict(response.result) diff --git a/tests/test_mlmodel.py b/tests/test_mlmodel.py index 7cddd9e59..cbcf7b206 100644 --- a/tests/test_mlmodel.py +++ b/tests/test_mlmodel.py @@ -23,12 +23,6 @@ async def test_metadata(self): resp = await self.mlmodel.metadata() assert resp == MockMLModel.META - @pytest.mark.asyncio - async def do_command(self): - command = {"command": "args"} - resp = await self.mlmodel.do_command(command) - assert resp == {"command": command} - class TestService: @classmethod