Skip to content

Commit

Permalink
fix: catch exception due to subgraph removal (#21)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
madumas authored Nov 7, 2022
1 parent 44609bc commit e4bee85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions autoagora/price_multiplier.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright 2022-, Semiotic AI, Inc.
# SPDX-License-Identifier: Apache-2.0

import asyncio
import logging

from autoagora_agents.agent_factory import AgentFactory
Expand Down Expand Up @@ -104,6 +105,9 @@ async def price_bandit_loop(subgraph: str):
loss = bandit.update_policy()
if loss is not None:
logging.debug("Price bandit %s - Training loss: %s", subgraph, loss)
except asyncio.CancelledError as cancelledError:
logging.debug("Price bandit %s - Removing bandit loop", subgraph)
raise cancelledError
except:
logging.exception("price_bandit_loop error")
exit(-1)

0 comments on commit e4bee85

Please sign in to comment.