We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14cd162 commit 7dfee10Copy full SHA for 7dfee10
1 file changed
sdk/ml/azure-ai-ml/azure/ai/ml/operations/_local_endpoint_helper.py
@@ -121,7 +121,14 @@ def list(self) -> Iterable[OnlineEndpoint]:
121
endpoint_stubs = self._endpoint_stub.list()
122
# Iterate through all cached endpoint files
123
for endpoint_file in endpoint_stubs:
124
- endpoint_json = json.loads(endpoint_file.read_text())
+ try:
125
+ contents = endpoint_file.read_text()
126
+ if not contents.strip():
127
+ continue
128
+ endpoint_json = json.loads(contents)
129
+ except (json.JSONDecodeError, OSError):
130
+ # Skip files being written concurrently or otherwise unreadable
131
132
container = self._docker_client.get_endpoint_container(
133
endpoint_name=endpoint_json.get("name"), include_stopped=True
134
)
0 commit comments