Skip to content

[BUG] torch.norm is deprecated #4229

@njzjz

Description

@njzjz

Bug summary

See https://pytorch.org/docs/2.0/generated/torch.norm.html

shift_idx = xyz[torch.argsort(torch.norm(xyz, dim=1))]

DeePMD-kit Version

devel

Backend and its version

How did you download the software?

Built from source

Input Files, Running Commands, Error Log, etc.

This is detected by torchfix

deepmd/pt/utils/nlist.py:460:40: TOR101 Use of deprecated function torch.norm

Steps to Reproduce

Further Information, Files, and Links

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions