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] torch.norm is deprecated #4229

Closed
njzjz opened this issue Oct 18, 2024 · 0 comments · Fixed by #4233
Closed

[BUG] torch.norm is deprecated #4229

njzjz opened this issue Oct 18, 2024 · 0 comments · Fixed by #4233
Labels
Milestone

Comments

@njzjz
Copy link
Member

njzjz commented Oct 18, 2024

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

@njzjz njzjz added the bug label Oct 18, 2024
@njzjz njzjz added this to the v3.0.0 milestone Oct 18, 2024
@njzjz njzjz moved this to mustfix in DeePMD-kit V3.0.0 RC Oct 18, 2024
@wanghan-iapcm wanghan-iapcm linked a pull request Oct 20, 2024 that will close this issue
@njzjz njzjz closed this as completed Oct 20, 2024
@github-project-automation github-project-automation bot moved this from mustfix to Done in DeePMD-kit V3.0.0 RC Oct 20, 2024
github-merge-queue bot pushed a commit that referenced this issue Oct 23, 2024
Enable [TorchFix](https://github.com/pytorch-labs/torchfix).

Need to resolve the following issues before merging:
- #4229
- #4143

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
	- Integrated `flake8` for enhanced code quality checks.
	- Added `ruff-format` hook for improved linting.
- Implemented consistent license header insertion for various file
types.

- **Bug Fixes**
- Updated `check-added-large-files` hook to enforce a maximum file size
of 1024 KB.

- **Documentation**
	- Updated linting configuration with new rules under `[tool.flake8]`.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

1 participant