| @@ -1,4 +1,4 @@ | |||||
| # Copyright 2020 Huawei Technologies Co., Ltd | |||||
| # Copyright 2020-2021 Huawei Technologies Co., Ltd | |||||
| # | # | ||||
| # Licensed under the Apache License, Version 2.0 (the "License"); | # Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| # you may not use this file except in compliance with the License. | # you may not use this file except in compliance with the License. | ||||
| @@ -266,8 +266,9 @@ class DebuggerGrpcServer(grpc_server_base.EventListenerServicer): | |||||
| """ | """ | ||||
| log.info("Start to wait for command.") | log.info("Start to wait for command.") | ||||
| if self._status != ServerStatus.MISMATCH: | if self._status != ServerStatus.MISMATCH: | ||||
| self._cache_store.get_stream_handler(Streams.METADATA).state = ServerStatus.WAITING.value | |||||
| self._cache_store.put_data({'metadata': {'state': 'waiting'}}) | |||||
| metadata_stream = self._cache_store.get_stream_handler(Streams.METADATA) | |||||
| metadata_stream.state = ServerStatus.WAITING.value | |||||
| self._cache_store.put_data(metadata_stream.get()) | |||||
| event = None | event = None | ||||
| while event is None and self._status not in [ServerStatus.RUNNING, ServerStatus.PENDING]: | while event is None and self._status not in [ServerStatus.RUNNING, ServerStatus.PENDING]: | ||||
| log.debug("Wait for %s-th command", self._pos) | log.debug("Wait for %s-th command", self._pos) | ||||
| @@ -1,4 +1,4 @@ | |||||
| # Copyright 2020 Huawei Technologies Co., Ltd | |||||
| # Copyright 2020-2021 Huawei Technologies Co., Ltd | |||||
| # | # | ||||
| # Licensed under the Apache License, Version 2.0 (the "License"); | # Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| # you may not use this file except in compliance with the License. | # you may not use this file except in compliance with the License. | ||||
| @@ -375,7 +375,7 @@ class DebuggerServer: | |||||
| watchpoint_hit_stream = self.cache_store.get_stream_handler(Streams.WATCHPOINT_HIT) | watchpoint_hit_stream = self.cache_store.get_stream_handler(Streams.WATCHPOINT_HIT) | ||||
| watchpoint_hit_stream.update_tensor_history(tensor_history) | watchpoint_hit_stream.update_tensor_history(tensor_history) | ||||
| # add metadata | # add metadata | ||||
| metadata = self.cache_store.get_stream_handler(Streams.METADATA).get(['state', 'step']) | |||||
| metadata = self.cache_store.get_stream_handler(Streams.METADATA).get(['step']) | |||||
| tensor_history.update(metadata) | tensor_history.update(metadata) | ||||
| return tensor_history | return tensor_history | ||||
| @@ -16,7 +16,6 @@ | |||||
| } | } | ||||
| ], | ], | ||||
| "metadata": { | "metadata": { | ||||
| "state": "waiting", | |||||
| "step": 1 | "step": 1 | ||||
| } | } | ||||
| } | } | ||||
| @@ -32,7 +32,6 @@ | |||||
| } | } | ||||
| ], | ], | ||||
| "metadata": { | "metadata": { | ||||
| "state": "waiting", | |||||
| "step": 1 | "step": 1 | ||||
| } | } | ||||
| } | } | ||||
| @@ -32,7 +32,6 @@ | |||||
| } | } | ||||
| ], | ], | ||||
| "metadata": { | "metadata": { | ||||
| "state": "waiting", | |||||
| "step": 0 | "step": 0 | ||||
| } | } | ||||
| } | } | ||||