Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Commit e4bee85

Browse files
authored
fix: catch exception due to subgraph removal (#21)
* fix: catch exception due to subgraph removal Signed-off-by: madumas <madumas@madumas.ca> * style: format Signed-off-by: madumas <madumas@madumas.ca> * fix: re-raise exception Signed-off-by: madumas <madumas@madumas.ca> * fix: missing import Signed-off-by: madumas <madumas@madumas.ca> * fix: isort Signed-off-by: madumas <madumas@madumas.ca> Signed-off-by: madumas <madumas@madumas.ca>
1 parent 44609bc commit e4bee85

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

autoagora/price_multiplier.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright 2022-, Semiotic AI, Inc.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
import asyncio
45
import logging
56

67
from autoagora_agents.agent_factory import AgentFactory
@@ -104,6 +105,9 @@ async def price_bandit_loop(subgraph: str):
104105
loss = bandit.update_policy()
105106
if loss is not None:
106107
logging.debug("Price bandit %s - Training loss: %s", subgraph, loss)
108+
except asyncio.CancelledError as cancelledError:
109+
logging.debug("Price bandit %s - Removing bandit loop", subgraph)
110+
raise cancelledError
107111
except:
108112
logging.exception("price_bandit_loop error")
109113
exit(-1)

0 commit comments

Comments
 (0)