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

[DLRM/TensorFlow2] Minor: transcode.py complains about deprecated np.bool type #1315

Open
psharpe99 opened this issue Jun 26, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@psharpe99
Copy link

Related to DLRM/TensorFlow2

Describe the bug
A minor bug: running the transcode.py as per the README generates a deprecation warning from python.

To Reproduce

root@biber:/home/psharpe/DeepLearningExamples-master/TensorFlow2/Recommendation/DLRM# export DATASET_PARENT_DIRECTORY=pwd

root@biber:/home/psharpe/DeepLearningExamples-master/TensorFlow2/Recommendation/DLRM# echo $DATASET_PARENT_DIRECTORY
/home/psharpe/DeepLearningExamples-master/TensorFlow2/Recommendation/DLRM

root@biber:/home/psharpe/DeepLearningExamples-master/TensorFlow2/Recommendation/DLRM# docker run --cap-add SYS_NICE --runtime=nvidia -it --rm --ipc=host -v ${DATASET_PARENT_DIRECTORY}/data:/data nvidia_dlrm_tf bash

root@7cf568793223:/dlrm# python gen_csv.py --feature_spec_in tests/transcoding/small_csv.yaml

root@7cf568793223:/dlrm# mkdir /data/conversion_output

root@7cf568793223:/dlrm# cp tests/transcoding/small_csv.yaml /data/feature_spec.yaml

root@7cf568793223:/dlrm# python transcode.py --input /data --output /data/converted
transcode.py:119: DeprecationWarning: np.bool is a deprecated alias for the builtin bool. To silence this warning, use bool by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.bool_ here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
label_f.write(label_df.values.astype(np.bool).tobytes())

Expected behavior
The use of np.bool should be replaced as suggested by the warning, so as to not generate the warning.

Environment
Container version as built from the README:
root@7cf568793223:/dlrm# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"

root@7cf568793223:/dlrm# python --version
Python 3.8.10

@psharpe99 psharpe99 added the bug Something isn't working label Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant