cyberosa commited on
Commit ·
d363a89
1
Parent(s): 3adb1b6
daily data and adjustments on the file name for removing old json files
Browse files- active_traders.parquet +2 -2
- all_trades_profitability.parquet.gz +2 -2
- closed_market_metrics.parquet +2 -2
- closed_markets_div.parquet +2 -2
- daily_info.parquet +2 -2
- daily_mech_requests.parquet +2 -2
- error_by_markets.parquet +2 -2
- errors_by_mech.parquet +2 -2
- invalid_trades.parquet +2 -2
- retention_activity.parquet.gz +2 -2
- scripts/get_mech_info.py +4 -4
- scripts/pull_data.py +1 -1
- scripts/tools.py +2 -57
- service_map.pkl +2 -2
- tools_accuracy.csv +12 -12
- unknown_traders.parquet +2 -2
- weekly_mech_calls.parquet +2 -2
- winning_df.parquet +2 -2
active_traders.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8f40e49e6b718be454621c94daf4a053e0a484aa438905db8ac2aecceb25d0d5
|
| 3 |
+
size 85246
|
all_trades_profitability.parquet.gz
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8b223ea9e867dea67304aaf3f1c15eb735f71aebed670c7456ae821a7acf9e4d
|
| 3 |
+
size 8605963
|
closed_market_metrics.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:44d1001764de03fee34928cc160644d9929fe0d6c25793335aff1caf5192434c
|
| 3 |
+
size 131680
|
closed_markets_div.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ebe163d4d3e33e856fb3027a9825e1511c21a747ee5e9abf4327c098e43b595d
|
| 3 |
+
size 86943
|
daily_info.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8cdc3e1ea0d9a8fc50cb9332ff9d07849331b758f92fae0c1e9b6c54db9e01b1
|
| 3 |
+
size 1988594
|
daily_mech_requests.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8d31ad9b43b30b4150ffd56ce7415f32b06948175a7741a84528193cc3c2f5a0
|
| 3 |
+
size 10517
|
error_by_markets.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ee7141ac13bf0744360073500864040fe4dec86ac580d66542cf2b74b31f76e0
|
| 3 |
+
size 11931
|
errors_by_mech.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a9e8eac7c054dbdb29cd9956bc2c345935fc68cb446398764968c1f31100d9f5
|
| 3 |
+
size 5110
|
invalid_trades.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:699f6d38cabb70ddbc3958403db11a0ce7fc6b1e2bf223e1b164c598aa469067
|
| 3 |
+
size 116581
|
retention_activity.parquet.gz
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9869e4ed24339bf16b7e8af0d128ce2a7762c49dfa793adb1df4910bbbe59c06
|
| 3 |
+
size 5897848
|
scripts/get_mech_info.py
CHANGED
|
@@ -147,25 +147,25 @@ def clean_old_data_from_json_files():
|
|
| 147 |
|
| 148 |
remove_old_entries(
|
| 149 |
input_file="mech_requests.json",
|
| 150 |
-
output_file="
|
| 151 |
min_block_number=min_block_number,
|
| 152 |
)
|
| 153 |
|
| 154 |
remove_old_entries(
|
| 155 |
input_file="mech_delivers.json",
|
| 156 |
-
output_file="
|
| 157 |
min_block_number=min_block_number,
|
| 158 |
)
|
| 159 |
|
| 160 |
remove_old_entries(
|
| 161 |
input_file="merged_requests.json",
|
| 162 |
-
output_file="
|
| 163 |
min_block_number=min_block_number,
|
| 164 |
)
|
| 165 |
|
| 166 |
remove_old_entries(
|
| 167 |
input_file="tools_info.json",
|
| 168 |
-
output_file="
|
| 169 |
min_block_number=min_block_number,
|
| 170 |
)
|
| 171 |
except Exception as e:
|
|
|
|
| 147 |
|
| 148 |
remove_old_entries(
|
| 149 |
input_file="mech_requests.json",
|
| 150 |
+
output_file="mech_requests.json",
|
| 151 |
min_block_number=min_block_number,
|
| 152 |
)
|
| 153 |
|
| 154 |
remove_old_entries(
|
| 155 |
input_file="mech_delivers.json",
|
| 156 |
+
output_file="mech_delivers.json",
|
| 157 |
min_block_number=min_block_number,
|
| 158 |
)
|
| 159 |
|
| 160 |
remove_old_entries(
|
| 161 |
input_file="merged_requests.json",
|
| 162 |
+
output_file="merged_requests.json",
|
| 163 |
min_block_number=min_block_number,
|
| 164 |
)
|
| 165 |
|
| 166 |
remove_old_entries(
|
| 167 |
input_file="tools_info.json",
|
| 168 |
+
output_file="tools_info.json",
|
| 169 |
min_block_number=min_block_number,
|
| 170 |
)
|
| 171 |
except Exception as e:
|
scripts/pull_data.py
CHANGED
|
@@ -135,7 +135,7 @@ def only_new_weekly_analysis():
|
|
| 135 |
|
| 136 |
save_historical_data()
|
| 137 |
try:
|
| 138 |
-
clean_old_data_from_parquet_files("2025-01
|
| 139 |
clean_old_data_from_json_files()
|
| 140 |
except Exception as e:
|
| 141 |
print("Error cleaning the oldest information from parquet files")
|
|
|
|
| 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")
|
scripts/tools.py
CHANGED
|
@@ -388,6 +388,7 @@ def remove_old_entries(
|
|
| 388 |
print(f"Removing older entries than {min_block_number} in {input_file}")
|
| 389 |
|
| 390 |
try:
|
|
|
|
| 391 |
with open(JSON_DATA_DIR / input_file, "r") as file:
|
| 392 |
input_contents = json.load(file)
|
| 393 |
print(f"Initial lenght of items = {len(input_contents)}")
|
|
@@ -395,67 +396,11 @@ def remove_old_entries(
|
|
| 395 |
input_file, input_contents, min_block_number
|
| 396 |
)
|
| 397 |
print(f"Final lenght of filtered items = {len(output_content)}")
|
|
|
|
| 398 |
save_json_file(output_content, filename=output_file)
|
| 399 |
except Exception as e:
|
| 400 |
print(f"An Exception happened while filtering the json events {e}")
|
| 401 |
|
| 402 |
-
# with open(JSON_DATA_DIR / output_file, "w") as out_f:
|
| 403 |
-
# # Open the input file for reading
|
| 404 |
-
# with open(JSON_DATA_DIR / input_file, "r") as in_f:
|
| 405 |
-
# # Use ijson to parse the JSON file in chunks
|
| 406 |
-
# parser = ijson.parse(in_f)
|
| 407 |
-
# # Create a dictionary to hold the filtered items
|
| 408 |
-
# filtered_items = []
|
| 409 |
-
# current_item = {}
|
| 410 |
-
# for prefix, event, value in parser:
|
| 411 |
-
# print(f"prefix={prefix}, event={event} and value={value}")
|
| 412 |
-
|
| 413 |
-
# # Check if we are starting a new dictionary
|
| 414 |
-
# if event =='map_key' and prefix=="":
|
| 415 |
-
# selected_item = False
|
| 416 |
-
# current_item = {}
|
| 417 |
-
# current_item["id"]= value
|
| 418 |
-
# elif event == ""
|
| 419 |
-
# if ("blockNumber" in prefix and int(value)>=min_block_number):
|
| 420 |
-
# # TODO select the entry
|
| 421 |
-
|
| 422 |
-
# if event == "map_key" and value =="blockNumber":
|
| 423 |
-
# # Check if the value is not None (i.e., we are at the start of a new dictionary)
|
| 424 |
-
# if value is not None:
|
| 425 |
-
# pass
|
| 426 |
-
# # If the value is None, we are at the end of a dictionary
|
| 427 |
-
# else:
|
| 428 |
-
# # Filter the item based on the threshold
|
| 429 |
-
# if (
|
| 430 |
-
# "item.blockNumber" in prefix
|
| 431 |
-
# and int(current_item.get("blockNumber", "0"))
|
| 432 |
-
# >= min_block_number
|
| 433 |
-
# ):
|
| 434 |
-
# filtered_items.append(current_item)
|
| 435 |
-
# else:
|
| 436 |
-
# print("Older block. Removed")
|
| 437 |
-
# # Write the filtered items to the output file in chunks
|
| 438 |
-
# if (
|
| 439 |
-
# len(filtered_items) >= 1000
|
| 440 |
-
# ): # Adjust the chunk size as needed
|
| 441 |
-
# for item in filtered_items:
|
| 442 |
-
# json.dump(item, out_f)
|
| 443 |
-
# out_f.write("\n")
|
| 444 |
-
# filtered_items = []
|
| 445 |
-
# # If the event is a 'string' or a 'number', it's a key-value pair in the dictionary
|
| 446 |
-
# elif event in ["string", "number"]:
|
| 447 |
-
# # Get the key and value
|
| 448 |
-
# key = prefix.split(".")[-1]
|
| 449 |
-
# # Add the key-value pair to the current item
|
| 450 |
-
# current_item[key] = value
|
| 451 |
-
|
| 452 |
-
# print(f"Final lenght of filtered items = {len(filtered_items)}")
|
| 453 |
-
# # Write any remaining items
|
| 454 |
-
# if filtered_items:
|
| 455 |
-
# for item in filtered_items:
|
| 456 |
-
# json.dump(item, out_f)
|
| 457 |
-
# out_f.write("\n")
|
| 458 |
-
|
| 459 |
|
| 460 |
if __name__ == "__main__":
|
| 461 |
|
|
|
|
| 388 |
print(f"Removing older entries than {min_block_number} in {input_file}")
|
| 389 |
|
| 390 |
try:
|
| 391 |
+
output_content = {}
|
| 392 |
with open(JSON_DATA_DIR / input_file, "r") as file:
|
| 393 |
input_contents = json.load(file)
|
| 394 |
print(f"Initial lenght of items = {len(input_contents)}")
|
|
|
|
| 396 |
input_file, input_contents, min_block_number
|
| 397 |
)
|
| 398 |
print(f"Final lenght of filtered items = {len(output_content)}")
|
| 399 |
+
if len(output_content) > 0:
|
| 400 |
save_json_file(output_content, filename=output_file)
|
| 401 |
except Exception as e:
|
| 402 |
print(f"An Exception happened while filtering the json events {e}")
|
| 403 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 404 |
|
| 405 |
if __name__ == "__main__":
|
| 406 |
|
service_map.pkl
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:67547e4484fcfb3f7a929ec3c37a69740ad963e5949aecf06d41051a8bda9ca5
|
| 3 |
+
size 201040
|
tools_accuracy.csv
CHANGED
|
@@ -1,13 +1,13 @@
|
|
| 1 |
tool,tool_accuracy,total_requests,min,max
|
| 2 |
-
claude-prediction-offline,
|
| 3 |
-
claude-prediction-online,
|
| 4 |
-
prediction-offline,54.
|
| 5 |
-
prediction-offline-sme,
|
| 6 |
-
prediction-online,44.
|
| 7 |
-
prediction-online-sme,43.
|
| 8 |
-
prediction-request-rag,
|
| 9 |
-
prediction-request-rag-claude,
|
| 10 |
-
prediction-request-reasoning,49.
|
| 11 |
-
prediction-request-reasoning-claude,
|
| 12 |
-
prediction-url-cot-claude,55.
|
| 13 |
-
superforcaster,
|
|
|
|
| 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
|
unknown_traders.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8ab6349dd420802be883d9b60212bac3c13439cb175168f4a2dbc014e4e60e6b
|
| 3 |
+
size 1124658
|
weekly_mech_calls.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:03d1e3fb4dd7bd58f44cc5f3a0afb0f89ea5d4b4ba07b9e9f42f5734e3346fc8
|
| 3 |
+
size 59924
|
winning_df.parquet
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6c58823f7d3b04e4958da7935af6c6c111f4194e719642eccd1d3cd9870bed42
|
| 3 |
+
size 11337
|