Comments (2)
Hi @rschireman,
Sure, with some small modification below on the source code, you can sweep hyperparameters.
In nequip/scripts/train.py
line 25, change the default run_name="NequIP",
into run_name="rand_"+str(uuid.uuid4()),
and insert import uuid
in the first line so that the sweep will generate random run_name
for the calculations.
You can either change the code in your environment directly or on the source code with pip install .
.
Then you can create two config file, one for the sweep hyperparameter and one for the basic config file.
For sweep_config.yaml
, here is an example:
project: {your project name}
program: nequip-train
method: random
name: sweep_1
description: sweep over loss coefficients and batch size
# metric:
# goal: minimize
# name: validation_f_rmse
command:
- ${env}
- ${program}
- ".../base.yaml" # Absolute path of your basic config yaml file
parameters:
batch_size:
distribution: int_uniform
min: 1
max: 5
loss_coeffs:
parameters:
stress:
distribution: uniform
min: 1.0
max: 10.0
total_energy:
value:
- 1.
- PerAtomMSELoss
forces:
distribution: uniform
min: 1
max: 10
Hope it helps!
from nequip.
Thanks very much for posting this info @Hongyu-yu !
An alternative, without modifying the source, would then also be to make your program
in for wandb a simple python script that gets the JSON config of the sweep hyperparams, reads the base config, and writes a new YAML file of the merge for the specific run. This script could be re-used for all sweeps.
If that is the only modification needed to make it work, alternatively, we could add a --uuid-run-name
flag to nequip-train
so this works out of the box. The only unpleasant thing about that is that restarting/finding training runs becomes a pain, since you have to go through each uuid named dir looking for the right values in config.yaml
.
from nequip.
Related Issues (20)
- The use of nequip command HOT 1
- 🐛 [BUG] Cannot run nequip-train with provided example HOT 4
- 🌟 [FEATURE]How to Train and Validate on Separate Datasets HOT 2
- How to do custom EarlyStopping?❓ [QUESTION] HOT 4
- ❓ [QUESTION]
- ❓ [QUESTION] About the data class AtomicData HOT 3
- bugs with "initialize_from_state"🐛 [BUG] HOT 5
- how to choose nosehoover the value of nvt_q❓ [QUESTION]
- ❓ [QUESTION]Finetuning Validation Error Higher than Pre-training Error in Nequip
- Confusion about `num_frames` attribute in `HDF5Dataset` HOT 1
- ❓ [QUESTION]how can I use the ase calculator for testing ?
- What is the unit of virials❓ [QUESTION] HOT 3
- MLFF for Silicon
- minimal extxyz
- ❓ [QUESTION] cannot repeat the RMSE of water dataset
- 🌟 [FEATURE] Custom properties HOT 1
- 🐛 [BUG] Using initialize_from_state HOT 3
- Default Units in the outputs of training HOT 1
- ❓ [QUESTION] How to use hdf5 dataset in config files?
- 🐛 [BUG] `InvalidVersion` in v0.6.0 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 nequip.