Skip to content

Commit

Permalink
Adding tutorial notebook on training a model
Browse files Browse the repository at this point in the history
  • Loading branch information
silkemaes committed Oct 21, 2024
1 parent 59c3f39 commit 875298d
Show file tree
Hide file tree
Showing 21 changed files with 831 additions and 113 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ For more details, check out our paper: [Maes et al. (2024)](https://ui.adsabs.ha

The script ```routine.py``` gives the flow of training & storing a MACE architecture, and immediately applies to the specified test dataset once training is finished. As such, it returns an averaged error on the MACE model compared to the classical model. More info on the training routine can be found in the [paper](https://ui.adsabs.harvard.edu/abs/2024arXiv240503274M/abstract).

An annotated notebook of the routine can be found in the [documentation](https://mace-code.readthedocs.io/en/latest/use/index.html).
An annotated notebook of the routine can be found in [here](https://github.com/silkemaes/MACE/blob/JOSS/routine.ipynb).

The script ```routine.py``` takes an input file with the needed (hyper)parameter setup. An example of such an input file can be found in input/.
```
Expand Down
10 changes: 5 additions & 5 deletions data/paths_train_data.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/lhome/silkem/CHEM/Output_nov2022/20211014_gridC_Mdot1e-6_v12-5_T_eps/models/model_2022-12-23h10-52-30/csfrac_smooth.out
/lhome/silkem/CHEM/Output_nov2022/20211014_gridC_Mdot2e-7_v7-5_T_eps/models/model_2022-12-23h14-08-04/csfrac_smooth.out
/lhome/silkem/CHEM/Output_nov2022/20211014_gridC_Mdot2e-8_v10_T_eps/models/model_2022-12-25h13-20-46/csfrac_smooth.out
/lhome/silkem/CHEM/Output_nov2022/20210527_gridC_Mdot5e-5_v22-5_T_eps/models/model_2022-12-27h10-44-23/csfrac_smooth.out
/lhome/silkem/CHEM/Output_nov2022/20211014_gridC_Mdot1e-7_v15_T_eps/models/model_2022-12-28h15-08-21/csfrac_smooth.out
20211014_gridC_Mdot1e-6_v12-5_T_eps_model_2022-12-23h10-52-30/csfrac_smooth.out
20211014_gridC_Mdot2e-7_v7-5_T_eps_model_2022-12-23h14-08-04/csfrac_smooth.out
20211014_gridC_Mdot2e-8_v10_T_eps_model_2022-12-25h13-20-46/csfrac_smooth.out
20210527_gridC_Mdot5e-5_v22-5_T_eps_model_2022-12-27h10-44-23/csfrac_smooth.out
20211014_gridC_Mdot1e-7_v15_T_eps_model_2022-12-28h15-08-21/csfrac_smooth.out
27 changes: 18 additions & 9 deletions input/example.in
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@

## input model

lr = 1.e-5
nb_epochs = 3
ini_epochs = 1
lr = 1.e-4
nb_epochs = 15
ini_epochs = 5
losstype = abs_idn
z_dim = 8
nb_samples = 100
scheme = loc
nb_evol = 1
nb_samples = 4
scheme = int
nb_evol = 16
nb_hidden = 1
ae_type = simple
nb_test = 2
nb_test = 1



## loss fractions

abs = 1
grd = 0
grd = 1
idn = 1
elm = 0





Name = 20241021_165509

Name = 20241021_165509

Name = 20241021_165509

Name = 20241021_165509

Name = 20241021_165509
Binary file modified model/20240604_160152/loss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified model/20240604_160152/nn/nn0.pt
Binary file not shown.
Binary file modified model/20240604_160152/nn/nn1.pt
Binary file not shown.
Binary file modified model/20240604_160152/train/abs.npy
Binary file not shown.
Binary file modified model/20240604_160152/train/elm.npy
Binary file not shown.
Binary file modified model/20240604_160152/train/grd.npy
Binary file not shown.
Binary file modified model/20240604_160152/train/idn.npy
Binary file not shown.
Binary file modified model/20240604_160152/train/tot.npy
Binary file not shown.
Binary file modified model/20240604_160152/valid/abs.npy
Binary file not shown.
Binary file modified model/20240604_160152/valid/elm.npy
Binary file not shown.
Binary file modified model/20240604_160152/valid/grd.npy
Binary file not shown.
Binary file modified model/20240604_160152/valid/idn.npy
Binary file not shown.
Binary file modified model/20240604_160152/valid/tot.npy
Binary file not shown.
Loading

0 comments on commit 875298d

Please sign in to comment.