Skip to content

Commit

Permalink
feat: introduce parameters for faulty tools detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamantios committed Dec 20, 2024
1 parent 6270c07 commit 4221c57
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/valory/agents/trader/aea-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ models:
requester_staking_instance_address: ${str:0x0000000000000000000000000000000000000000}
response_timeout: ${int:300}
expected_mech_response_time: ${int:300}
mech_invalid_response: ${str:Invalid Response}
mech_consecutive_failures_threshold: ${int:2}
tool_quarantine_duration: ${int:18000}
benchmarking_mode:
args:
enabled: ${bool:false}
Expand Down
12 changes: 12 additions & 0 deletions packages/valory/services/trader/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ type: skill
mech_interaction_sleep_time: ${MECH_INTERACTION_SLEEP_TIME:int:10}
policy_store_update_offset: ${POLICY_STORE_UPDATE_OFFSET:int:259200}
expected_mech_response_time: ${EXPECTED_MECH_RESPONSE_TIME:int:300}
mech_invalid_response: ${MECH_INVALID_RESPONSE:str:Invalid Response}
mech_consecutive_failures_threshold: ${MECH_CONSECUTIVE_FAILURES_THRESHOLD:int:2}
tool_quarantine_duration: ${TOOL_QUARANTINE_DURATION:int:18000}
benchmark_tool: &id004
args:
log_dir: ${LOG_DIR:str:/benchmarks}
Expand Down Expand Up @@ -368,6 +371,9 @@ type: skill
mech_interaction_sleep_time: ${MECH_INTERACTION_SLEEP_TIME:int:10}
policy_store_update_offset: ${POLICY_STORE_UPDATE_OFFSET:int:259200}
expected_mech_response_time: ${EXPECTED_MECH_RESPONSE_TIME:int:300}
mech_invalid_response: ${MECH_INVALID_RESPONSE:str:Invalid Response}
mech_consecutive_failures_threshold: ${MECH_CONSECUTIVE_FAILURES_THRESHOLD:int:2}
tool_quarantine_duration: ${TOOL_QUARANTINE_DURATION:int:18000}
benchmark_tool: *id004
acc_info_fields: *id005
network_subgraph: *id006
Expand Down Expand Up @@ -486,6 +492,9 @@ type: skill
mech_interaction_sleep_time: ${MECH_INTERACTION_SLEEP_TIME:int:10}
policy_store_update_offset: ${POLICY_STORE_UPDATE_OFFSET:int:259200}
expected_mech_response_time: ${EXPECTED_MECH_RESPONSE_TIME:int:300}
mech_invalid_response: ${MECH_INVALID_RESPONSE:str:Invalid Response}
mech_consecutive_failures_threshold: ${MECH_CONSECUTIVE_FAILURES_THRESHOLD:int:2}
tool_quarantine_duration: ${TOOL_QUARANTINE_DURATION:int:18000}
benchmark_tool: *id004
acc_info_fields: *id005
network_subgraph: *id006
Expand Down Expand Up @@ -604,6 +613,9 @@ type: skill
mech_interaction_sleep_time: ${MECH_INTERACTION_SLEEP_TIME:int:10}
policy_store_update_offset: ${POLICY_STORE_UPDATE_OFFSET:int:259200}
expected_mech_response_time: ${EXPECTED_MECH_RESPONSE_TIME:int:300}
mech_invalid_response: ${MECH_INVALID_RESPONSE:str:Invalid Response}
mech_consecutive_failures_threshold: ${MECH_CONSECUTIVE_FAILURES_THRESHOLD:int:2}
tool_quarantine_duration: ${TOOL_QUARANTINE_DURATION:int:18000}
benchmark_tool: *id004
acc_info_fields: *id005
network_subgraph: *id006
Expand Down
3 changes: 3 additions & 0 deletions packages/valory/services/trader_pearl/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ models:
response_timeout: ${RESPONSE_TIMEOUT:int:300}
policy_store_update_offset: ${POLICY_STORE_UPDATE_OFFSET:int:259200}
expected_mech_response_time: ${EXPECTED_MECH_RESPONSE_TIME:int:300}
mech_invalid_response: ${MECH_INVALID_RESPONSE:str:Invalid Response}
mech_consecutive_failures_threshold: ${MECH_CONSECUTIVE_FAILURES_THRESHOLD:int:2}
tool_quarantine_duration: ${TOOL_QUARANTINE_DURATION:int:18000}
benchmark_tool:
args:
log_dir: /benchmarks
Expand Down
9 changes: 9 additions & 0 deletions packages/valory/skills/decision_maker_abci/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,15 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
self.expected_mech_response_time = self._ensure(
"expected_mech_response_time", kwargs, int
)
self.mech_invalid_response: str = self._ensure(
"mech_invalid_response", kwargs, str
)
self.policy_threshold: int = self._ensure(
"mech_consecutive_failures_threshold", kwargs, int
)
self.tool_quarantine_duration: int = self._ensure(
"tool_quarantine_duration", kwargs, int
)
super().__init__(*args, **kwargs)

@property
Expand Down
3 changes: 3 additions & 0 deletions packages/valory/skills/decision_maker_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@ models:
response_timeout: 300
agent_balance_threshold: 10000000000000000
expected_mech_response_time: 300
mech_invalid_response: Invalid Response
mech_consecutive_failures_threshold: 2
tool_quarantine_duration: 18000
class_name: DecisionMakerParams
benchmarking_mode:
args:
Expand Down
3 changes: 3 additions & 0 deletions packages/valory/skills/trader_abci/skill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ models:
requester_staking_instance_address: '0x0000000000000000000000000000000000000000'
response_timeout: 300
expected_mech_response_time: 300
mech_invalid_response: Invalid Response
mech_consecutive_failures_threshold: 2
tool_quarantine_duration: 18000
class_name: TraderParams
benchmarking_mode:
args:
Expand Down

0 comments on commit 4221c57

Please sign in to comment.