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

Required changes to get Rank example test passing #182

Merged
merged 1 commit into from
Aug 24, 2022

Conversation

jperez999
Copy link
Collaborator

@jperez999 jperez999 commented Aug 24, 2022

With new updates to tritonserver and cudf, the current example was failing to run. This seems to have to do with, lack of support for running tritonserver as a subprocess within the testbooks subprocess for executing the notebook. In order to fix this a couple of changes had to be made.

  1. Add output_cols variable to the notebook: necessary because testbooks has a hard time creating the json serialization for the ensemble object. All we need is the list of output columns. This lets us use the testbooks.ref to pull out that list.

  2. Refactor how we execute the run ensemble on triton command: Need to remove from within the context of the notebook to allow correct execution to occur.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jperez999 jperez999 self-assigned this Aug 24, 2022
@jperez999 jperez999 added breaking Breaking change chore Maintenance for the repository ci labels Aug 24, 2022
@nvidia-merlin-bot
Copy link

Click to view CI Results
GitHub pull request #182 of commit 2337aeedf2f9d18e419ebc57686a8f393f73cb7d, no merge conflicts.
Running as SYSTEM
Setting status of 2337aeedf2f9d18e419ebc57686a8f393f73cb7d to PENDING with url https://10.20.13.93:8080/job/merlin_systems/321/console and message: 'Pending'
Using context: Jenkins
Building on master in workspace /var/jenkins_home/workspace/merlin_systems
using credential fce1c729-5d7c-48e8-90cb-b0c314b1076e
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/NVIDIA-Merlin/systems # timeout=10
Fetching upstream changes from https://github.com/NVIDIA-Merlin/systems
 > git --version # timeout=10
using GIT_ASKPASS to set credentials login for merlin-systems user + githubtoken
 > git fetch --tags --force --progress -- https://github.com/NVIDIA-Merlin/systems +refs/pull/182/*:refs/remotes/origin/pr/182/* # timeout=10
 > git rev-parse 2337aeedf2f9d18e419ebc57686a8f393f73cb7d^{commit} # timeout=10
Checking out Revision 2337aeedf2f9d18e419ebc57686a8f393f73cb7d (detached)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 2337aeedf2f9d18e419ebc57686a8f393f73cb7d # timeout=10
Commit message: "Required changes to get Rank example test passing"
 > git rev-list --no-walk b8e8deafde397e4908e92a9ce206aeb61dd2cedf # timeout=10
