flare icon indicating copy to clipboard operation
flare copied to clipboard

Can not exclude stresses from training

Open FromColleWithLove opened this issue 1 year ago • 4 comments

I would like to train my model on forces and energies, excluding stresses. In my input.yaml i have:

input.yaml [.....] flare_calc:
gp: SGP_Wrapper kernels: - name: NormalizedDotProduct sigma: 3.0 power: 2 descriptors: - name: B2 nmax: 9 lmax: 3 cutoff_function: quadratic radial_basis: chebyshev cutoff_matrix: [[5.0]] energy_training: True force_training: True stress_training: False energy_noise: 0.3 forces_noise: 0.1 #stress_noise: 0.001 species: - 13 single_atom_energies: - 0 cutoff: 5.0 variance_type: local max_iterations: 50 use_mapping: True [.....]

This input worked well for trainings that include stresses, however, once I changed stress_training: False And commented the stress noise, I can not run the training. Instead I would get: output

Traceback (most recent call last): File "[...]/miniconda3/envs/envflare/bin/flare-otf", line 8, in sys.exit(main()) File "[....]/flare/flare/scripts/otf_train.py", line 378, in main fresh_start_otf(config) File "[....]/flare/flare/scripts/otf_train.py", line 324, in fresh_start_otf flare_calc, kernels = get_flare_calc(config["flare_calc"]) File "[....]/flare/flare/scripts/otf_train.py", line 99, in get_flare_calc return get_sgp_calc(flare_config) File "[....]/flare/flare/scripts/otf_train.py", line 295, in get_sgp_calc sgp = SGP_Wrapper( File "[.....]/flare/flare/bffs/sgp/sparse_gp.py", line 40, in __init__ self.sparse_gp = SparseGP(kernels, sigma_e, sigma_f, sigma_s) TypeError: __init__(): incompatible constructor arguments. The following argument types are supported: 1. flare.bffs.sgp._C_flare.SparseGP() 2. flare.bffs.sgp._C_flare.SparseGP(arg0: List[flare.bffs.sgp._C_flare.Kernel], arg1: float, arg2: float, arg3: float)

Invoked with: [<flare.bffs.sgp._C_flare.NormalizedDotProduct object at 0x7f8465bdae30>], 0.3, 0.1, None

Information FLARE version: 1.3.3

FromColleWithLove avatar Apr 15 '24 10:04 FromColleWithLove