quick fix: apply masking when training next item prediction#514
Conversation
Click to view CI ResultsGitHub pull request #514 of commit 399e5a10825eaca5412e2bc34870d4e0e0ebe87b, no merge conflicts.
Running as SYSTEM
Setting status of 399e5a10825eaca5412e2bc34870d4e0e0ebe87b to PENDING with url http://merlin-infra1.nvidia.com:8080/job/transformers4rec_tests/236/ and message: 'Build started for merge commit.'
Using context: Jenkins Unit Test Run
Building on master in workspace /var/jenkins_home/workspace/transformers4rec_tests
using credential nvidia-merlin-bot
Cloning the remote Git repository
Cloning repository https://github.com/NVIDIA-Merlin/Transformers4Rec.git
> git init /var/jenkins_home/workspace/transformers4rec_tests/transformers4rec # timeout=10
Fetching upstream changes from https://github.com/NVIDIA-Merlin/Transformers4Rec.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials This is the bot credentials for our CI/CD
> git fetch --tags --force --progress -- https://github.com/NVIDIA-Merlin/Transformers4Rec.git +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url https://github.com/NVIDIA-Merlin/Transformers4Rec.git # timeout=10
> git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url https://github.com/NVIDIA-Merlin/Transformers4Rec.git # timeout=10
Fetching upstream changes from https://github.com/NVIDIA-Merlin/Transformers4Rec.git
using GIT_ASKPASS to set credentials This is the bot credentials for our CI/CD
> git fetch --tags --force --progress -- https://github.com/NVIDIA-Merlin/Transformers4Rec.git +refs/pull/514/*:refs/remotes/origin/pr/514/* # timeout=10
> git rev-parse 399e5a10825eaca5412e2bc34870d4e0e0ebe87b^{commit} # timeout=10
Checking out Revision 399e5a10825eaca5412e2bc34870d4e0e0ebe87b (detached)
> git config core.sparsecheckout # timeout=10
> git checkout -f 399e5a10825eaca5412e2bc34870d4e0e0ebe87b # timeout=10
Commit message: "quick fix: apply masking when training next item prediction"
> git rev-list --no-walk c76b416a920916779dfcba953e80a3a02c5c3538 # timeout=10
[transformers4rec_tests] $ /bin/bash /tmp/jenkins12025857592881763472.sh
============================= test session starts ==============================
platform linux -- Python 3.8.10, pytest-7.1.3, pluggy-1.0.0
rootdir: /var/jenkins_home/workspace/transformers4rec_tests/transformers4rec
plugins: anyio-3.6.1, xdist-3.0.2, cov-4.0.0
collected 1 item
|
Click to view CI ResultsGitHub pull request #514 of commit 4935a97e572f1aed20b0a6c0d4b9b70df0f80b91, no merge conflicts.
Running as SYSTEM
Setting status of 4935a97e572f1aed20b0a6c0d4b9b70df0f80b91 to PENDING with url http://merlin-infra1.nvidia.com:8080/job/transformers4rec_tests/237/ and message: 'Build started for merge commit.'
Using context: Jenkins Unit Test Run
Building on master in workspace /var/jenkins_home/workspace/transformers4rec_tests
using credential nvidia-merlin-bot
Cloning the remote Git repository
Cloning repository https://github.com/NVIDIA-Merlin/Transformers4Rec.git
> git init /var/jenkins_home/workspace/transformers4rec_tests/transformers4rec # timeout=10
Fetching upstream changes from https://github.com/NVIDIA-Merlin/Transformers4Rec.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials This is the bot credentials for our CI/CD
> git fetch --tags --force --progress -- https://github.com/NVIDIA-Merlin/Transformers4Rec.git +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url https://github.com/NVIDIA-Merlin/Transformers4Rec.git # timeout=10
> git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url https://github.com/NVIDIA-Merlin/Transformers4Rec.git # timeout=10
Fetching upstream changes from https://github.com/NVIDIA-Merlin/Transformers4Rec.git
using GIT_ASKPASS to set credentials This is the bot credentials for our CI/CD
> git fetch --tags --force --progress -- https://github.com/NVIDIA-Merlin/Transformers4Rec.git +refs/pull/514/*:refs/remotes/origin/pr/514/* # timeout=10
> git rev-parse 4935a97e572f1aed20b0a6c0d4b9b70df0f80b91^{commit} # timeout=10
Checking out Revision 4935a97e572f1aed20b0a6c0d4b9b70df0f80b91 (detached)
> git config core.sparsecheckout # timeout=10
> git checkout -f 4935a97e572f1aed20b0a6c0d4b9b70df0f80b91 # timeout=10
Commit message: "fixing flake8 error"
> git rev-list --no-walk 399e5a10825eaca5412e2bc34870d4e0e0ebe87b # timeout=10
[transformers4rec_tests] $ /bin/bash /tmp/jenkins2833483065735617484.sh
============================= test session starts ==============================
platform linux -- Python 3.8.10, pytest-7.1.3, pluggy-1.0.0
rootdir: /var/jenkins_home/workspace/transformers4rec_tests/transformers4rec
plugins: anyio-3.6.1, xdist-3.0.2, cov-4.0.0
collected 1 item
|
Click to view CI ResultsGitHub pull request #514 of commit 83a6200f983ddad907158114c40be34d9b36ddc0, no merge conflicts.
Running as SYSTEM
Setting status of 83a6200f983ddad907158114c40be34d9b36ddc0 to PENDING with url http://merlin-infra1.nvidia.com:8080/job/transformers4rec_tests/238/ and message: 'Build started for merge commit.'
Using context: Jenkins Unit Test Run
Building on master in workspace /var/jenkins_home/workspace/transformers4rec_tests
using credential nvidia-merlin-bot
Cloning the remote Git repository
Cloning repository https://github.com/NVIDIA-Merlin/Transformers4Rec.git
> git init /var/jenkins_home/workspace/transformers4rec_tests/transformers4rec # timeout=10
Fetching upstream changes from https://github.com/NVIDIA-Merlin/Transformers4Rec.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials This is the bot credentials for our CI/CD
> git fetch --tags --force --progress -- https://github.com/NVIDIA-Merlin/Transformers4Rec.git +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url https://github.com/NVIDIA-Merlin/Transformers4Rec.git # timeout=10
> git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url https://github.com/NVIDIA-Merlin/Transformers4Rec.git # timeout=10
Fetching upstream changes from https://github.com/NVIDIA-Merlin/Transformers4Rec.git
using GIT_ASKPASS to set credentials This is the bot credentials for our CI/CD
> git fetch --tags --force --progress -- https://github.com/NVIDIA-Merlin/Transformers4Rec.git +refs/pull/514/*:refs/remotes/origin/pr/514/* # timeout=10
> git rev-parse 83a6200f983ddad907158114c40be34d9b36ddc0^{commit} # timeout=10
Checking out Revision 83a6200f983ddad907158114c40be34d9b36ddc0 (detached)
> git config core.sparsecheckout # timeout=10
> git checkout -f 83a6200f983ddad907158114c40be34d9b36ddc0 # timeout=10
Commit message: "checked and fixed with flake8 and black"
> git rev-list --no-walk 4935a97e572f1aed20b0a6c0d4b9b70df0f80b91 # timeout=10
[transformers4rec_tests] $ /bin/bash /tmp/jenkins17365786219193940595.sh
============================= test session starts ==============================
platform linux -- Python 3.8.10, pytest-7.1.3, pluggy-1.0.0
rootdir: /var/jenkins_home/workspace/transformers4rec_tests/transformers4rec
plugins: anyio-3.6.1, xdist-3.0.2, cov-4.0.0
collected 1 item
|
Click to view CI ResultsGitHub pull request #514 of commit 95c477db1da8278b09521884c30bb504292dac6e, no merge conflicts.
Running as SYSTEM
Setting status of 95c477db1da8278b09521884c30bb504292dac6e to PENDING with url http://merlin-infra1.nvidia.com:8080/job/transformers4rec_tests/242/ and message: 'Build started for merge commit.'
Using context: Jenkins Unit Test Run
Building on master in workspace /var/jenkins_home/workspace/transformers4rec_tests
using credential nvidia-merlin-bot
Cloning the remote Git repository
Cloning repository https://github.com/NVIDIA-Merlin/Transformers4Rec.git
> git init /var/jenkins_home/workspace/transformers4rec_tests/transformers4rec # timeout=10
Fetching upstream changes from https://github.com/NVIDIA-Merlin/Transformers4Rec.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials This is the bot credentials for our CI/CD
> git fetch --tags --force --progress -- https://github.com/NVIDIA-Merlin/Transformers4Rec.git +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url https://github.com/NVIDIA-Merlin/Transformers4Rec.git # timeout=10
> git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url https://github.com/NVIDIA-Merlin/Transformers4Rec.git # timeout=10
Fetching upstream changes from https://github.com/NVIDIA-Merlin/Transformers4Rec.git
using GIT_ASKPASS to set credentials This is the bot credentials for our CI/CD
> git fetch --tags --force --progress -- https://github.com/NVIDIA-Merlin/Transformers4Rec.git +refs/pull/514/*:refs/remotes/origin/pr/514/* # timeout=10
> git rev-parse 95c477db1da8278b09521884c30bb504292dac6e^{commit} # timeout=10
Checking out Revision 95c477db1da8278b09521884c30bb504292dac6e (detached)
> git config core.sparsecheckout # timeout=10
> git checkout -f 95c477db1da8278b09521884c30bb504292dac6e # timeout=10
Commit message: "Merge branch 'main' into masking_quick_fix"
> git rev-list --no-walk e943edd2ff80c338fe63a2e17c3539c31d186289 # timeout=10
[transformers4rec_tests] $ /bin/bash /tmp/jenkins8901256520924112050.sh
============================= test session starts ==============================
platform linux -- Python 3.8.10, pytest-7.1.3, pluggy-1.0.0
rootdir: /var/jenkins_home/workspace/transformers4rec_tests/transformers4rec
plugins: anyio-3.6.1, xdist-3.0.2, cov-4.0.0
collected 1 item
|
Documentation previewhttps://nvidia-merlin.github.io/Transformers4Rec/review/pr-514 |
Goals ⚽
NextItemPredictionTaskthrough HF transfomers Trainer.Implementation Details 🚧
NextItemPredictionTaskin theforward()function, the correct value is not set for theignore_maskingflag therefore the correct flow was not happening.trainingflag toNextItemPredictionTask.forward()and passed the correct value to it fromHead.forward()to make sure the forward function of NextItemPrediciton is following the correct flow during training.Testing Details 🔍
NextItemPredictionTaskand use a debugger to follow the control flow insideNextItemPredictionTask.forward()