From 9dd9f15ef494fe73322eee5b6d0ac9e39a92cad8 Mon Sep 17 00:00:00 2001 From: jmoreira-valory Date: Fri, 28 Jun 2024 13:24:43 +0200 Subject: [PATCH 1/4] fix: wrong env file path --- run_service.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_service.sh b/run_service.sh index cb91cfa6..41340b94 100755 --- a/run_service.sh +++ b/run_service.sh @@ -499,7 +499,7 @@ create_storage() { ' This folder contains crucial configuration information and autogenerated keys for your Trader agent.\n' \ ' Please back up this folder and be cautious if you are modifying or sharing these files to avoid potential asset loss.' > "../$store_readme_path" - dotenv_set_key "$env_file_path" "SUBGRAPH_API_KEY" "$SUBGRAPH_API_KEY" true + dotenv_set_key "../$env_file_path" "SUBGRAPH_API_KEY" "$SUBGRAPH_API_KEY" true dotenv_set_key "../$env_file_path" "USE_STAKING" "$USE_STAKING" AGENT_ID=14 From 52b7cc4897e5da9b6634c5341c2a600557db9398 Mon Sep 17 00:00:00 2001 From: jmoreira-valory Date: Fri, 28 Jun 2024 13:27:57 +0200 Subject: [PATCH 2/4] chore: exclude tool --- run_service.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_service.sh b/run_service.sh index 41340b94..171b7ffe 100755 --- a/run_service.sh +++ b/run_service.sh @@ -1103,7 +1103,7 @@ export BET_THRESHOLD=100000000000000000 export TRADING_STRATEGY=kelly_criterion_no_conf export STRATEGIES_KWARGS='[["bet_kelly_fraction",1.5],["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":60000000000000000,"0.7":80000000000000000,"0.8":160000000000000000,"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='["native-transfer","prediction-online-lite","claude-prediction-online-lite","prediction-online-sme-lite","prediction-request-reasoning-lite","prediction-request-reasoning-claude-lite","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 IRRELEVANT_TOOLS='["prediction-request-reasoning","native-transfer","prediction-online-lite","claude-prediction-online-lite","prediction-online-sme-lite","prediction-request-reasoning-lite","prediction-request-reasoning-claude-lite","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 From aee907e0e198cd5fb2a9c9bb5b7f215174ed6d3e Mon Sep 17 00:00:00 2001 From: jmoreira-valory Date: Fri, 28 Jun 2024 14:39:39 +0200 Subject: [PATCH 3/4] chore: revert change --- run_service.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_service.sh b/run_service.sh index 171b7ffe..41340b94 100755 --- a/run_service.sh +++ b/run_service.sh @@ -1103,7 +1103,7 @@ export BET_THRESHOLD=100000000000000000 export TRADING_STRATEGY=kelly_criterion_no_conf export STRATEGIES_KWARGS='[["bet_kelly_fraction",1.5],["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":60000000000000000,"0.7":80000000000000000,"0.8":160000000000000000,"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='["prediction-request-reasoning","native-transfer","prediction-online-lite","claude-prediction-online-lite","prediction-online-sme-lite","prediction-request-reasoning-lite","prediction-request-reasoning-claude-lite","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 IRRELEVANT_TOOLS='["native-transfer","prediction-online-lite","claude-prediction-online-lite","prediction-online-sme-lite","prediction-request-reasoning-lite","prediction-request-reasoning-claude-lite","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 From 7390f4f219498e5d17d821f7f62545db86f4496f Mon Sep 17 00:00:00 2001 From: jmoreira-valory Date: Fri, 28 Jun 2024 15:49:32 +0200 Subject: [PATCH 4/4] fix: check missing file --- run_service.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/run_service.sh b/run_service.sh index 41340b94..486aeaf3 100755 --- a/run_service.sh +++ b/run_service.sh @@ -1060,11 +1060,13 @@ fi # ensure Safe owner is agent # (This may occur if update flow was interrupted) -service_safe_address=$(<"../$service_safe_address_path") -current_safe_owners=$(poetry run python "../scripts/get_safe_owners.py" "$service_safe_address" "../$agent_pkey_path" "$rpc" $password_argument | awk '{gsub(/"/, "\047", $0); print $0}') -if [[ "$current_safe_owners" == "['$operator_address']" ]]; then - echo "[Operator] Swapping Safe owner..." - poetry run python "../scripts/swap_safe_owner.py" "$service_safe_address" "../$operator_pkey_path" "$agent_address" "$rpc" $password_argument +if [[ -f "../$service_safe_address_path" ]]; then + service_safe_address=$(<"../$service_safe_address_path") + current_safe_owners=$(poetry run python "../scripts/get_safe_owners.py" "$service_safe_address" "../$agent_pkey_path" "$rpc" $password_argument | awk '{gsub(/"/, "\047", $0); print $0}') + if [[ "$current_safe_owners" == "['$operator_address']" ]]; then + echo "[Operator] Swapping Safe owner..." + poetry run python "../scripts/swap_safe_owner.py" "$service_safe_address" "../$operator_pkey_path" "$agent_address" "$rpc" $password_argument + fi fi