Skip to content

Commit f2b7257

Browse files
Fixed comments in rag notebook
1 parent a25ee3d commit f2b7257

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

notebooks/rag.ipynb

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@
7979
"cell_type": "code",
8080
"metadata": {},
8181
"source": [
82-
"URL = 'https://api.platform.mlcube.com'\n",
83-
"API_KEY = ''\n",
84-
"PROJECT_ID = ''\n",
82+
"URL = 'https://pre.api.platform.mlcube.com'\n",
83+
"API_KEY = 'VbDyZ4U7Gbe60nK4UlL4aqOOpZrBLHl7flm0uVzuCj9iwyatWcYcezaOBAzckCOh'\n",
84+
"PROJECT_ID = '669fbec80b64f51d12f1d12d'\n",
8585
"model_name = 'mymodel'\n",
8686
"model_version = 'v0.0.1'"
8787
],
@@ -261,22 +261,22 @@
261261
" if with_prediction:\n",
262262
" with open(prediction_samples_filename, 'w') as f:\n",
263263
" json.dump(prediction_text_samples, f)\n",
264-
" \n",
264+
" \n",
265265
" # Create embedding dataframe\n",
266266
" print('Creating embedding file')\n",
267267
" embeddings_input = pl.DataFrame({\n",
268268
" 'timestamp': timestamps,\n",
269269
" 'sample-id': sample_ids,\n",
270-
" f'{USER_INPUT_COL_NAME}_embeddings': embedder.encode((dataset[USER_INPUT_COL_NAME])).tolist(),\n",
271-
" f'{CONTEXT_COL_NAME}_embeddings': embedder.encode((dataset[CONTEXT_COL_NAME])).tolist(), \n",
270+
" f'{USER_INPUT_COL_NAME}_embeddings': embedder.encode(dataset[USER_INPUT_COL_NAME]).tolist(),\n",
271+
" f'{CONTEXT_COL_NAME}_embeddings': embedder.encode(dataset[CONTEXT_COL_NAME]).tolist(), \n",
272272
" })\n",
273273
" embeddings_input.write_parquet(input_embeddings_filename)\n",
274274
" \n",
275275
" if with_prediction:\n",
276276
" embeddings_prediction = pl.DataFrame({\n",
277277
" 'timestamp': timestamps,\n",
278278
" 'sample-id': sample_ids,\n",
279-
" f'{model_name}_embeddings@{model_version}': embedder.encode((dataset[ANSWER_COL_NAME])).tolist(),\n",
279+
" f'{model_name}_embeddings@{model_version}': embedder.encode(dataset[ANSWER_COL_NAME]).tolist(),\n",
280280
" })\n",
281281
" \n",
282282
" embeddings_prediction.write_parquet(prediction_embeddings_filename)\n",
@@ -540,7 +540,7 @@
540540
" version=model_version,\n",
541541
" metric_name=None, # Must be None in RAG tasks\n",
542542
" preferred_suggestion_type=None, # Must be None in RAG tasks\n",
543-
" with_probabilistic_output=False\n",
543+
" with_probabilistic_output=False,\n",
544544
")"
545545
],
546546
"outputs": [],
@@ -613,9 +613,7 @@
613613
{
614614
"cell_type": "markdown",
615615
"metadata": {},
616-
"source": [
617-
"Send production data asynchronously, first *inputs* and *predictions* and then *target*"
618-
]
616+
"source": "Send production data asynchronously, first *inputs* and then *predictions*"
619617
},
620618
{
621619
"cell_type": "code",

0 commit comments

Comments
 (0)