Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Staging to master to add NCF hyperparameter tuning #1102

Merged
merged 64 commits into from
May 22, 2020
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
5b1e551
update nni to 1.5
seanytak Apr 16, 2020
eb0c50b
Merge branch 'seanytak/ncf_test_tuning' of github.com:seanytak/recomm…
Apr 16, 2020
6e485a1
update nni==1.5
seanytak Apr 17, 2020
67e54de
update nni surprise svd for nni 1.5
seanytak Apr 17, 2020
f20cf2e
add ncf training using nni
seanytak Apr 21, 2020
457d363
add ncf tuning harness notebook
seanytak Apr 21, 2020
7a4f24e
add model comparison for svd and ncf
seanytak Apr 22, 2020
70d5420
clean up ncf training
seanytak Apr 23, 2020
75c2999
clean up ncf markdown
seanytak Apr 23, 2020
d71ab3f
removed unused params in ncf training
seanytak Apr 23, 2020
77214ef
update readme
seanytak Apr 23, 2020
bed9d6a
Merge branch 'staging' into seanytak/ncf_test_tuning
miguelgfierro Apr 23, 2020
e8d9f0f
added initial files
Apr 23, 2020
f195b36
updated notebook
Apr 23, 2020
3ebd747
Merge branch 'staging' into cheetm/add_lightfm_deepdive
miguelgfierro Apr 24, 2020
038745a
added unittests and updated scripts
Apr 24, 2020
5ab3cae
Merge branch 'staging' into seanytak/ncf_test_tuning
miguelgfierro Apr 24, 2020
f9253fa
Merge branch 'cheetm/add_lightfm_deepdive' of github.com:cheetm/recom…
Knostromo Apr 24, 2020
af3a133
added unittests and updated scripts
Knostromo Apr 24, 2020
f98a084
addressed some comments
Knostromo Apr 24, 2020
4cb36ae
remove svd components
seanytak Apr 27, 2020
4f491fb
fix up final test results reporting
seanytak Apr 27, 2020
68738b6
addressed some more comments
Knostromo Apr 27, 2020
e2bd87f
fixed latex
Knostromo Apr 27, 2020
9ec6c8b
fixed latex
Knostromo Apr 27, 2020
b5c2c6a
Merge branch 'staging' into seanytak/ncf_test_tuning
miguelgfierro Apr 28, 2020
42d0f61
Merge branch 'staging' into cheetm/add_lightfm_deepdive
miguelgfierro Apr 28, 2020
dc1947a
addressed more comments
Knostromo Apr 28, 2020
1d21c6e
Merge branch 'cheetm/add_lightfm_deepdive' of github.com:cheetm/recom…
Knostromo Apr 28, 2020
ead671c
remove output from cell with warnings
seanytak Apr 29, 2020
3f86742
fix output on nni svd surprise
seanytak Apr 29, 2020
1902400
fix notebook outputs for demonstration purposes
seanytak Apr 29, 2020
be04df2
remove old svd references in nni_ncf
seanytak Apr 30, 2020
4f8a3f1
remove old svd model saving
seanytak Apr 30, 2020
069d050
Merge pull request #1092 from seanytak/seanytak/ncf_test_tuning
miguelgfierro May 1, 2020
2d5e892
Merge branch 'master' into staging
miguelgfierro May 1, 2020
04f3657
Merge branch 'staging' into cheetm/add_lightfm_deepdive
miguelgfierro May 6, 2020
9af8055
updated scripts to work with reco metrics
Knostromo May 8, 2020
b2fd3f3
slight cleanup
Knostromo May 11, 2020
bb44da5
removed auc import from util py
Knostromo May 11, 2020
241ef2f
corrected typo and added sec 3.6
Knostromo May 11, 2020
4e78675
Merge pull request #1096 from cheetm/cheetm/add_lightfm_deepdive
miguelgfierro May 13, 2020
2f7ed86
tf is going bananas
miguelgfierro May 18, 2020
1544354
error with azure storage library
miguelgfierro May 18, 2020
8106c03
test comment
miguelgfierro May 18, 2020
1564033
blacked
miguelgfierro May 18, 2020
f632a5c
format
miguelgfierro May 18, 2020
9547cf8
format
miguelgfierro May 18, 2020
aff2c4b
format
miguelgfierro May 18, 2020
03add11
DRY
miguelgfierro May 18, 2020
6a2a880
minor
miguelgfierro May 18, 2020
1541979
license
miguelgfierro May 18, 2020
ee530ee
format
miguelgfierro May 18, 2020
5bb464c
format
miguelgfierro May 18, 2020
50b9a90
format
miguelgfierro May 18, 2020
a304749
refact
miguelgfierro May 18, 2020
4cd67ca
minor
miguelgfierro May 19, 2020
bd44402
put subparameters into nested arguments
zzn2 May 20, 2020
a61880d
Merge branch 'staging' into master
zzn2 May 21, 2020
d9420ea
Merge pull request #1107 from zzn2/master
miguelgfierro May 21, 2020
2a16dd0
sys.executable instead of root python
miguelgfierro May 22, 2020
ebb66ee
formating
miguelgfierro May 22, 2020
3ef022e
Merge branch 'staging' into random_fixes
miguelgfierro May 22, 2020
73b6622
Merge pull request #1105 from microsoft/random_fixes
miguelgfierro May 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 51 additions & 33 deletions notebooks/02_model/ncf_deep_dive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,31 @@
"execution_count": 1,
"metadata": {},
"outputs": [
miguelgfierro marked this conversation as resolved.
Show resolved Hide resolved
{
"name": "stderr",
"output_type": "stream",
"text": [
"/anaconda/envs/recommenders_gpu/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:523: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
" _np_qint8 = np.dtype([(\"qint8\", np.int8, 1)])\n",
"/anaconda/envs/recommenders_gpu/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:524: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
" _np_quint8 = np.dtype([(\"quint8\", np.uint8, 1)])\n",
"/anaconda/envs/recommenders_gpu/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
" _np_qint16 = np.dtype([(\"qint16\", np.int16, 1)])\n",
"/anaconda/envs/recommenders_gpu/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
" _np_quint16 = np.dtype([(\"quint16\", np.uint16, 1)])\n",
"/anaconda/envs/recommenders_gpu/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
" _np_qint32 = np.dtype([(\"qint32\", np.int32, 1)])\n",
"/anaconda/envs/recommenders_gpu/lib/python3.6/site-packages/tensorflow/python/framework/dtypes.py:532: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.\n",
" np_resource = np.dtype([(\"resource\", np.ubyte, 1)])\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"System version: 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34) \n",
"System version: 3.6.10 |Anaconda, Inc.| (default, Mar 25 2020, 23:51:54) \n",
"[GCC 7.3.0]\n",
"Pandas version: 0.24.2\n",
"Pandas version: 0.25.3\n",
miguelgfierro marked this conversation as resolved.
Show resolved Hide resolved
"Tensorflow version: 1.12.0\n"
]
}
Expand Down Expand Up @@ -206,7 +224,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"4.93MB [00:00, 18.4MB/s] \n"
"100%|██████████| 4.81k/4.81k [00:00<00:00, 10.6kKB/s]\n"
]
},
{
Expand Down Expand Up @@ -380,7 +398,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Took 662.0558905601501 seconds for training.\n"
"Took 663.2377220259996 seconds for training.\n"
]
}
],
Expand Down Expand Up @@ -443,43 +461,43 @@
" <th>0</th>\n",
" <td>1.0</td>\n",
" <td>149.0</td>\n",
" <td>0.150561</td>\n",
" <td>0.029076</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>1.0</td>\n",
" <td>88.0</td>\n",
" <td>0.307006</td>\n",
" <td>0.632505</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>1.0</td>\n",
" <td>101.0</td>\n",
" <td>0.346554</td>\n",
" <td>0.492521</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>1.0</td>\n",
" <td>110.0</td>\n",
" <td>0.185647</td>\n",
" <td>0.081617</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>1.0</td>\n",
" <td>103.0</td>\n",
" <td>0.002877</td>\n",
" <td>0.004513</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" userID itemID prediction\n",
"0 1.0 149.0 0.150561\n",
"1 1.0 88.0 0.307006\n",
"2 1.0 101.0 0.346554\n",
"3 1.0 110.0 0.185647\n",
"4 1.0 103.0 0.002877"
"0 1.0 149.0 0.029076\n",
"1 1.0 88.0 0.632505\n",
"2 1.0 101.0 0.492521\n",
"3 1.0 110.0 0.081617\n",
"4 1.0 103.0 0.004513"
]
},
"execution_count": 8,
Expand Down Expand Up @@ -514,7 +532,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Took 2.801203966140747 seconds for prediction.\n"
"Took 3.0358772649997263 seconds for prediction.\n"
]
}
],
Expand Down Expand Up @@ -546,10 +564,10 @@
"name": "stdout",
"output_type": "stream",
"text": [
"MAP:\t0.044980\n",
"NDCG:\t0.189388\n",
"Precision@K:\t0.170626\n",
"Recall@K:\t0.094332\n"
"MAP:\t0.046273\n",
"NDCG:\t0.190750\n",
"Precision@K:\t0.173277\n",
"Recall@K:\t0.096688\n"
]
}
],
Expand Down Expand Up @@ -592,8 +610,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"HR:\t0.489403\n",
"NDCG:\t0.385408\n"
"HR:\t0.488564\n",
"NDCG:\t0.383339\n"
]
}
],
Expand Down Expand Up @@ -674,7 +692,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Took 514.4518468379974 seconds for training.\n"
"Took 513.9623115730001 seconds for training.\n"
]
}
],
Expand Down Expand Up @@ -717,7 +735,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Took 565.3551139831543 seconds for training.\n"
"Took 566.8783325639997 seconds for training.\n"
]
}
],
Expand Down Expand Up @@ -778,7 +796,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Took 660.8611929416656 seconds for training.\n"
"Took 655.1110815689999 seconds for training.\n"
]
}
],
Expand Down Expand Up @@ -807,7 +825,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Took 2.8479833602905273 seconds for prediction.\n"
"Took 3.083744528999887 seconds for prediction.\n"
]
}
],
Expand Down Expand Up @@ -839,10 +857,10 @@
"name": "stdout",
"output_type": "stream",
"text": [
"MAP:\t0.041600\n",
"NDCG:\t0.174057\n",
"Precision@K:\t0.160657\n",
"Recall@K:\t0.091654\n"
"MAP:\t0.043232\n",
"NDCG:\t0.181301\n",
"Precision@K:\t0.165111\n",
"Recall@K:\t0.094437\n"
]
}
],
Expand Down Expand Up @@ -919,9 +937,9 @@
"metadata": {
"celltoolbar": "Tags",
"kernelspec": {
"display_name": "reco_gpu",
"display_name": "Python (recommenders_gpu)",
"language": "python",
"name": "reco_gpu"
"name": "recommenders_gpu"
miguelgfierro marked this conversation as resolved.
Show resolved Hide resolved
},
"language_info": {
"codemirror_mode": {
Expand All @@ -933,9 +951,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.8"
"version": "3.6.10"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
}
1 change: 1 addition & 0 deletions notebooks/04_model_select_and_optimize/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ In this directory, notebooks are provided to demonstrate how to tune and optimiz
| [azureml_hyperdrive_wide_and_deep](azureml_hyperdrive_wide_and_deep.ipynb) | Quickstart tutorial on utilizing [Azure Machine Learning service](https://azure.microsoft.com/en-us/services/machine-learning-service/) for hyperparameter tuning of wide-and-deep model.
| [azureml_hyperdrive_surprise_svd](azureml_hyperdrive_surprise_svd.ipynb) | Quickstart tutorial on utilizing [Azure Machine Learning service](https://azure.microsoft.com/en-us/services/machine-learning-service/) for hyperparameter tuning of the matrix factorization method SVD from [Surprise library](https://surprise.readthedocs.io/en/stable/).
| [nni_surprise_svd](nni_surprise_svd.ipynb) | Quickstart tutorial on utilizing the [Neural Network Intelligence toolkit](https://github.com/Microsoft/nni) for hyperparameter tuning of the matrix factorization method SVD from [Surprise library](https://surprise.readthedocs.io/en/stable/).
| [nni_ncf](nni_ncf.ipynb) | Quickstart tutorial on utilizing the [Neural Network Intelligence toolkit](https://github.com/Microsoft/nni) as a tool to tune the [NCF model](../02_model/ncf_deep_dive.ipynb) and [SVD model](../02_model/surprise_svd_deep_dive.ipynb) and compare their performance against one another

### Prerequisites
To run the examples running on the Azure Machine Learning service, the [`azureml-sdk`](https://pypi.org/project/azureml-sdk/) is required. The AzureML Python SDK is already installed after setting up the conda environments from this repository (see [SETUP.md](../../SETUP.md)).
Expand Down
Loading