Skip to content

Commit 43aa1de

Browse files
committed
[NCF/TF] Adding new logging
1 parent 0845aaa commit 43aa1de

File tree

13 files changed

+65
-906
lines changed

13 files changed

+65
-906
lines changed

TensorFlow/Recommendation/NCF/.gitmodules

Whitespace-only changes.

TensorFlow/Recommendation/NCF/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
ARG FROM_IMAGE_NAME=nvcr.io/nvidia/tensorflow:19.06-py3
15+
ARG FROM_IMAGE_NAME=nvcr.io/nvidia/tensorflow:19.10-py3
1616
FROM ${FROM_IMAGE_NAME}
1717

1818
RUN apt-get update && \

TensorFlow/Recommendation/NCF/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ To run evaluation on a specific checkpoint, simply run the following command:
217217

218218
```bash
219219
checkpoint=/data/checkpoints/model.ckpt
220-
python ncf.py --data /data/cache/ml-20m --mode test --checkpoint-dir $checkpoint
220+
python ncf.py --data /data/cache/ml-20m --mode test --load-checkpoint-path $checkpoint
221221
```
222222

223223
Note: TensorFlow checkpoints consist of 3 files each with a `*.ckpt` prefix.
@@ -389,11 +389,7 @@ performance in training and inference modes.
389389
To benchmark the training and inference performance, run:
390390

391391
```
392-
numgpu=4
393-
datadir=/data/cache/ml-20m
394-
mpirun -np $numgpu \
395-
--allow-run-as-root \
396-
python ncf.py --data $datadir
392+
mpirun -np 1 --allow-run-as-root python ncf.py --data /data/cache/ml-20m
397393
```
398394

399395
By default, the `ncf.py` script outputs metrics describing the following:

TensorFlow/Recommendation/NCF/convert.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,12 @@
3232
import pandas as pd
3333
from load import implicit_load
3434

35-
from logger.logger import LOGGER
36-
from logger import tags
37-
3835
import tensorflow as tf
3936

4037
MIN_RATINGS = 20
4138
USER_COLUMN = 'user_id'
4239
ITEM_COLUMN = 'item_id'
4340

44-
LOGGER.model = 'ncf'
4541

4642
def parse_args():
4743
parser = ArgumentParser()
@@ -59,7 +55,6 @@ def main():
5955

6056
print("Filtering out users with less than {} ratings".format(MIN_RATINGS))
6157
grouped = df.groupby(USER_COLUMN)
62-
LOGGER.log(key=tags.PREPROC_HP_MIN_RATINGS, value=MIN_RATINGS)
6358
df = grouped.filter(lambda x: len(x) >= MIN_RATINGS)
6459

6560
print("Mapping original user and item IDs to new sequential IDs")

TensorFlow/Recommendation/NCF/input_pipeline.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# -----------------------------------------------------------------------
2+
#
3+
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
118
import numpy as np
219
import cupy as cp
320

TensorFlow/Recommendation/NCF/logger/analyzer.py

Lines changed: 0 additions & 131 deletions
This file was deleted.

TensorFlow/Recommendation/NCF/logger/autologging.py

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)