[merlin_systems] $ /bin/bash /tmp/jenkins5106743069377277099.sh
PYTHONPATH=:/usr/local/lib/python3.8/dist-packages/:/usr/local/hugectr/lib:/var/jenkins_home/workspace/merlin_systems/systems
GLOB sdist-make: /var/jenkins_home/workspace/merlin_systems/systems/setup.py
test-gpu inst-nodeps: /var/jenkins_home/workspace/merlin_systems/systems/.tox/.tmp/package/1/merlin-systems-0+untagged.95.g2337aee.zip
WARNING: Discarding $PYTHONPATH from environment, to override specify PYTHONPATH in 'passenv' in your configuration.
test-gpu installed: absl-py==1.2.0,alabaster==0.7.12,anyio==3.6.1,argon2-cffi==21.3.0,argon2-cffi-bindings==21.2.0,astroid==2.5.6,asttokens==2.0.7,astunparse==1.6.3,asv==0.5.1,asvdb==0.4.2,attrs==22.1.0,awscli==1.25.59,Babel==2.10.3,backcall==0.2.0,beautifulsoup4==4.11.1,betterproto==1.2.5,black==22.6.0,bleach==5.0.1,boto3==1.24.51,botocore==1.27.58,Brotli==1.0.9,cachetools==5.2.0,certifi==2019.11.28,cffi==1.15.1,chardet==3.0.4,clang==5.0,click==8.1.3,cloudpickle==2.1.0,colorama==0.4.4,coverage==6.4.4,cuda-python==11.7.1,cudf==22.4.0,cupy-cuda116==10.6.0,cycler==0.11.0,Cython==0.29.32,dask==2022.1.1,dask-cuda==22.4.0,dask-cudf==22.4.0,dbus-python==1.2.16,debugpy==1.6.2,decorator==5.1.1,defusedxml==0.7.1,dill==0.3.5.1,distlib==0.3.5,distributed==2022.3.0,distro==1.7.0,dm-tree==0.1.7,docker-pycreds==0.4.0,docutils==0.16,emoji==1.7.0,entrypoints==0.4,execnet==1.9.0,executing==0.10.0,faiss-gpu==1.7.2,fastai==2.7.9,fastapi==0.80.0,fastavro==1.6.0,fastcore==1.5.21,fastdownload==0.0.7,fastjsonschema==2.16.1,fastprogress==1.0.3,fastrlock==0.8,feast==0.19.4,fiddle==0.2.0,filelock==3.8.0,flatbuffers==1.12,fonttools==4.37.0,fsspec==2022.5.0,gast==0.4.0,gevent==21.12.0,geventhttpclient==2.0,gitdb==4.0.9,GitPython==3.1.27,google==3.0.0,google-api-core==2.8.2,google-auth==2.11.0,google-auth-oauthlib==0.4.6,google-pasta==0.2.0,googleapis-common-protos==1.52.0,graphviz==0.20.1,greenlet==1.1.2,grpcio==1.41.0,grpcio-channelz==1.47.0,grpcio-reflection==1.47.0,grpclib==0.4.3,h11==0.13.0,h2==4.1.0,h5py==3.7.0,HeapDict==1.0.1,hpack==4.0.0,httptools==0.4.0,hugectr2onnx==0.0.0,huggingface-hub==0.8.1,hyperframe==6.0.1,idna==2.8,imagesize==1.4.1,implicit==0.6.0,importlib-metadata==4.12.0,importlib-resources==5.9.0,iniconfig==1.1.1,ipykernel==6.15.1,ipython==8.4.0,ipython-genutils==0.2.0,ipywidgets==7.7.0,jedi==0.18.1,Jinja2==3.1.2,jmespath==1.0.1,joblib==1.1.0,json5==0.9.9,jsonschema==4.9.1,jupyter-cache==0.4.3,jupyter-client==7.3.4,jupyter-core==4.11.1,jupyter-server==1.18.1,jupyter-server-mathjax==0.2.5,jupyter-sphinx==0.3.2,jupyterlab==3.4.5,jupyterlab-pygments==0.2.2,jupyterlab-server==2.15.0,jupyterlab-widgets==1.1.0,keras==2.9.0,Keras-Preprocessing==1.1.2,kiwisolver==1.4.4,lazy-object-proxy==1.7.1,libclang==14.0.6,lightfm==1.16,lightgbm==3.3.2,linkify-it-py==1.0.3,llvmlite==0.39.0,locket==1.0.0,lxml==4.9.1,Markdown==3.4.1,markdown-it-py==1.1.0,MarkupSafe==2.1.1,matplotlib==3.5.3,matplotlib-inline==0.1.3,mdit-py-plugins==0.2.8,merlin-core==0.5.0+2.gad142af,merlin-models==0.6.0+21.gd247c021c,merlin-systems==0+untagged.95.g2337aee,mistune==0.8.4,mmh3==3.0.0,mpi4py==3.1.3,msgpack==1.0.4,multidict==6.0.2,myst-nb==0.13.2,myst-parser==0.15.2,natsort==8.1.0,nbclassic==0.4.3,nbclient==0.6.6,nbconvert==6.5.3,nbdime==3.1.1,nbformat==5.4.0,nest-asyncio==1.5.5,notebook==6.4.12,notebook-shim==0.1.0,numba==0.56.0,numpy==1.21.5,nvidia-pyindex==1.0.9,# Editable install with no version control (nvtabular==1.3.3+2.g4cecf3e33),-e /usr/local/lib/python3.8/dist-packages,nvtx==0.2.5,oauthlib==3.2.0,onnx==1.12.0,onnxruntime==1.11.1,opt-einsum==3.3.0,packaging==21.3,pandas==1.3.5,pandavro==1.5.2,pandocfilters==1.5.0,parso==0.8.3,partd==1.3.0,pathtools==0.1.2,pexpect==4.8.0,pickleshare==0.7.5,Pillow==9.2.0,pkgutil_resolve_name==1.3.10,platformdirs==2.5.2,pluggy==1.0.0,prometheus-client==0.14.1,promise==2.3,prompt-toolkit==3.0.30,proto-plus==1.19.6,protobuf==3.19.4,psutil==5.9.1,ptyprocess==0.7.0,pure-eval==0.2.2,py==1.11.0,pyarrow==6.0.0,pyasn1==0.4.8,pyasn1-modules==0.2.8,pybind11==2.10.0,pycparser==2.21,pydantic==1.9.2,pydot==1.4.2,Pygments==2.12.0,PyGObject==3.36.0,pynvml==11.4.1,pyparsing==3.0.9,pyrsistent==0.18.1,pytest==7.1.2,pytest-cov==3.0.0,pytest-forked==1.4.0,pytest-xdist==2.5.0,python-apt==2.0.0+ubuntu0.20.4.7,python-dateutil==2.8.2,python-dotenv==0.20.0,python-rapidjson==1.8,pytz==2022.2.1,PyYAML==5.4.1,pyzmq==23.2.1,regex==2022.7.25,requests==2.22.0,requests-oauthlib==1.3.1,requests-unixsocket==0.2.0,rmm==21.12.0,rsa==4.7.2,s3fs==2022.2.0,s3transfer==0.6.0,sacremoses==0.0.53,scikit-build==0.15.0,scikit-learn==1.1.2,scipy==1.9.0,seedir==0.3.0,Send2Trash==1.8.0,sentry-sdk==1.9.4,setproctitle==1.3.2,setuptools-scm==7.0.5,shortuuid==1.0.9,six==1.15.0,sklearn==0.0,smmap==5.0.0,sniffio==1.2.0,snowballstemmer==2.2.0,sortedcontainers==2.4.0,soupsieve==2.3.2.post1,Sphinx==5.1.1,sphinx-multiversion==0.2.4,sphinx-togglebutton==0.3.1,sphinx_external_toc==0.3.0,sphinxcontrib-applehelp==1.0.2,sphinxcontrib-copydirs @ git+https://github.com/mikemckiernan/sphinxcontrib-copydirs.git@bd8c5d79b3f91cf5f1bb0d6995aeca3fe84b670e,sphinxcontrib-devhelp==1.0.2,sphinxcontrib-htmlhelp==2.0.0,sphinxcontrib-jsmath==1.0.1,sphinxcontrib-qthelp==1.0.3,sphinxcontrib-serializinghtml==1.1.5,SQLAlchemy==1.4.36,stack-data==0.4.0,starlette==0.19.1,stringcase==1.2.0,supervisor==4.1.0,tabulate==0.8.10,tblib==1.7.0,tdqm==0.0.1,tenacity==8.0.1,tensorboard==2.9.1,tensorboard-data-server==0.6.1,tensorboard-plugin-wit==1.8.1,tensorflow==2.6.2,tensorflow-estimator==2.9.0,tensorflow-gpu==2.9.1,tensorflow-io-gcs-filesystem==0.26.0,tensorflow-metadata==1.9.0,termcolor==1.1.0,terminado==0.15.0,testbook==0.4.2,threadpoolctl==3.1.0,tinycss2==1.1.1,tokenizers==0.10.3,toml==0.10.2,tomli==2.0.1,toolz==0.12.0,torch==1.12.1+cu113,torchmetrics==0.3.2,tornado==6.2,tox==3.25.1,tqdm==4.64.0,traitlets==5.3.0,transformers==4.12.0,transformers4rec==0.1.11+4.g741a912f9,treelite==2.3.0,treelite-runtime==2.3.0,tritonclient==2.22.0,typing_extensions==4.3.0,uc-micro-py==1.0.1,urllib3==1.26.11,uvicorn==0.18.2,uvloop==0.16.0,versioneer==0.20,virtualenv==20.16.3,wandb==0.13.1,watchfiles==0.16.1,wcwidth==0.2.5,webencodings==0.5.1,websocket-client==1.3.3,websockets==10.3,Werkzeug==2.2.2,widgetsnbextension==3.6.0,wrapt==1.12.1,xgboost==1.6.1,zict==2.2.0,zipp==3.8.1,zope.event==4.5.0,zope.interface==5.4.0
test-gpu run-test-pre: PYTHONHASHSEED='3928623113'
test-gpu run-test: commands[0] | python -m pytest --cov-report term --cov=merlin -rxs tests/unit/systems
============================= test session starts ==============================
platform linux -- Python 3.8.10, pytest-7.1.2, pluggy-1.0.0
cachedir: .tox/test-gpu/.pytest_cache
rootdir: /var/jenkins_home/workspace/merlin_systems/systems, configfile: pyproject.toml
plugins: anyio-3.5.0, xdist-2.5.0, forked-1.4.0, cov-3.0.0
collected 67 items

