deepmodeling / deepks-kit Goto Github PK
View Code? Open in Web Editor NEWa package for developing machine learning-based chemically accurate energy and density functional models
License: GNU Lesser General Public License v3.0
a package for developing machine learning-based chemically accurate energy and density functional models
License: GNU Lesser General Public License v3.0
In deepks/utils.py:L17, variable _coef
composes _table
and then DEFAULT_BASIS
. I couldn't find out how _coef
works for basis.
proj_basis = [[0, # l=0 azimuthal quantum number. Is it?
[4.0, 1.0, -1.0, 0.0, 0.0, 0.0], # 4.0 for radial length. Is it?
[2.0, 0.0, 1.0, -1.0, 0.0, 0.0], # I have no idea on the 5x5 diag block
[1.0, 0.0, 0.0, 1.0, -1.0, 0.0],
[0.5, 0.0, 0.0, 0.0, 1.0, -1.0],
[0.25, 0.0, 0.0, 0.0, 0.0, 1.0]],
[1,
[4.0, 1.0, -1.0, 0.0, 0.0, 0.0],
[2.0, 0.0, 1.0, -1.0, 0.0, 0.0],
[1.0, 0.0, 0.0, 1.0, -1.0, 0.0],
[0.5, 0.0, 0.0, 0.0, 1.0, -1.0],
[0.25, 0.0, 0.0, 0.0, 0.0, 1.0]],
[2,
[4.0, 1.0, -1.0, 0.0, 0.0, 0.0],
[2.0, 0.0, 1.0, -1.0, 0.0, 0.0],
[1.0, 0.0, 0.0, 1.0, -1.0, 0.0],
[0.5, 0.0, 0.0, 0.0, 1.0, -1.0],
[0.25, 0.0, 0.0, 0.0, 0.0, 1.0]],
]
The furthest code block I arrived at is pyscf/gto/mole/format_basis, and I think that [(l, ((-exp, c_1, c_2, ..),
in the function comments might be related to the _coef
above.
What are the rules/conventions for this format? And if you know, could you please provide me with more references for such a convention? Thanks!
Dear developers/users,
is there any simple way to print the coefficients and exponents of the gaussian primitive basis functions after a standard DFT single-point calculation? Thanks
Hi, I just to run this code in python 3.8. However an error is occurred since function time.clock()
is no longer supported.
So I thinks it is better to use new API in this repo.
I notice deepks-kit manifesto from zhihu.com and deepmd Wechat Official Accounts, also The DeepModeling Manifesto
. I hope I can do something.
This repo has few infomation about develop of deepks-kit, so is there any detail planning for deepks-kit, such as:
Actually I think dplibrary
is one good platform for data sharing, so will there be any API for users to directly download the data, model from dplibrary? Or deepks-kit will use another work flow?
In readme.md
, there are TODO section which mentions
four items to do. I offer some suggests for the second one "Rewrite all print function using logging":
I think in here logging
refers to python standard library logging
. And according to the library using command line mostly, we can set logging in one log.py file. Here I have two methods:
setup
function like (https://github.com/sehoonha/pydart2/blob/master/pydart2/utils/log.py);Logger
from logging.logger
like:import logging
from <root>.util.config import getGlobValue # get global variable
__all__ = [
"InfoLogger", "Logger"
]
"""
Predefined Loggers for project.
Usage:
```
from ..util.logger import InfoLogger
logger = InfoLogger(__name__,...) # all log above Info level will be logged.
```
"""
class BaseLogging(logging.Logger):
def __init__(self, name, level=logging.INFO, file=None, console_on=False):
"""
Parameters
----------
name: str
Name of logger
level: int
logging.INFO, logging.DEBUG,...
file: str or None
File name of log.
If None, log to console.
console_on: bool
If console_on, log to console anyway.
"""
super().__init__(name, level)
# format set of log
fmt = "PID:%(process)d [%(asctime)s]-[%(name)s]-[%(levelname)s]-[%(filename)s,line %(lineno)d] : %(message)s"
formatter = logging.Formatter(fmt)
# to file
if file:
file_handle = logging.FileHandler(file, encoding="utf-8")
file_handle.setFormatter(formatter)
self.addHandler(file_handle)
# to console when not setting log file.
else:
console_handle = logging.StreamHandler()
console_handle.setFormatter(formatter)
self.addHandler(console_handle)
# use console out when setting log file.
if file:
if console_on:
console_handle = logging.StreamHandler()
console_handle.setFormatter(formatter)
self.addHandler(console_handle)
class InfoLogger(BaseLogging):
"""
Default Logger to console with INFO level.
Set file to a real file to log in file.
Parameters
----------
name: str
Name of logger
"""
def __init__(self, name, **kwargs):
super(InfoLogger, self).__init__(name=name, level=logging.INFO, **kwargs)
class DebugLogger(BaseLogging):
"""
Default Logger to console with DEBUG level.
Set file to a real file to log in file.
Parameters
----------
name: str
Name of logger
"""
def __init__(self, name, **kwargs):
super(DebugLogger, self).__init__(name=name, level=logging.DEBUG, **kwargs)
def getLogger(level=logging.DEBUG):
"""
Generate a logger with level.
Parameters
----------
level
Returns
-------
A BaseLogging class.
"""
class RunTimeLogger(BaseLogging):
def __init__(self, name, **kwargs):
super(RunTimeLogger, self).__init__(name=name, level=level, **kwargs)
def isEnabledFor(self, level: int) -> bool:
self.setLevel(level=getGlobValue("log_level"))
self.level = getGlobValue("log_level")
return super(RunTimeLogger, self).isEnabledFor(level)
return RunTimeLogger
Logger = getLogger(level=getGlobValue("log_level"))
I hope I can do something, while I'm not sure what deepks-kit maintainers are planning now.
Moreover, it will be conventional to have a project kanban and show what maintainers are planning.
在abacus 里面 是否可以设置不同的自旋构型来学习,以及 我的训练数据的胞要不要很大,因为实验上的磁结构是一个可能涉及到很大的胞的螺旋磁结构,目前的PBE描述的不是很好,另外问一下 这个机器学习需要的资源以及时长,需不需要用到 GPU加速。
While running the deepks model, I encountered the following error during the iteration process:
err.iter:
#data_train/group.00 no system.raw, infer meta from data
#data_train/group.00 reset batch size to 0
#ignore empty dataset: data_train/group.00
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/home/ljcgroup/.conda/envs/deepks/lib/python3.11/site-packages/deepks/model/train.py", line 303, in
cli()
File "/home/ljcgroup/.conda/envs/deepks/lib/python3.11/site-packages/deepks/main.py", line 71, in train_cli
main(**argdict)
File "/home/ljcgroup/.conda/envs/deepks/lib/python3.11/site-packages/deepks/model/train.py", line 270, in main
g_reader = GroupReader(train_paths, **data_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ljcgroup/.conda/envs/deepks/lib/python3.11/site-packages/deepks/model/reader.py", line 207, in init
raise RuntimeError("No system is available")
RuntimeError: No system is available
Upon inspecting the iter.00/00.scf/log.data file, I noticed that none of the systems converged, leading to a lack of information for training. The content of log.data is as follows:
Training:
Convergence:
0 / 200 = 0.00000
Energy:
ME: 4.768164229534069
MAE: 8.715617244519633
MARE: 7.972705559173027
Force:
MAE: 1.0896364501030267
Testing:
Convergence:
0 / 200 = 0.00000
Energy:
ME: 4.768164229534069
MAE: 8.715617244519633
MARE: 7.972705559173027
Force:
MAE: 1.0896364501030267
I have verified that the system configurations are reasonable. Currently, another user also encountered the same problem. Any guidance on resolving this issue would be appreciated.
Environment Information: The water_single example is functioning correctly.
Thank you for your assistance!
While running the deepks model, I encountered the following issue:
File "/home/ljcgroup/.conda/envs/deepks/lib/python3.11/site-packages/deepks/model/reader.py", line 79, in prepare
data_dm = np.load(self.d_path).reshape(raw_nframes, self.natm, self.ndesc)
ValueError: cannot reshape array of size 28800 into shape (40000,8,18)
Upon inspection, it appears that the program generated a file of size (200, 200) named l_e_delta, where e_name=l_e_delta and self.e_path = self.check_exist(e_name+".npy"). The error occurred in reader.py at line 77.data_ec = np.load(self.e_path).reshape(-1, 1) I don't know why this code resulted in an incorrect shape of (40000,1).
I expect the data from l_e_delta.npy to be reshaped to the expected shape of (200, 8, 18). I have also confirmed that the actual size of the l_e_delta.npy file is 28800 elements. Please assist in examining the code in reader.py responsible for ensuring proper data handling and reshaping.
I want to train a deepks model based on GaN system like single water molecule case and would like to know what are the requirements for the GaN system used to produce the dataset. Here are some queries to be answered, thanks!
water_single
for molecular system or water_single_lda2pbe_abacus
for periodic system. When running these sample jobs, try to get some idea about the built-in workflow in DeePKS-kit.While generating a dataset for AIMD using VASP and subsequent calculation with Abacus, I encountered the following issues:
Upon setting the lattice constant to 1 in VASP, I received the warning message "!!! WARNING: Some atoms are too close!!!!!! Please check the nearest-neighbour list". Additionally, the convergence was very poor, approximately 0.3.
After realizing that VASP uses Angstrom units, I adjusted the lattice constant to 1.8897259886. However, none of the configurations converged.
Upon inspecting the configurations, I did not notice significant deformations beyond the normal range for molecular dynamics simulations.
I am seeking guidance on addressing these issues to ensure proper convergence.
Additional Context:
Software: VASP 6.3.1, Abacus3.5.3
The water_single example is functioning correctly.
Description:
The format generated using dpdata is suitable for deepmd but not for deepks training.
Question:
While using DeepKS, I observed an anomaly regarding convergence rates during the initial iteration (iter. init) and subsequent iterative loop (iter.00).
During the first iteration (iter. init), the convergence rates were satisfactory with a training set rate of 0.77 and a testing set rate of 0.88.
However, upon entering the iterative loop (iter.00), the convergence rates dropped to 0, rendering further computation impossible.
Another user reported this issue as well.
Additional Context:
Software: DeepKS, abacus 3.5.3
The DeePKS water_single example can run correctly on my machine.
Thank you so much for your help in addressing this issue.
As mentioned on the doc, on a local machine or on a cluster via slurm or PBS, it is recommended to use the DeePKS built-in dispatcher by machine.yaml, but for other schedule system like LSF, built-in dispatcher does not support that.
When I try to run a 70 atom system, it reported a memory error. So I expand the original water single example system(https://github.com/deepmodeling/deepks-kit/tree/master/examples/water_single/) to help locating the problem.
20 copies of the original water_single system(simple make a 20 copies of the original water_single system):
yaml file follow the default setting : https://github.com/deepmodeling/deepks-kit/tree/master/examples/water_single/iter/args.yaml
atom.npy:
water_single default(300, 3, 4)
20 water molecules:(400, 60, 4)
change description: I replicated 3 water atoms by 20 times. that is from 1 water molecule to 20 water molecules system; also shift x y z by 2 unit to avoid atom overlap
20 molecules frame like this:
[[ 8.00000000e+00 -5.66894076e+00 2.63522653e+01 1.37552230e+01]
[ 1.00000000e+00 -4.64473727e+00 2.62987038e+01 1.21355646e+01]
[ 1.00000000e+00 -6.54175752e+00 2.79952980e+01 1.36818251e+01]
...
[ 8.00000000e+00 3.74331059e+02 4.06352265e+02 3.93755223e+02]
[ 1.00000000e+00 3.75355263e+02 4.06298704e+02 3.92135565e+02]
[ 1.00000000e+00 3.73458242e+02 4.07995298e+02 3.93681825e+02]]
original 1 water molecule frame like this :
[[ 8.00000000e+00 -5.66894076e+00 2.63522653e+01 1.37552230e+01]
[ 1.00000000e+00 -4.64473727e+00 2.62987038e+01 1.21355646e+01]
[ 1.00000000e+00 -6.54175752e+00 2.79952980e+01 1.36818251e+01]]
energy.npy:
water_single default:(300, 1)
20 water molecules:(400, 1)
note: no change
force.npy:
water_single default(300, 3, 3)
20 water molecules(400, 60, 3)
change description: I replicated force 20 times. No change of force value, that is 20 water molecules has the same force value
20 molecules frame like this:
[[ 0.01365311 0.01130072 -0.03252444]
[-0.02535562 0.00565212 0.03616008]
[ 0.01170251 -0.01695284 -0.00363565]
...
[ 0.01365311 0.01130072 -0.03252444]
[-0.02535562 0.00565212 0.03616008]
[ 0.01170251 -0.01695284 -0.00363565]]
original 1 water molecule frame like this :
[[ 0.01365311 0.01130072 -0.03252444]
[-0.02535562 0.00565212 0.03616008]
[ 0.01170251 -0.01695284 -0.00363565]]
Error output:
key screening print:
starting step: (0,)
starting step: (0, 0)
starting step: (0, 0, 0)
new submission of d5963352-3a10-4a6c-836e-281da236d34f for chunk 43ee2d12b8f2311e3a7da9df67f22ae37cf9c937
job d5963352-3a10-4a6c-836e-281da236d34f terminated, submit again
job d5963352-3a10-4a6c-836e-281da236d34f terminated, submit again
job d5963352-3a10-4a6c-836e-281da236d34f terminated, submit again
key error from err file(in folder : deepks-kit-master/examples/water_single_one/iter/iter.init/00.scf/task.trn.00):
systems/group.00 failed! error: Unable to allocate 49.6 GiB for an array with shape (6663254520,) and data type float64
Traceback (most recent call last):
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/run.py", line 268, in
cli()
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/main.py", line 174, in scf_cli
main(**argdict)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/run.py", line 236, in main
meta, result = solve_mol(mol, model, fields, labels,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/run.py", line 52, in solve_mol
cf.kernel()
File "", line 2, in kernel
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/scf/hf.py", line 1692, in scf
kernel(self, self.conv_tol, self.conv_tol_grad,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/scf/hf.py", line 128, in kernel
vhf = mf.get_veff(mol, dm)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/scf.py", line 146, in get_veff
v0 = self.get_veff0(mol, dm, dm_last, v0_last, hermi)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/scf.py", line 112, in get_veff0
return super().get_veff(*args, *kwargs)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/dft/rks.py", line 116, in get_veff
vj, vk = ks.get_jk(mol, dm, hermi)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/scf/hf.py", line 2047, in get_jk
self._eri = mol.intor('int2e', aosym='s8')
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/gto/mole.py", line 3460, in intor
return moleintor.getints(intor, self._atm, bas, env,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/gto/moleintor.py", line 240, in getints
return getints4c(intor_name, atm, bas, env, shls_slice, comp,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/gto/moleintor.py", line 598, in getints4c
out = numpy.ndarray((nao_pair(nao_pair+1)//2), buffer=out)
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 49.6 GiB for an array with shape (6663254520,) and data type float64
Running command:
python -u -m deepks iterate args.yaml
my System description:
Ubuntu18 running in VMware® Workstation 15 Pro(Windows 10, 64-bit)
4 CPU core,8G memory for Ubuntu18
Install description:
created DeePKS environment using Conda and installed pytorch following this link (https://deepks-kit.readthedocs.io/en/latest/installation.html)
then install deepks by: pip install git+https://github.com/deepmodeling/deepks-kit (master branch, not abacus branch here)
same 20 copies of water system can run correctly in deepks abacus branch, by following the setting in example/water_single_lda2pbe_abacus folder
70 atom system:
400 frames,70 atoms,C14 H1 N12 O8 S16 , float64 type
using default setting: deepks\examples\water_single\iter\args.yaml
Error output:
key screening print:
/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/paramiko/transport.py:219: CryptographyDeprecationWarning: Blowfish has been deprecated
"class": algorithms.Blowfish,
starting step: (0,)
starting step: (0, 0)
starting step: (0, 0, 0)
new submission of d5963352-3a10-4a6c-836e-281da236d34f for chunk 43ee2d12b8f2311e3a7da9df67f22ae37cf9c937
job d5963352-3a10-4a6c-836e-281da236d34f terminated, submit again
job d5963352-3a10-4a6c-836e-281da236d34f terminated, submit again
job d5963352-3a10-4a6c-836e-281da236d34f terminated, submit again
Traceback (most recent call last):
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/main.py", line 11, in
main_cli()
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/main.py", line 37, in main_cli
sub_cli(args.args)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/main.py", line 259, in iter_cli
main(**argdict)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/iterate/iterate.py", line 351, in main
iterate.run()
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/task/workflow.py", line 49, in run
task.run(curr_tag)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/task/workflow.py", line 49, in run
task.run(curr_tag)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/task/workflow.py", line 49, in run
task.run(curr_tag)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/task/task.py", line 88, in run
self.execute()
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/task/task.py", line 214, in execute
self.dispatcher.run_jobs(tdicts, group_size=self.group_size, para_deg=self.para_deg,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/task/job/dispatcher.py", line 118, in run_jobs
while not self.all_finished(job_handler, mark_failure) :
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/task/job/dispatcher.py", line 257, in all_finished
raise RuntimeError('Job %s failed for more than 3 times' % job_uuid)
RuntimeError: Job d5963352-3a10-4a6c-836e-281da236d34f failed for more than 3 times
key error from err file: (deepks-kit-master/examples/water_single_one/iter/iter.init/00.scf/task.trn.00):
systems/group.00 failed! error: Unable to allocate 219. GiB for an array with shape (29416827846,) and data type float64
Traceback (most recent call last):
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/run.py", line 268, in
cli()
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/main.py", line 174, in scf_cli
main(**argdict)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/run.py", line 236, in main
meta, result = solve_mol(mol, model, fields, labels,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/run.py", line 52, in solve_mol
cf.kernel()
File "", line 2, in kernel
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/scf/hf.py", line 1692, in scf
kernel(self, self.conv_tol, self.conv_tol_grad,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/scf/hf.py", line 128, in kernel
vhf = mf.get_veff(mol, dm)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/scf.py", line 146, in get_veff
v0 = self.get_veff0(mol, dm, dm_last, v0_last, hermi)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/deepks/scf/scf.py", line 112, in get_veff0
return super().get_veff(*args, *kwargs)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/dft/uks.py", line 87, in get_veff
vj, vk = ks.get_jk(mol, dm, hermi)
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/scf/uhf.py", line 902, in get_jk
self._eri = mol.intor('int2e', aosym='s8')
dddFile "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/gto/mole.py", line 3460, in intor
return moleintor.getints(intor, self._atm, bas, env,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/gto/moleintor.py", line 240, in getints
return getints4c(intor_name, atm, bas, env, shls_slice, comp,
File "/home/manager/anaconda3/envs/deepks/lib/python3.10/site-packages/pyscf/gto/moleintor.py", line 598, in getints4c
out = numpy.ndarray((nao_pair(nao_pair+1)//2), buffer=out)
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 219. GiB for an array with shape (29416827846,) and data type float64
Python version: Python 3.8.6
I use pip to install all the required packages listed below:
torch:1.9.0
deepks :0.2.dev60+g250a15b
numpy :1.19.4
paramiko:2.7.2
pyscf :1.7.6
then I git clone the deepks-kit repository into my desktop, I run
"deepks iterate machines.yaml params.yaml systems.yaml"
in the init document as described in the README file. But then I have this error coming out
Any help or suggestion is appreciated.
When using the following package versions:
Package Version
bcrypt 4.0.1
certifi 2023.11.17
cffi 1.16.0
charset-normalizer 3.3.2
cryptography 41.0.5
dargs 0.4.3
deepks 0.2.dev79+g7978b39
dpdispatcher 0.6.2
idna 3.4
numpy 1.26.2
paramiko 3.3.1
pip 23.3
pycparser 2.21
PyNaCl 1.5.0
PyYAML 6.0.1
requests 2.31.0
ruamel.yaml 0.18.5
ruamel.yaml.clib 0.2.8
setuptools 68.0.0
tqdm 4.66.1
typeguard 4.1.5
typing_extensions 4.8.0
urllib3 2.1.0
wheel 0.41.2
The following error will occur:
Traceback (most recent call last):
File "/opt/mamba/envs/deepks/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/opt/mamba/envs/deepks/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/opt/mamba/envs/deepks/lib/python3.10/site-packages/deepks/main.py", line 11, in
main_cli()
File "/opt/mamba/envs/deepks/lib/python3.10/site-packages/deepks/main.py", line 37, in main_cli
sub_cli(args.args)
File "/opt/mamba/envs/deepks/lib/python3.10/site-packages/deepks/main.py", line 254, in iter_cli
argdict = deep_update(argdict, load_yaml(fl))
File "/opt/mamba/envs/deepks/lib/python3.10/site-packages/deepks/utils.py", line 138, in load_yaml
res = yaml.safe_load(fp)
File "/opt/mamba/envs/deepks/lib/python3.10/site-packages/ruamel/yaml/main.py", line 1105, in safe_load
error_deprecation('safe_load', 'load', arg="typ='safe', pure=True")
File "/opt/mamba/envs/deepks/lib/python3.10/site-packages/ruamel/yaml/main.py", line 1039, in error_deprecation
raise AttributeError(s, name=None)
AttributeError:
"safe_load()" has been removed, use
yaml = YAML(typ='safe', pure=True)
yaml.load(...)
instead of file "/opt/mamba/envs/deepks/lib/python3.10/site-packages/deepks/utils.py", line 138
res = yaml.safe_load(fp)
The safe_load and safe_dump functions used in deepks/utils.py has been deprecated since yaml 0.15.0. See https://yaml.readthedocs.io/en/latest/api/. We should think about update the supported version of yaml package.
hi, How to debug deepks in local pycharm? Any good practice? I tried debug main.py but found many mismatch of paths
python3 ~/Downloads/git/deepks-kit/deepks/main.py iterate ../examples/water_single/init/machines.yaml ../examples/water_single/init/params.yaml ../examples/water_single/init/systems.yaml
Traceback (most recent call last):
File "/Users/bytedance/Downloads/git/deepks-kit/deepks/main.py", line 263, in
main_cli()
File "/Users/bytedance/Downloads/git/deepks-kit/deepks/main.py", line 37, in main_cli
sub_cli(args.args)
File "/Users/bytedance/Downloads/git/deepks-kit/deepks/main.py", line 259, in iter_cli
main(**argdict)
File "/Users/bytedance/Downloads/git/deepks-kit/deepks/iterate/iterate.py", line 312, in main
iterate = make_iterate(args, **kwargs)
File "/Users/bytedance/Downloads/git/deepks-kit/deepks/iterate/iterate.py", line 231, in make_iterate
systems_train = collect_systems(systems_train, os.path.join(share_folder, SYS_TRAIN))
File "/Users/bytedance/Downloads/git/deepks-kit/deepks/iterate/iterate.py", line 105, in collect_systems
parents, bases = map(list, zip([os.path.split(s.rstrip(os.path.sep))
ValueError: not enough values to unpack (expected 2, got 0)
Process finished with exit code 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.