Skip to content

Commit

Permalink
Merge pull request #274 from valory-xyz/develop
Browse files Browse the repository at this point in the history
Release v0.14.3
  • Loading branch information
dagacha authored Apr 26, 2024
2 parents 1af3242 + 67be72a commit 9db1618
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
14 changes: 8 additions & 6 deletions run_service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -604,11 +604,6 @@ export CUSTOM_GNOSIS_SAFE_SAME_ADDRESS_MULTISIG_ADDRESS="0x6e7f594f680f7aBad18b7
export CUSTOM_MULTISEND_ADDRESS="0x40A2aCCbd92BCA938b02010E17A5b8929b49130D"
export WXDAI_ADDRESS="0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d"
export MECH_CONTRACT_ADDRESS="0x77af31De935740567Cf4fF1986D04B2c964A786a"
export MECH_WRAPPED_NATIVE_TOKEN_ADDRESS=$WXDAI_ADDRESS
export DISABLE_TRADING=false
export STOP_TRADING_IF_STAKING_KPI_MET=true
export RESET_PAUSE_DURATION=120
export MECH_CHAIN_ID=ethereum

# check if USE_NEVERMINED is set to true
if [ "$USE_NEVERMINED" == "true" ];
Expand Down Expand Up @@ -1063,8 +1058,15 @@ export OMEN_CREATORS='["0x89c5cc945dd550BcFfb72Fe42BfF002429F46Fec"]'
# 10 cents minimum bet amount. Also, the bet will not be placed if expected returns - bet_threshold <= 0
export BET_THRESHOLD=100000000000000000
export TRADING_STRATEGY=kelly_criterion
export STRATEGIES_KWARGS='[["bet_kelly_fraction",1],["floor_balance",500000000000000000],["bet_amount_per_threshold",{"0.0":0,"0.1":0,"0.2":0,"0.3":0,"0.4":0,"0.5":0,"0.6":30000000000000000,"0.7":40000000000000000,"0.8":80000000000000000,"0.9":1000000000000000000,"1.0":1000000000000000000}]]'
export PROMPT_TEMPLATE="Please take over the role of a Data Scientist to evaluate the given question. With the given question \"@{question}\" and the \`yes\` option represented by \`@{yes}\` and the \`no\` option represented by \`@{no}\`, what are the respective probabilities of \`p_yes\` and \`p_no\` occurring?"
export IRRELEVANT_TOOLS='["claude-prediction-online","prediction-request-reasoning","prediction-online","prediction-offline","prediction-offline-sme","deepmind-optimization", "deepmind-optimization-strong", "openai-gpt-3.5-turbo", "openai-gpt-3.5-turbo-instruct", "openai-gpt-4", "openai-text-davinci-002", "openai-text-davinci-003", "prediction-online-sum-url-content", "prediction-online-summarized-info", "stabilityai-stable-diffusion-512-v2-1", "stabilityai-stable-diffusion-768-v2-1", "stabilityai-stable-diffusion-v1-5", "stabilityai-stable-diffusion-xl-beta-v2-2-2"]'
export IRRELEVANT_TOOLS='["prediction-request-rag","prediction-request-reasoning-claude","prediction-url-cot-claude","claude-prediction-offline","claude-prediction-online","prediction-offline-sme","deepmind-optimization", "deepmind-optimization-strong", "openai-gpt-3.5-turbo", "openai-gpt-3.5-turbo-instruct", "openai-gpt-4", "openai-text-davinci-002", "openai-text-davinci-003", "prediction-online-sum-url-content", "prediction-online-summarized-info", "stabilityai-stable-diffusion-512-v2-1", "stabilityai-stable-diffusion-768-v2-1", "stabilityai-stable-diffusion-v1-5", "stabilityai-stable-diffusion-xl-beta-v2-2-2"]'
export STAKING_CONTRACT_ADDRESS=$CUSTOM_STAKING_ADDRESS
export DISABLE_TRADING=false
export STOP_TRADING_IF_STAKING_KPI_MET=true
export RESET_PAUSE_DURATION=120
export MECH_WRAPPED_NATIVE_TOKEN_ADDRESS=$WXDAI_ADDRESS
export MECH_CHAIN_ID=ethereum

service_dir="trader_service"
build_dir="abci_build"
Expand Down
9 changes: 8 additions & 1 deletion scripts/mech_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import json
import os
import sys
import time
from dataclasses import dataclass
from pathlib import Path
Expand Down Expand Up @@ -166,6 +167,12 @@ def _read_mech_events_data_from_file() -> Dict[str, Any]:
except FileNotFoundError:
mech_events_data = {}
mech_events_data["db_version"] = MECH_EVENTS_DB_VERSION
except json.decoder.JSONDecodeError:
print(
f'\nERROR: The local Mech events database "{MECH_EVENTS_JSON_PATH.resolve()}" is corrupted. Please try delete or rename the file, and run the script again.'
)
sys.exit(1)

return mech_events_data


Expand Down Expand Up @@ -302,7 +309,7 @@ def get_mech_requests(
all_mech_events = _get_mech_events(sender, MechRequest)
filtered_mech_events = {}
for event_id, event_data in all_mech_events.items():
block_timestamp = event_data["block_timestamp"]
block_timestamp = int(event_data["block_timestamp"])
if from_timestamp <= block_timestamp <= to_timestamp:
filtered_mech_events[event_id] = event_data

Expand Down

0 comments on commit 9db1618

Please sign in to comment.