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 CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:42f6a48f06299c33a9be06a559e81a15358aae81d57aa4802a911126378f707d
3
- size 85331
 
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:e6efa7429314b0b202d6059f832df6c5fa03f44e47ba7452cb5b561b4cd15ff0
3
- size 8665878
 
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:05d4067ad71da8204551c5861a157638d5ba611c5cb4f97b5d0b5fdc59ce3685
3
- size 132019
 
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:850653f4825bd807989365d36eefabbf5a59e89025a447692f52c4381ba9be05
3
- size 4771
 
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:9a271bac6f3c74eda2b7bb5c1871b6406ef13224a09d2470f5b5a629fded0ecf
3
- size 9930
 
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:dfd01e1c66559f21e73679e0999265cd00bff746d452684e02d4b8f008153400
3
- size 10520
 
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:6bd00a583aef67bdbb172d06238712ffe617271812a4120ef21cd70bae77c9dd
3
- size 11701
 
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:7ad248eb8268a510b6e7ca2461fef1887d4393625f408abb470956cceda63fb0
3
- size 5109
 
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:81564a5edeb53c9f63f0b5322b6ce529d1b0687c18d050e71066a1ef548af2a3
3
- size 117243
 
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:585c38696afa896b3681ce23a636651129fd7eace13715f82a44e6c9497f64d8
3
- size 9059492
 
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="cleaned_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="cleaned_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="cleaned_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="cleaned_tools_info.json",
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-30")
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:2271aea7a9696caa7689dbfca0fae5aa9bef6d951028b39046320088bd9750db
3
- size 200902
 
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,63.36117465553014,56391,2025-01-30 00:02:15,2025-03-29 22:21:20
3
- claude-prediction-online,64.40092511939447,33293,2025-01-30 02:56:55,2025-03-30 01:23:15
4
- prediction-offline,54.90182224969825,169845,2025-01-30 00:00:35,2025-03-30 22:41:05
5
- prediction-offline-sme,48.42596776622985,6639,2025-01-30 00:15:30,2025-03-29 20:17:35
6
- prediction-online,44.72188388144539,4926,2025-01-30 09:06:50,2025-03-29 16:27:20
7
- prediction-online-sme,43.04347826086957,2990,2025-01-30 08:03:10,2025-03-29 16:37:10
8
- prediction-request-rag,46.26038781163435,361,2025-01-30 12:17:05,2025-03-29 16:45:20
9
- prediction-request-rag-claude,49.375,320,2025-01-30 08:13:35,2025-03-28 14:06:05
10
- prediction-request-reasoning,49.871487617658296,57582,2025-01-30 08:11:00,2025-03-29 16:45:05
11
- prediction-request-reasoning-claude,70.3125,320,2025-01-30 11:52:20,2025-03-26 15:49:05
12
- prediction-url-cot-claude,55.88235294117647,850,2025-01-30 13:59:35,2025-03-28 22:08:00
13
- superforcaster,56.42111788407893,9679,2025-01-30 00:08:25,2025-03-30 23:03:50
 
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:3e9bc5724102996bfaf729b1b8f0b666ed96d9b33e4f395ddcff84dfb8faed75
3
- size 1117889
 
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:2410b7c71b16b629a9f9ae1d82b537111755464afbbce83d8ef0f262eaee0471
3
- size 60003
 
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:b8c2ae6622789ab43c2d08d96efc84da4e10f912d90079f9ea7b1faf5e64e4cf
3
- size 11119
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c58823f7d3b04e4958da7935af6c6c111f4194e719642eccd1d3cd9870bed42
3
+ size 11337