tests/unit/systems/test_export.py . [ 1%]
tests/unit/systems/dag/test_graph.py .. [ 4%]
tests/unit/systems/dag/test_model_registry.py .. [ 7%]
tests/unit/systems/dag/test_op_runner.py .... [ 13%]
tests/unit/systems/dag/ops/test_ops.py .. [ 16%]
tests/unit/systems/ops/feast/test_op.py ....... [ 26%]
tests/unit/systems/ops/fil/test_ensemble.py . [ 28%]
tests/unit/systems/ops/fil/test_forest.py .... [ 34%]
tests/unit/systems/ops/fil/test_op.py .......................... [ 73%]
tests/unit/systems/ops/implicit/test_op.py ...... [ 82%]
tests/unit/systems/ops/nvtabular/test_op.py .. [ 85%]
tests/unit/systems/ops/tf/test_ensemble.py .. [ 88%]
tests/unit/systems/ops/tf/test_op.py .... [ 94%]
tests/unit/systems/ops/torch/test_op.py .... [100%]

=============================== warnings summary ===============================
../../../.local/lib/python3.8/site-packages/nvtabular/framework_utils/init.py:18
/var/jenkins_home/.local/lib/python3.8/site-packages/nvtabular/framework_utils/init.py:18: DeprecationWarning: The nvtabular.framework_utils module is being replaced by the Merlin Models library. Support for importing from nvtabular.framework_utils is deprecated, and will be removed in a future version. Please consider using the models and layers from Merlin Models instead.
warnings.warn(

tests/unit/systems/test_export.py::test_export_run_ensemble_triton[tensorflow-parquet]
tests/unit/systems/dag/test_op_runner.py::test_op_runner_loads_config[parquet]
tests/unit/systems/dag/test_op_runner.py::test_op_runner_loads_multiple_ops_same[parquet]
tests/unit/systems/dag/test_op_runner.py::test_op_runner_loads_multiple_ops_same_execute[parquet]
tests/unit/systems/dag/test_op_runner.py::test_op_runner_single_node_export[parquet]
tests/unit/systems/ops/nvtabular/test_op.py::test_workflow_op_validates_schemas[parquet]
tests/unit/systems/ops/nvtabular/test_op.py::test_workflow_op_exports_own_config[parquet]
tests/unit/systems/ops/tf/test_ensemble.py::test_workflow_tf_e2e_config_verification[parquet]
tests/unit/systems/ops/tf/test_ensemble.py::test_workflow_tf_e2e_multi_op_run[parquet]
/usr/local/lib/python3.8/dist-packages/cudf/core/frame.py:384: UserWarning: The deep parameter is ignored and is only included for pandas compatibility.
warnings.warn(

tests/unit/systems/test_export.py::test_export_run_ensemble_triton[tensorflow-parquet]
/var/jenkins_home/workspace/merlin_systems/systems/merlin/systems/triton/export.py:304: UserWarning: Column x is being generated by NVTabular workflow but is unused in test_name_tf model
warnings.warn(

tests/unit/systems/test_export.py::test_export_run_ensemble_triton[tensorflow-parquet]
/var/jenkins_home/workspace/merlin_systems/systems/merlin/systems/triton/export.py:304: UserWarning: Column y is being generated by NVTabular workflow but is unused in test_name_tf model
warnings.warn(

tests/unit/systems/test_export.py::test_export_run_ensemble_triton[tensorflow-parquet]
/var/jenkins_home/workspace/merlin_systems/systems/merlin/systems/triton/export.py:304: UserWarning: Column id is being generated by NVTabular workflow but is unused in test_name_tf model
warnings.warn(

tests/unit/systems/ops/feast/test_op.py::test_feast_from_feature_view[1]
tests/unit/systems/ops/feast/test_op.py::test_feast_from_feature_view[2]
/usr/local/lib/python3.8/dist-packages/feast/feature_view.py:100: DeprecationWarning: The argument 'input' is being deprecated. Please use 'batch_source' instead. Feast 0.13 and onwards will not support the argument 'input'.
warnings.warn(

tests/unit/systems/ops/fil/test_op.py::test_binary_classifier_default[sklearn_forest_classifier-get_model_params4]
tests/unit/systems/ops/fil/test_op.py::test_binary_classifier_with_proba[sklearn_forest_classifier-get_model_params4]
tests/unit/systems/ops/fil/test_op.py::test_multi_classifier[sklearn_forest_classifier-get_model_params4]
tests/unit/systems/ops/fil/test_op.py::test_regressor[sklearn_forest_regressor-get_model_params4]
tests/unit/systems/ops/fil/test_op.py::test_model_file[sklearn_forest_regressor-checkpoint.tl]
/usr/local/lib/python3.8/dist-packages/sklearn/utils/deprecation.py:103: FutureWarning: Attribute n_features_ was deprecated in version 1.0 and will be removed in 1.2. Use n_features_in_ instead.
warnings.warn(msg, category=FutureWarning)

tests/unit/systems/ops/implicit/test_op.py::test_reload_from_config[AlternatingLeastSquares]
/usr/local/lib/python3.8/dist-packages/implicit/utils.py:28: UserWarning: OpenBLAS detected. Its highly recommend to set the environment variable 'export OPENBLAS_NUM_THREADS=1' to disable its internal multithreading
warnings.warn(

tests/unit/systems/ops/torch/test_op.py::test_pytorch_op_serving[True-True]
/usr/local/lib/python3.8/dist-packages/torch/serialization.py:707: UserWarning: 'torch.load' received a zip file that looks like a TorchScript archive dispatching to 'torch.jit.load' (call 'torch.jit.load' directly to silence this warning)
warnings.warn("'torch.load' received a zip file that looks like a TorchScript archive"

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

---------- coverage: platform linux, python 3.8.10-final-0 -----------
Name Stmts Miss Cover

merlin/systems/init.py 6 0 100%
merlin/systems/_version.py 354 214 40%
merlin/systems/dag/init.py 3 0 100%
merlin/systems/dag/ensemble.py 64 2 97%
merlin/systems/dag/node.py 20 1 95%
merlin/systems/dag/op_runner.py 21 0 100%
merlin/systems/dag/ops/init.py 0 0 100%
merlin/systems/dag/ops/compat.py 24 8 67%
merlin/systems/dag/ops/faiss.py 60 60 0%
merlin/systems/dag/ops/feast.py 121 5 96%
merlin/systems/dag/ops/fil.py 212 30 86%
merlin/systems/dag/ops/implicit.py 52 7 87%
merlin/systems/dag/ops/operator.py 84 10 88%
merlin/systems/dag/ops/pytorch.py 61 5 92%
merlin/systems/dag/ops/session_filter.py 43 11 74%
merlin/systems/dag/ops/softmax_sampling.py 50 17 66%
merlin/systems/dag/ops/tensorflow.py 80 5 94%
merlin/systems/dag/ops/unroll_features.py 49 49 0%
merlin/systems/dag/ops/workflow.py 25 0 100%
merlin/systems/model_registry.py 16 1 94%
merlin/systems/triton/init.py 36 12 67%
merlin/systems/triton/conversions.py 87 73 16%
merlin/systems/triton/export.py 266 154 42%
merlin/systems/triton/utils.py 67 27 60%
merlin/systems/workflow/init.py 22 5 77%
merlin/systems/workflow/base.py 113 113 0%
merlin/systems/workflow/hugectr.py 37 37 0%
merlin/systems/workflow/pytorch.py 10 10 0%
merlin/systems/workflow/tensorflow.py 32 32 0%

TOTAL 2015 888 56%

================= 67 passed, 22 warnings in 142.01s (0:02:22) ==================
___________________________________ summary ____________________________________
test-gpu: commands succeeded
congratulations :)
Performing Post build task...
Match found for : : True
Logical operation result is TRUE
Running script : #!/bin/bash
cd /var/jenkins_home/
CUDA_VISIBLE_DEVICES=1 python test_res_push.py "https://api.GitHub.com/repos/NVIDIA-Merlin/systems/issues/$ghprbPullId/comments" "/var/jenkins_home/jobs/$JOB_NAME/builds/$BUILD_NUMBER/log"
[merlin_systems] $ /bin/bash /tmp/jenkins3716618610510642439.sh

@github-actions
Copy link

Documentation preview

https://nvidia-merlin.github.io/systems/review/pr-182

@karlhigley karlhigley merged commit 6e31683 into NVIDIA-Merlin:main Aug 24, 2022
@viswa-nvidia viswa-nvidia added this to the Merlin 22.09 milestone Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change chore Maintenance for the repository ci
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants