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

[BUG] Logs full of FutureWarning when training with nightly PyTorch #5682

Closed
rosario-purple opened this issue Jun 18, 2024 · 1 comment · Fixed by #5811
Closed

[BUG] Logs full of FutureWarning when training with nightly PyTorch #5682

rosario-purple opened this issue Jun 18, 2024 · 1 comment · Fixed by #5811
Assignees
Labels
bug Something isn't working training

Comments

@rosario-purple
Copy link

Describe the bug
When training with nightly PyTorch, the logs are full of deprecation warnings like this:

/home/alyssavance/miniforge3/envs/brr/lib/python3.10/site-packages/deepspeed/runtime/zero/linear.py:49: FutureWarn\
ing: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cu\
da')` instead.
[860302:0]:/home/alyssavance/miniforge3/envs/brr/lib/python3.10/site-packages/deepspeed/runtime/zero/linear.py:67:\
 FutureWarning: `torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., devi\
ce_type='cuda')` instead.

To Reproduce
Steps to reproduce the behavior:
Fine-tune a model with Zero-3 while using nightly PyTorch.

Expected behavior
The deprecation warning shouldn't appear.

ds_report output
[2024-06-18 08:59:11,766] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to cuda (auto detect)
/home/alyssavance/miniforge3/envs/brr/lib/python3.10/site-packages/deepspeed/runtime/zero/linear.py:49: FutureWarning: torch.cuda.amp.custo\ m_fwd(args...) is deprecated. Please use torch.amp.custom_fwd(args..., device_type='cuda') instead.
def forward(ctx, input, weight, bias=None):
/home/alyssavance/miniforge3/envs/brr/lib/python3.10/site-packages/deepspeed/runtime/zero/linear.py:67: FutureWarning: torch.cuda.amp.custo\ m_bwd(args...) is deprecated. Please use torch.amp.custom_bwd(args..., device_type='cuda') instead.
def backward(ctx, grad_output):
Warning: The default cache directory for DeepSpeed Triton autotune, /home/alyssavance/.triton/autotune, appears to be on an NFS system. Whil
e this is generally acceptable, if you experience slowdowns or hanging when DeepSpeed exits, it is recommended to set the TRITON_CACHE_DIR e
nvironment variable to a non-NFS path.
^[[93m [WARNING] ^[[0m Please specify the CUTLASS repo directory as environment variable $CUTLASS_PATH
^[[93m [WARNING] ^[[0m sparse_attn requires a torch version >= 1.5 and < 2.0 but detected 2.4
^[[93m [WARNING] ^[[0m using untested triton version (3.0.0+45fff310c8), only 1.0.0 is known to be compatible

DeepSpeed C++/CUDA extension op report

NOTE: Ops not installed will be just-in-time (JIT) compiled at
runtime if needed. Op compatibility means that your system
meet the required dependencies to JIT install the op.

JIT compiled ops requires ninja
ninja .................. ^[[92m[OKAY]^[[0m

op name ................ installed .. compatible

op name ................ installed .. compatible

async_io ............... ^[[93m[NO]^[[0m ....... ^[[92m[OKAY]^[[0m
fused_adam ............. ^[[93m[NO]^[[0m ....... ^[[92m[OKAY]^[[0m
cpu_adam ............... ^[[93m[NO]^[[0m ....... ^[[92m[OKAY]^[[0m
cpu_adagrad ............ ^[[93m[NO]^[[0m ....... ^[[92m[OKAY]^[[0m
cpu_lion ............... ^[[93m[NO]^[[0m ....... ^[[92m[OKAY]^[[0m
^[[93m [WARNING] ^[[0m Please specify the CUTLASS repo directory as environment variable $CUTLASS_PATH
evoformer_attn ......... ^[[93m[NO]^[[0m ....... ^[[93m[NO]^[[0m
fp_quantizer ........... ^[[93m[NO]^[[0m ....... ^[[92m[OKAY]^[[0m
fused_lamb ............. ^[[93m[NO]^[[0m ....... ^[[92m[OKAY]^[[0m
fused_lion ............. ^[[93m[NO]^[[0m ....... ^[[92m[OKAY]^[[0m
inference_core_ops ..... ^[[93m[NO]^[[0m ....... ^[[92m[OKAY]^[[0m
cutlass_ops ............ ^[[93m[NO]^[[0m ....... ^[[92m[OKAY]^[[0m
transformer_inference .. ^[[93m[NO]^[[0m ....... ^[[92m[OKAY]^[[0m
quantizer .............. ^[[93m[NO]^[[0m ....... ^[[92m[OKAY]^[[0m
ragged_device_ops ...... ^[[93m[NO]^[[0m ....... ^[[92m[OKAY]^[[0m
ragged_ops ............. ^[[93m[NO]^[[0m ....... ^[[92m[OKAY]^[[0m
random_ltd ............. ^[[93m[NO]^[[0m ....... ^[[92m[OKAY]^[[0m
^[[93m [WARNING] ^[[0m sparse_attn requires a torch version >= 1.5 and < 2.0 but detected 2.4
^[[93m [WARNING] ^[[0m using untested triton version (3.0.0+45fff310c8), only 1.0.0 is known to be compatible
sparse_attn ............ ^[[93m[NO]^[[0m ....... ^[[93m[NO]^[[0m
spatial_inference ...... ^[[93m[NO]^[[0m ....... ^[[92m[OKAY]^[[0m
transformer ............ ^[[93m[NO]^[[0m ....... ^[[92m[OKAY]^[[0m
stochastic_transformer . ^[[93m[NO]^[[0m ....... ^[[92m[OKAY]^[[0m

DeepSpeed general environment info:
torch install path ............... ['/home/alyssavance/miniforge3/envs/brr/lib/python3.10/site-packages/torch']
torch version .................... 2.4.0.dev20240609+cu124
deepspeed install path ........... ['/home/alyssavance/miniforge3/envs/brr/lib/python3.10/site-packages/deepspeed']
deepspeed info ................... 0.14.3, unknown, unknown
torch cuda version ............... 12.4
torch hip version ................ None
nvcc version ..................... 12.5
deepspeed wheel compiled w. ...... torch 2.4, cuda 12.4
shared memory (/dev/shm) size .... 1007.73 GB

System info (please complete the following information):

  • OS: Ubuntu 22.04
  • GPU count and types: 8x H100
  • Interconnects (if applicable): 3.2 Tbps Infiniband
  • Python version: 3.10.14
  • Any other relevant info about your setup

Launcher context
Are you launching your experiment with the deepspeed launcher, MPI, or something else?

Launching with Slurm via HuggingFace "accelerate launch"

Docker context
Are you using a specific docker image that you can share?

N/A

Additional context
Add any other context about the problem here.

N/A

@rosario-purple rosario-purple added bug Something isn't working training labels Jun 18, 2024
@loadams loadams self-assigned this Jun 18, 2024
@loadams
Copy link
Contributor

loadams commented Jun 18, 2024

Thanks @rosario-purple, we will take a look at these

github-merge-queue bot pushed a commit that referenced this issue Aug 20, 2024
deepspeed/runtime/zero/linear.py:67: FutureWarning:
`torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use
`torch.amp.custom_bwd(args..., device_type='cuda')` instead.

Fixes: #5682

---------

Co-authored-by: Logan Adams <114770087+loadams@users.noreply.github.com>
Co-authored-by: Olatunji Ruwase <olruwase@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working training
Projects
None yet
2 participants