cyberosa commited on
Commit
66dc719
·
1 Parent(s): 2f097fe

updating scripts and weekly data

Browse files
active_traders.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8f40e49e6b718be454621c94daf4a053e0a484aa438905db8ac2aecceb25d0d5
3
- size 85246
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:346ccc09db23177e78ffa171831d8c9f03bfff093127dac53ead53d13cd699e1
3
+ size 117739
all_trades_profitability.parquet.gz CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8b223ea9e867dea67304aaf3f1c15eb735f71aebed670c7456ae821a7acf9e4d
3
- size 8605963
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f10b6cc944fc93de531b52a1e6e2a7af4fc8bde740faa0c62b8c85890431b6d0
3
+ size 7700097
closed_market_metrics.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:44d1001764de03fee34928cc160644d9929fe0d6c25793335aff1caf5192434c
3
- size 131680
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:32e5f02288b7007912fb9c43c6c955fcd57e7ecb9716e6c1bbbbc9669c73c82f
3
+ size 124695
closed_markets_div.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ebe163d4d3e33e856fb3027a9825e1511c21a747ee5e9abf4327c098e43b595d
3
- size 86943
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02137a305190cae5ec8fee9f780c29b36d9fd185a5b8e8406499823ec6840c1d
3
+ size 77529
daily_info.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8cdc3e1ea0d9a8fc50cb9332ff9d07849331b758f92fae0c1e9b6c54db9e01b1
3
- size 1988594
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1930de91347fbba5b5bc9cd1f06d15f16d5f5f05cce9298897d9178fb5b84c24
3
+ size 3486823
daily_mech_requests.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:b48a239b687487a1bcfb600f1c4a349f63bdb58cb0b713f82ce21b0fb15045eb
3
- size 10551
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3a8f50980b501de7ddccc126a89d10bfabc324f306d02ce8866b4e2d57f856cb
3
+ size 10542
error_by_markets.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ec71562860cca20e54e28dd84be086e25aa43d3bfb5909f9b427c15797777adc
3
- size 11939
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bc530d0c883b3410ef664ef3e350b9fc0bdae8115a38e710de910921ddd2dc83
3
+ size 11426
errors_by_mech.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c71ec8c4f8069ee7e5f82fae7bbcd3f60f32d70d769832888666508ea76417b7
3
- size 5125
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e4d67789776dc7a8626875dc58d429a816c48a6e9f7899c217a005402649ee1f
3
+ size 5361
invalid_trades.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:699f6d38cabb70ddbc3958403db11a0ce7fc6b1e2bf223e1b164c598aa469067
3
- size 116581
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7ca96c94633cc124e8208716e6cde6e79b10af98c2495738106f517ce9ef9057
3
+ size 117613
retention_activity.parquet.gz CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9869e4ed24339bf16b7e8af0d128ce2a7762c49dfa793adb1df4910bbbe59c06
3
- size 5897848
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:451f3afa24c78f6663e5280dda827ba52eea2811bce971bd4aa240e2a09a12fa
3
+ size 6576832
scripts/active_traders.py CHANGED
@@ -2,6 +2,8 @@ import pandas as pd
2
  import pickle
3
  from web3_utils import ROOT_DIR, TMP_DIR
4
  from staking import check_list_addresses
 
 
5
 
6
 
7
  def get_trader_type(address: str, service_map: dict) -> str:
@@ -23,6 +25,7 @@ def compute_active_traders_dataset():
23
  service_map = pickle.load(f)
24
  # read tools info
25
  tools_df = pd.read_parquet(TMP_DIR / "tools.parquet")
 
26
  # rename the request_month_year_week
