Comments (8)
@YunxingZuo it seems that there are no validation data inputs for the NNP training, but the codes try to find validation errors from outputs. Could you please check that? THANKS!
from maml.
Essentially the underlying n2p2 use the keyword "test_fraction" to split the data inputs into training and validation set. In maml, the default value is set to 0 as all the data inputs are used for training. A separate test dataset is used for evaluation. @Akram-Ibrahim Can you provide a snippet of code/data for us to reproduce the error you met? The version information of n2p2 and maml are appreciated.
from maml.
@YunxingZuo I'm using maml 0.0.2. For n2p2, I've cloned the n2p2 github repository a week ago.
Here is a snippet of my code/data.
snippet.zip
Thank you for the help!
from maml.
@Akram-Ibrahim Please update the maml package and run the code again. The error is due to the minor change of the new n2p2 output format. They changed the keyword "FORCES" to "FORCE". Now the NNPotential module is compatible with both new and old versions of n2p2.
from maml.
@YunxingZuo Thank you so much. However, I've tried updating the maml package with pip but I still get the version 0.0.2 and the error is still occurring with the NNPotential.
from maml.
This is strange... Could you run the following snippet of code and paste the file "training_output"? Thanks.
import numpy as np
import pandas as pd
from pymatgen import Structure
import subprocess
from pymatgen.io.vasp.outputs import Vasprun
import os
import json
from maml.utils import pool_from, convert_docs, check_structures_forces_stresses
# load the training pymatgen structures
with open('structures.json', 'r') as f:
d = json.load(f)
train_structures = [Structure.from_dict(x) for x in d]
# load the training energies
with open('energies.json', 'r') as f:
d= json.load(f)
train_energies = [x for x in d]
# load the training forces
with open('forces.json', 'r') as f:
d= json.load(f)
train_forces = [x for x in d]
# train potential step by step
train_structures, train_forces, train_stresses = check_structures_forces_stresses(
train_structures, train_forces, None)
train_pool = pool_from(train_structures, train_energies, train_forces, train_stresses)
atoms_filename = "input.data"
_ = nnp.write_cfgs(filename=atoms_filename, cfg_pool=train_pool)
output = "training_output"
nnp.write_input(cutoff_type=1,
r_etas = [0.5, 2.0], a_etas = [0.5, 2.0],
r_shift=[0.0],
zetas=[1.0, 4.0],
r_cut=4.2, hidden_layers=[2, 2], epochs=3)
p_scaling = subprocess.Popen(["nnp-scaling", "100"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
stdout, stderr = p_scaling.communicate()
p_train = subprocess.Popen(["nnp-train"], stdout=open(output, "w"), stderr=subprocess.PIPE)
stdout, stderr = p_train.communicate()
from maml.
@Akram-Ibrahim @YunxingZuo I just did a release. Version 0.0.4 should be available now via pypi
from maml.
@chc273 @YunxingZuo Thanks a lot. I've updated the maml package now and the 0.0.4 has been loaded and the error doesn't appear anymore.
from maml.
Related Issues (20)
- ValueError: could not convert string to float: ' command mindist does not exist.\n' HOT 14
- Assigning weights for each group in SNAP.train HOT 4
- Pip package contains mypy cache HOT 3
- Bowsr `minimize()` still raises IndexError
- Question about radius in BOWSR readme example HOT 7
- BayesianOptimizer.optimize() too verbose HOT 1
- A code running error HOT 1
- Training data HOT 1
- `citation.cff`
- a Code running error (Example for MTP fitting) HOT 12
- How to use potential in lammps? HOT 1
- AtomSets | Validation set splitting HOT 1
- Difference compared to FitSNAP
- The problem of model training efficiency HOT 2
- MTP example notebook (issue with imports) HOT 2
- MLIP MTP notebook HOT 6
- Running error in the mtp example in notebook HOT 1
- [Bug]: Running error in the nnp example in notebook HOT 1
- An Error occurred when I try to run GAP code in notebooks/pes/gap/example.ipynb HOT 1
- [Bug]: `Parallel`/`multiprocessing` do not work for `Describer`s HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maml.