Skip to content

Commit bc16e17

Browse files
committed
update crypto example preds to only download preds csv
1 parent 9bcde8b commit bc16e17

File tree

1 file changed

+31
-8
lines changed

1 file changed

+31
-8
lines changed

crypto/example_model.ipynb

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,15 @@
5252
},
5353
{
5454
"cell_type": "code",
55-
"execution_count": null,
55+
"execution_count": 1,
5656
"metadata": {},
5757
"outputs": [
5858
{
5959
"name": "stderr",
6060
"output_type": "stream",
6161
"text": [
62-
"crypto/v2.0_beta/train.parquet: 3.58MB [00:00, 14.5MB/s] \n"
62+
"2025-10-08 10:50:06,923 INFO numerapi.utils: starting download\n",
63+
"crypto/v2.0/train.parquet: 3.83MB [00:00, 13.9MB/s] \n"
6364
]
6465
}
6566
],
@@ -838,7 +839,7 @@
838839
},
839840
{
840841
"cell_type": "code",
841-
"execution_count": 10,
842+
"execution_count": 2,
842843
"metadata": {
843844
"colab": {
844845
"base_uri": "https://localhost:8080/",
@@ -852,8 +853,9 @@
852853
"name": "stdout",
853854
"output_type": "stream",
854855
"text": [
855-
"[LightGBM] [Info] Auto-choosing col-wise multi-threading, the overhead of testing was 0.357879 seconds.\n",
856-
"You can set `force_col_wise=true` to remove the overhead.\n",
856+
"[LightGBM] [Info] Auto-choosing row-wise multi-threading, the overhead of testing was 0.000796 seconds.\n",
857+
"You can set `force_row_wise=true` to remove the overhead.\n",
858+
"And if memory is not enough, you can set `force_col_wise=true`.\n",
857859
"[LightGBM] [Info] Total Bins 112\n",
858860
"[LightGBM] [Info] Number of data points in the train set: 307157, number of used features: 22\n",
859861
"[LightGBM] [Info] Start training from score 0.499976\n",
@@ -3589,7 +3591,7 @@
35893591
" n_estimators=2000)"
35903592
]
35913593
},
3592-
"execution_count": 5,
3594+
"execution_count": 2,
35933595
"metadata": {},
35943596
"output_type": "execute_result"
35953597
}
@@ -3669,7 +3671,7 @@
36693671
},
36703672
{
36713673
"cell_type": "code",
3672-
"execution_count": 24,
3674+
"execution_count": null,
36733675
"metadata": {},
36743676
"outputs": [
36753677
{
@@ -3687,7 +3689,28 @@
36873689
"\n",
36883690
"# generate live predictions\n",
36893691
"live_data[\"prediction\"] = model.predict(live_data.filter(like=\"feature_\"))\n",
3690-
"live_data.to_parquet(\"predictions.parquet\")"
3692+
"submission = live_data[['symbol', 'prediction']]\n",
3693+
"submission"
3694+
]
3695+
},
3696+
{
3697+
"cell_type": "code",
3698+
"execution_count": null,
3699+
"metadata": {},
3700+
"outputs": [],
3701+
"source": [
3702+
"# Save and download your predictions\n",
3703+
"filename = f'crypto_example_preds.csv'\n",
3704+
"from numerai_tools.scoring import tie_kept_rank\n",
3705+
"submission[['prediction']] = tie_kept_rank(submission[['prediction']])\n",
3706+
"submission.to_csv(filename, index=False)\n",
3707+
"\n",
3708+
"# Download file if running in Google Colab\n",
3709+
"try:\n",
3710+
" from google.colab import files\n",
3711+
" files.download(filename)\n",
3712+
"except:\n",
3713+
" pass"
36913714
]
36923715
}
36933716
],

0 commit comments

Comments
 (0)