27
  tools_df.rename(
28
  columns={"request_month_year_week": "month_year_week"}, inplace=True
 
2
  import pickle
3
  from web3_utils import ROOT_DIR, TMP_DIR
4
  from staking import check_list_addresses
5
+ from tools_metrics import prepare_tools
6
+ import pandas as pd
7
 
8
 
9
  def get_trader_type(address: str, service_map: dict) -> str:
 
25
  service_map = pickle.load(f)
26
  # read tools info
27
  tools_df = pd.read_parquet(TMP_DIR / "tools.parquet")
28
+ tools_df = prepare_tools(tools_df)
29
  # rename the request_month_year_week
30
  tools_df.rename(
31
  columns={"request_month_year_week": "month_year_week"}, inplace=True
scripts/pull_data.py CHANGED
@@ -120,7 +120,7 @@ def only_new_weekly_analysis():
120
 
121
  add_current_answer("new_tools.parquet")
122
 
123
- # # Run profitability analysis
124
  logging.info("Running profitability analysis")
125
  run_profitability_analysis(
126
  tools_filename="new_tools.parquet",
@@ -135,14 +135,14 @@ def only_new_weekly_analysis():
135
 
136
  save_historical_data()
137
  try:
138
- clean_old_data_from_parquet_files("2025-02-01")
139
  clean_old_data_from_json_files()
140
  except Exception as e:
141
  print("Error cleaning the oldest information from parquet files")
142
  print(f"reason = {e}")
143
  compute_tools_accuracy()
144
  compute_tools_based_datasets()
145
- # # move to tmp folder the new generated files
146
  move_files()
147
  logging.info("Weekly analysis files generated and saved")
148
 
@@ -170,11 +170,11 @@ def restoring_trades_data(from_date: str, to_date: str):
170
 
171
 
172
  if __name__ == "__main__":
173
- # only_new_weekly_analysis()
174
  # save_historical_data()
175
  # try:
176
  # clean_old_data_from_parquet_files("2025-01-23")
177
  # except Exception as e:
178
  # print("Error cleaning the oldest information from parquet files")
179
  # print(f"reason = {e}")
180
- add_current_answer("tools.parquet")
 
120
 
121
  add_current_answer("new_tools.parquet")
122
 
123
+ # Run profitability analysis
124
  logging.info("Running profitability analysis")
125
  run_profitability_analysis(
126
  tools_filename="new_tools.parquet",
 
135
 
136
  save_historical_data()
137
  try:
138
+ clean_old_data_from_parquet_files("2025-02-18")
139
  clean_old_data_from_json_files()
140
  except Exception as e:
141
  print("Error cleaning the oldest information from parquet files")
142
  print(f"reason = {e}")
143
  compute_tools_accuracy()
144
  compute_tools_based_datasets()
145
+ # move to tmp folder the new generated files
146
  move_files()
147
  logging.info("Weekly analysis files generated and saved")
148
 
 
170
 
171
 
172
  if __name__ == "__main__":
173
+ only_new_weekly_analysis()
174
  # save_historical_data()
175
  # try:
176
  # clean_old_data_from_parquet_files("2025-01-23")
177
  # except Exception as e:
178
  # print("Error cleaning the oldest information from parquet files")
179
  # print(f"reason = {e}")
180
+ # add_current_answer("tools.parquet")
scripts/tools_metrics.py CHANGED
@@ -114,6 +114,7 @@ def get_errors_by_mech_address(
114
 
115
 
116
  def compute_tools_based_datasets():
 
117
  try:
118
  tools_df = pd.read_parquet(TMP_DIR / "tools.parquet")
119
  tools_df = prepare_tools(tools_df)
 
114
 
115
 
116
  def compute_tools_based_datasets():
117
+ print("Computing tools based datasets")
118
  try:
119
  tools_df = pd.read_parquet(TMP_DIR / "tools.parquet")
120
  tools_df = prepare_tools(tools_df)
scripts/update_tools_accuracy.py CHANGED
@@ -5,6 +5,7 @@ from utils import INC_TOOLS
5
  from typing import List
6
  from utils import TMP_DIR, ROOT_DIR
7
 
 
8
  ACCURACY_FILENAME = "tools_accuracy.csv"
9
  IPFS_SERVER = "/dns/registry.autonolas.tech/tcp/443/https"
10
  GCP_IPFS_SERVER = "/dns/registry.gcp.autonolas.tech/tcp/443/https"
 
5
  from typing import List
6
  from utils import TMP_DIR, ROOT_DIR
7
 
8
+
9
  ACCURACY_FILENAME = "tools_accuracy.csv"
10
  IPFS_SERVER = "/dns/registry.autonolas.tech/tcp/443/https"
11
  GCP_IPFS_SERVER = "/dns/registry.gcp.autonolas.tech/tcp/443/https"
scripts/web3_utils.py CHANGED
@@ -161,7 +161,7 @@ def updating_timestamps(rpc: str, tools_filename: str):
161
  t_map.update(new_timestamps)
162
 
163
  # filtering old timestamps
164
- cutoff_date = datetime(2024, 9, 9)
165
  filtered_map = {
166
  k: v
167
  for k, v in t_map.items()
 
161
  t_map.update(new_timestamps)
162
 
163
  # filtering old timestamps
164
+ cutoff_date = datetime(2025, 2, 18)
165
  filtered_map = {
166
  k: v
167
  for k, v in t_map.items()
service_map.pkl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:67547e4484fcfb3f7a929ec3c37a69740ad963e5949aecf06d41051a8bda9ca5
3
- size 201040
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1dbde1804d1a2ed976df038d551a62259e1a5f8fd864de0a502a7ac1eacae5e
3
+ size 203458
tools_accuracy.csv CHANGED
@@ -1,13 +1,13 @@
1
  tool,tool_accuracy,total_requests,min,max
2
- claude-prediction-offline,62.43682707097341,54612,2025-02-01 10:54:20,2025-03-31 23:28:15
3
- claude-prediction-online,63.81170925328703,32248,2025-02-01 00:00:35,2025-04-01 02:23:45
4
- prediction-offline,54.89672711443071,174586,2025-02-01 00:00:05,2025-04-01 23:42:30
5
- prediction-offline-sme,46.28849270664506,6170,2025-02-01 02:48:10,2025-03-31 23:38:20
6
- prediction-online,44.92406075139888,5004,2025-02-01 09:17:30,2025-04-01 07:14:40
7
- prediction-online-sme,43.25597040026909,2973,2025-02-01 08:10:05,2025-03-31 19:30:00
8
- prediction-request-rag,47.11246200607903,329,2025-02-01 10:59:45,2025-03-30 15:16:40
9
- prediction-request-rag-claude,52.18978102189781,274,2025-02-01 12:16:20,2025-03-31 17:22:45
10
- prediction-request-reasoning,49.67020722129365,55641,2025-02-01 08:10:20,2025-04-01 14:44:05
11
- prediction-request-reasoning-claude,67.1280276816609,289,2025-02-01 16:41:35,2025-03-30 11:22:00
12
- prediction-url-cot-claude,55.223880597014926,804,2025-02-01 03:39:30,2025-03-31 19:26:25
13
- superforcaster,54.956591964465986,9906,2025-02-01 00:02:25,2025-04-01 22:06:25
 
1
  tool,tool_accuracy,total_requests,min,max
2
+ claude-prediction-offline,60.82916174894524,73713,2025-02-18 00:15:25,2025-04-17 01:31:35
3
+ claude-prediction-online,62.72578365158077,44567,2025-02-18 00:00:10,2025-04-17 06:41:30
4
+ prediction-offline,55.68178522049369,310281,2025-02-18 00:00:10,2025-04-17 23:46:35
5
+ prediction-offline-sme,44.511070110701105,4336,2025-02-18 00:07:45,2025-04-16 20:38:00
6
+ prediction-online,45.12924844423169,8356,2025-02-18 08:27:50,2025-04-17 17:17:15
7
+ prediction-online-sme,46.00216684723727,4615,2025-02-18 09:58:50,2025-04-17 23:42:20
8
+ prediction-request-rag,41.60756501182033,423,2025-02-18 12:21:30,2025-04-16 17:09:10
9
+ prediction-request-rag-claude,55.06329113924051,316,2025-02-18 13:44:25,2025-04-16 14:10:25
10
+ prediction-request-reasoning,51.86754608988294,81417,2025-02-18 08:03:55,2025-04-17 23:42:30
11
+ prediction-request-reasoning-claude,61.627906976744185,344,2025-02-18 10:40:05,2025-04-16 14:57:40
12
+ prediction-url-cot-claude,60.763888888888886,1152,2025-02-18 01:08:25,2025-04-15 18:24:40
13
+ superforcaster,52.090072157253054,16076,2025-02-18 00:00:35,2025-04-17 18:00:00
unknown_traders.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8ab6349dd420802be883d9b60212bac3c13439cb175168f4a2dbc014e4e60e6b
3
- size 1124658
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c04c31179f273df635cdac244c8af09103cc53359c17498a210d3d7d837a8457
3
+ size 1201470
weekly_mech_calls.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:03d1e3fb4dd7bd58f44cc5f3a0afb0f89ea5d4b4ba07b9e9f42f5734e3346fc8
3
- size 59924
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ed965804af45d48c316b7496b982f597d495d7005a2a8ef398fc76d17970090b
3
+ size 55067
winning_df.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:43e6d3c7367771c0816f3f007eb9f3afd13f160abe14411a7d8f154cc157651a
3
- size 11807
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4fc791faf81f85eb6b516a01e99d7fe9609418ea4ccdab07ee34292bcf01a797
3
+ size 11333