lanpa/tensorboardX

DeprecationWarning: crc32c.crc32 will be eventually removed, use crc32c.crc32c instead

Stefan-1313 opened this issue · 2 comments

Describe the bug
I use this project Ray Tune which in turn used TensorboardX for logging (we also use TensorboardX for viewing the results). Unfortunately, I get this DeprecationWarning during logging and it gets printed a lot! It prints so much it clutters my output window preventing me from easily seeing the output I want.

The warning:

C:\Users\Stefan\.conda\envs\TBXray\lib\site-packages\tensorboardX\record_writer.py:197: DeprecationWarning: crc32c.crc32 will be eventually removed, use crc32c.crc32c instead
  x = u32(crc32c(data))

Minimal runnable code to reproduce the behavior
I cannot find the exact code in the Ray Tune source which calls TensorboardX to cause this warning. However, I can reproduce this by executing this python file:

# main.py
from tensorboardX.record_writer import crc32c
crc32c('Hello World'.encode())

Running this file will yield this warning:

D:\TBX\main.py:3: DeprecationWarning: crc32c.crc32 will be eventually removed, use crc32c.crc32c instead
  crc32c('Hello World'.encode())

Process finished with exit code 0

Expected behavior
I expected I would get the crc32 value without any printed warning.

Environment
I use this yaml file (the specified versions are the latest versions at time of writing this issue):

# tbx_env.yml
# Create this conda environment using command: conda env create --file tbx_env.yml
name: TBX
channels:
- conda-forge
dependencies:
- python=3.9
- pip=22.2.2
- pip:
   - tensorboard==2.10.0
   - crc32c==2.3
   - tensorboardx==2.5.1

Python environment
I use Miniconda3 and Python 3.9 x64. See the above *.yaml file for the full environment definition.

Merging the pull request fixed this issue :).

lanpa commented

Aha, I forgot to close this :)