Skip to content

Commit

Permalink
feat(mid-one/quickstarters): add docstring with warning (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
Caceresenzo authored Dec 27, 2024
1 parent 1bc16bf commit 3d0df14
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@
" streams: typing.List[typing.Iterable[dict]],\n",
" model_directory_path: str\n",
"):\n",
" \"\"\"\n",
" We do not recommend using the train function.\n",
" \n",
" Training should be done before running anything in the cloud environment.\n",
" \"\"\"\n",
"\n",
" pass # no training"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,12 @@
" streams: typing.List[typing.Iterable[dict]],\n",
" model_directory_path: str\n",
"):\n",
" \"\"\"\n",
" We do not recommend using the train function.\n",
" \n",
" Training should be done before running anything in the cloud environment.\n",
" \"\"\"\n",
"\n",
" def training_optimization_objective(a):\n",
" return negative_attacker_profit(a=a, streams=streams)\n",
"\n",
Expand Down Expand Up @@ -500,6 +506,12 @@
" stream: typing.Iterator[dict],\n",
" model_directory_path: str\n",
"):\n",
" \"\"\"\n",
" Please do not modify the infer function, edit the MyAttacker class directly.\n",
"\n",
" The core of the attacker logic should be implemented through the attacker classes.\n",
" \"\"\"\n",
"\n",
" # Load the best parameters\n",
" parameter_file_path = get_parameter_file_path(model_directory_path)\n",
" with open(parameter_file_path, 'r') as fd:\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,12 @@
"outputs": [],
"source": [
"def train():\n",
" \"\"\"\n",
" We do not recommend using the train function.\n",
" \n",
" Training should be done before running anything in the cloud environment.\n",
" \"\"\"\n",
"\n",
" pass # no train"
]
},
Expand All @@ -281,6 +287,12 @@
"def infer(\n",
" stream: typing.Iterator[dict],\n",
"):\n",
" \"\"\"\n",
" Please do not modify the infer function, edit the MyAttacker class directly.\n",
"\n",
" The core of the attacker logic should be implemented through the attacker classes.\n",
" \"\"\"\n",
"\n",
" attacker = MyAttacker()\n",
" total_pnl = zero_pnl_summary()\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,12 @@
"outputs": [],
"source": [
"def train():\n",
" \"\"\"\n",
" We do not recommend using the train function.\n",
" \n",
" Training should be done before running anything in the cloud environment.\n",
" \"\"\"\n",
"\n",
" pass # no train"
]
},
Expand All @@ -374,6 +380,12 @@
"def infer(\n",
" stream: typing.Iterator[dict],\n",
"):\n",
" \"\"\"\n",
" Please do not modify the infer function, edit the MyAttacker class directly.\n",
"\n",
" The core of the attacker logic should be implemented through the attacker classes.\n",
" \"\"\"\n",
"\n",
" attacker = MyAttacker(num_lags=2, threshold=2.0, burn_in=1000)\n",
" total_pnl = zero_pnl_summary()\n",
"\n",
Expand Down

0 comments on commit 3d0df14

Please sign in to comment.