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

A series of warnings often appear while using DeePMD-kit #2367

Closed
JTaozhang opened this issue Mar 4, 2023 · 2 comments · Fixed by #4199
Closed

A series of warnings often appear while using DeePMD-kit #2367

JTaozhang opened this issue Mar 4, 2023 · 2 comments · Fixed by #4199

Comments

@JTaozhang
Copy link

Summary

it is a question about DeepMD shows some warnings when I use it. The sofware doesn't report any errors. I want to know the reasons, how to solve those warnings and whether we can ignore them.

DeePMD-kit Version

deePMD-kit v2.1.5

TensorFlow Version

tensorflow 2.9.0

Python Version, CUDA Version, GCC Version, LAMMPS Version, etc

I use the python version of deepMD and run it on linux system with multiple calculation nodes.

Details

when I use the deePMD softeware, it always shows some warnings。
warning 1: "WARNING:tensorflow:From /public/home/ZT/.conda/envs/deepmd/lib/python3.10/site-packages/tensorflow/python/compat/v2_compat.py:107: disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
This warning would apppear, although I used the somple command "dp --version", and no matter only CPU version or GPU version.

warning 2:WARNING:root:To get the best performance, it is recommended to adjust the number of threads by setting the environment variables OMP_NUM_THREADS, TF_INTRA_OP_PARALLELISM_THREADS, and TF_INTER_OP_PARALLELISM_THREADS..

warning 3: WARNING:root:Environment variable KMP_BLOCKTIME is empty. Use the default value 0; WARNING:root:Environment variable KMP_AFFINITY is empty. Use the default value granularity=fine,verbose,compact,1,0

warning 4: /public/home/ZT/.conda/envs/deepmd/lib/python3.10/importlib/init.py:169: UserWarning: The NumPy module was reloaded (imported a second time). This can in some cases result in small but subtle issues and is discouraged.

As for the warning 1 and 4, I want to ask the developers the reason why those warning appears, and how to solve them? Those warnings whether have innegligible influence on the calculation accuracy, or we can neglect them?

As for the warning 2 and 3, it seems these paramters use default value and they only have influence on the speed of calculation. How to set them, using export="these parameters"?

@njzjz
Copy link
Member

njzjz commented Oct 18, 2023

I check all the warnings.

Warning 1 is thrown by TensorFlow. There is nothing we can do.

For warning 2, a link to documentation has been added in #2362.

Warning 3 is straightforward.

Warning 4 is thrown by the Python imp module.

So there is nothing to do with us in this issue.

@njzjz njzjz closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2023
@njzjz
Copy link
Member

njzjz commented Oct 10, 2024

Reopen. It seems the TensorFlow warnings can be filtered.

@njzjz njzjz reopened this Oct 10, 2024
@njzjz njzjz added enhancement and removed wontfix labels Oct 10, 2024
njzjz added a commit to njzjz/deepmd-kit that referenced this issue Oct 10, 2024
Fix deepmodeling#2367. Fix deepmodeling#3069.

These warnings are not true - these deprecated APIs have existed for several years and never been removed.

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@njzjz njzjz linked a pull request Oct 10, 2024 that will close this issue
github-merge-queue bot pushed a commit that referenced this issue Oct 13, 2024
Fix #2367. Fix #3039.

These warnings are not true - these deprecated APIs have existed for
several years and never been removed.

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

## Summary by CodeRabbit

- **New Features**
	- Enhanced logging capabilities for TensorFlow warnings.
- Introduced a new filter to manage specific warning messages from the
TensorFlow logger.

- **Bug Fixes**
- Improved the configuration sequence for the TensorFlow logger to
ensure proper functionality.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@njzjz njzjz closed this as completed Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants