From 68b60c04819327efb54805d1215ef125b269a919 Mon Sep 17 00:00:00 2001 From: Chuyang Ke Date: Thu, 9 Jun 2022 09:58:04 -0700 Subject: [PATCH] Fix SAR notebooks --- examples/00_quick_start/sar_movielens.ipynb | 4 ++-- examples/00_quick_start/sar_movielens_with_azureml.ipynb | 4 ++-- examples/02_model_collaborative_filtering/sar_deep_dive.ipynb | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/00_quick_start/sar_movielens.ipynb b/examples/00_quick_start/sar_movielens.ipynb index 7f273974a3..c886a15af0 100644 --- a/examples/00_quick_start/sar_movielens.ipynb +++ b/examples/00_quick_start/sar_movielens.ipynb @@ -402,7 +402,7 @@ ], "source": [ "with Timer() as test_time:\n", - " top_k = model.recommend_k_items(test, remove_seen=True)\n", + " top_k = model.recommend_k_items(test, top_k=TOP_K, remove_seen=True)\n", "\n", "print(\"Took {} seconds for prediction.\".format(test_time.interval))" ] @@ -923,4 +923,4 @@ }, "nbformat": 4, "nbformat_minor": 4 -} \ No newline at end of file +} diff --git a/examples/00_quick_start/sar_movielens_with_azureml.ipynb b/examples/00_quick_start/sar_movielens_with_azureml.ipynb index fe8f09a1c3..3d8030e2d9 100644 --- a/examples/00_quick_start/sar_movielens_with_azureml.ipynb +++ b/examples/00_quick_start/sar_movielens_with_azureml.ipynb @@ -400,7 +400,7 @@ "\n", "# predict top k items\n", "with Timer() as t:\n", - " top_k = model.recommend_k_items(test, remove_seen=True)\n", + " top_k = model.recommend_k_items(test, top_k=TOP_K, remove_seen=True)\n", "\n", "run.log(name=\"Prediction time\", value=t.interval)\n", "\n", @@ -693,4 +693,4 @@ }, "nbformat": 4, "nbformat_minor": 2 -} \ No newline at end of file +} diff --git a/examples/02_model_collaborative_filtering/sar_deep_dive.ipynb b/examples/02_model_collaborative_filtering/sar_deep_dive.ipynb index 3caaca7cd6..464e398c7b 100644 --- a/examples/02_model_collaborative_filtering/sar_deep_dive.ipynb +++ b/examples/02_model_collaborative_filtering/sar_deep_dive.ipynb @@ -121,7 +121,6 @@ "source": [ "# set the environment path to find Recommenders\n", "import sys\n", - "\n", "import itertools\n", "import logging\n", @@ -390,7 +389,7 @@ } ], "source": [ - "top_k = model.recommend_k_items(test, remove_seen=True)" + "top_k = model.recommend_k_items(test, top_k=TOP_K, remove_seen=True)" ] }, {