Replies: 2 comments 1 reply
-
This error means the file is not in a valid JSON format. |
Beta Was this translation helpful? Give feedback.
1 reply
-
JSONDecodeError: Expecting property name enclosed in double quotes: line 12 Extra comma in line 12 of machine.jons |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I ran the dpgen using following command--
dpgen run param.json machine.json
Output --
Traceback (most recent call last):
File "/public/home/hrzdsg/anaconda3/lib/python3.8/site-packages/dpgen/generator/run.py", line 3557, in run_iter
mdata=loadfn(machine_file)
File "/public/home/hrzdsg/anaconda3/lib/python3.8/site-packages/monty/serialization.py", line 72, in loadfn
return json.load(fp, *args, **kwargs)
File "/public/home/hrzdsg/anaconda3/lib/python3.8/json/init.py", line 293, in load
return loads(fp.read(),
File "/public/home/hrzdsg/anaconda3/lib/python3.8/json/init.py", line 370, in loads
return cls(**kw).decode(s)
File "/public/home/hrzdsg/anaconda3/lib/python3.8/site-packages/monty/json.py", line 474, in decode
d = json.loads(s)
File "/public/home/hrzdsg/anaconda3/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/public/home/hrzdsg/anaconda3/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/public/home/hrzdsg/anaconda3/lib/python3.8/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 12 column 4 (char 240)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/public/home/hrzdsg/anaconda3/bin/dpgen", line 8, in
sys.exit(main())
File "/public/home/hrzdsg/anaconda3/lib/python3.8/site-packages/dpgen/main.py", line 185, in main
args.func(args)
File "/public/home/hrzdsg/anaconda3/lib/python3.8/site-packages/dpgen/generator/run.py", line 3642, in gen_run
run_iter (args.PARAM, args.MACHINE)
File "/public/home/hrzdsg/anaconda3/lib/python3.8/site-packages/dpgen/generator/run.py", line 3562, in run_iter
mdata = json.load (fp)
File "/public/home/hrzdsg/anaconda3/lib/python3.8/json/init.py", line 293, in load
return loads(fp.read(),
File "/public/home/hrzdsg/anaconda3/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/public/home/hrzdsg/anaconda3/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/public/home/hrzdsg/anaconda3/lib/python3.8/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 12 column 4 (char 240)
The example is from tutorial of DP-GEN and here is the machine.json, param.json
machine.json
{
"api_version": "1.0",
"deepmd_version": "2.0.1",
"train" :[
{
"machine": {
"batch_type": "Slurm",
"hostname": "192.168.2.185",
"port": 22,
"username": "hrzdsg",
"work_path": "/public/home/hrzdsg/tmp/train",
},
"resources": {
"task_per_node": 4,
"numb_node": 1,
"numb_gpu": 0,
"partition": "debug",
"exclude_list": [],
"source_list": [
"/public/home/hrzdsg/anaconda3/bin/dpgen"
],
"_module_list": [],
"time_limit": "23:0:0",
"qos": "data"
},
"comman": "/public/home/hrzdsg/anaconda3/bin/python3.8",
}
],
"model_devi":[
{
"machine": {
"machine_type": "Slurm",
"hostname": "192.168.2.185",
"port": 22,
"username": "hrzdsg",
"work_path": "/public/home/hrzdsg/tmp/train",
},
"resources": {
"task_per_node": 4,
"numb_node": 1,
"numb_gpu": 0,
"partition": "debug",
"exclude_list": [],
"source_list": [
"/public/home/hrzdsg/anaconda3/envs/deepmd"
],
"_module_list": [
"fftw/3.1.2",
"openmpi/1.10.2",
"deepmd-kit/2.1.1"
],
"time_limit": "23:0:0",
},
"comman": "/public/home/hrzdsg/Code/bc/lammps",
"group_size": 5
}
],
"fp":[
{
"machine": {
"machine_type": "Slurm",
"hostname": "192.168.2.185",
"port": 22,
"username": "hrzdsg",
"work_path": "/public/home/hrzdsg/tmp/train",
},
"resources": {
"task_per_node": 4,
"numb_node": 1,
"numb_gpu": 0,
"exclude_list": [],
"with_mpi": false,
"source_list": [],
"_module_list": [
"intel/2020",
"intelmpi/2018",
"mkl",
"fftw",
"vasp/5.4.1"
],
"time_limit": "12:0:0",
"partition": "debug",
"_comment": "that's All"
},
"comman": "mpirun -np 24 /public/home/hrzdsg/vasp/vasp.5.4.1/bin/vasp_std",
"group_size": 1
}
],
}
param.json
{
"type_map": ["H","C"],
"mass_map": [1,12],
"init_data_prefix": "../",
"init_data_sys": ["init/CH4.POSCAR.01x01x01/02.md/sys-0004-0001/deepmd"],
"sys_configs_prefix": "../",
"sys_configs": [
["init/CH4.POSCAR.01x01x01/01.scale_pert/sys-0004-0001/scale-1.000/00000*/POSCAR"],
["init/CH4.POSCAR.01x01x01/01.scale_pert/sys-0004-0001/scale-1.000/00001*/POSCAR"]
],
"_comment": " that's all ",
"numb_models": 4,
"default_training_param": {
"model": {
"type_map": ["H","C"],
"descriptor": {
"type": "se_a",
"sel": [16,4],
"rcut_smth": 0.5,
"rcut": 5.0,
"neuron": [120,120,120],
"resnet_dt": true,
"axis_neuron": 12,
"seed": 1
},
"fitting_net": {
"neuron": [25,50,100],
"resnet_dt": false,
"seed": 1
}
},
"learning_rate": {
"type": "exp",
"start_lr": 0.001,
"decay_steps": 5000
},
"loss": {
"start_pref_e": 0.02,
"limit_pref_e": 2,
"start_pref_f": 1000,
"limit_pref_f": 1,
"start_pref_v": 0.0,
"limit_pref_v": 0.0
},
"training": {
"stop_batch": 2000,
"disp_file": "lcurve.out",
"disp_freq": 1000,
"numb_test": 4,
"save_freq": 1000,
"save_ckpt": "model.ckpt",
"disp_training": true,
"time_training": true,
"profiling": false,
"profiling_file": "timeline.json",
"_comment": "that's all"
}
},
"model_devi_dt": 0.002,
"model_devi_skip": 0,
"model_devi_f_trust_lo": 0.05,
"model_devi_f_trust_hi": 0.15,
"model_devi_e_trust_lo": 10000000000.0,
"model_devi_e_trust_hi": 10000000000.0,
"model_devi_clean_traj": true,
"model_devi_jobs": [
{"sys_idx": [0],"temps": [100],"press": [1.0],"trj_freq": 10,"nsteps": 300,"ensemble": "nvt","_idx": "00"},
{"sys_idx": [1],"temps": [100],"press": [1.0],"trj_freq": 10,"nsteps": 3000,"ensemble": "nvt","_idx": "01"}
],
"fp_style": "vasp",
"shuffle_poscar": false,
"fp_task_max": 20,
"fp_task_min": 5,
"fp_pp_path": "./",
"fp_pp_files": ["POTCAR_H","POTCAR_C"],
"fp_incar": "./INCAR_methane"
}
thanks
Beta Was this translation helpful? Give feedback.
All reactions