Skip to content

Commit

Permalink
Fixing paths to files in example pynbs
Browse files Browse the repository at this point in the history
  • Loading branch information
silkemaes committed Jun 11, 2024
1 parent dd8b85d commit 7f430ed
Show file tree
Hide file tree
Showing 35 changed files with 70 additions and 44 deletions.
78 changes: 39 additions & 39 deletions docs/src/example/load&test.ipynb

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions docs/src/example/run.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -22,6 +22,13 @@
"import datetime as dt\n",
"from tqdm import tqdm\n",
"\n",
"from pathlib import Path\n",
"import sys\n",
"\n",
"parentpath = str(Path().cwd())[:-16]\n",
"\n",
"sys.path.append(parentpath)\n",
"\n",
"import src.mace.CSE_0D.dataset as ds\n",
"import src.mace.train as train\n",
"import src.mace.test as test\n",
Expand Down Expand Up @@ -63,7 +70,7 @@
"now = dt.datetime.now()\n",
"name = str(now.strftime(\"%Y%m%d\")+'_'+now.strftime(\"%H%M%S\"))\n",
"\n",
"path = '/STER/silkem/MACE/models/CSE_0D/'+name"
"path = parentpath + 'models/'+name"
]
},
{
Expand Down
Binary file added 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.
19 changes: 19 additions & 0 deletions model/20240604_160152/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"nb_samples": 10000,
"lr": 0.0001,
"epochs": 150,
"z_dim": 8,
"dt_fract": 0.221,
"tmax": 434800000000.0,
"train_time_h": 72.36221496270763,
"overhead_s": 1.014007806777954,
"samples": 7000,
"cutoff_abs": 1e-20,
"losstype": "abs_idn",
"inputfile": "/STER/silkem/MACE/input/ignore/testing/int4.in",
"scheme": "int",
"nb_evol": 16,
"nb_hidden": 1,
"ae_type": "simple",
"done": "true"
}
Binary file added model/20240604_160152/minmax.npy
Binary file not shown.
Binary file added model/20240604_160152/nn/nn.pt
Binary file not shown.
Binary file added model/20240604_160152/nn/nn0.pt
Binary file not shown.
Binary file added model/20240604_160152/nn/nn1.pt
Binary file not shown.
Binary file added model/20240604_160152/nn/nn10.pt
Binary file not shown.
Binary file added model/20240604_160152/nn/nn11.pt
Binary file not shown.
Binary file added model/20240604_160152/nn/nn12.pt
Binary file not shown.
Binary file added model/20240604_160152/nn/nn13.pt
Binary file not shown.
Binary file added model/20240604_160152/nn/nn14.pt
Binary file not shown.
Binary file added model/20240604_160152/nn/nn2.pt
Binary file not shown.
Binary file added model/20240604_160152/nn/nn3.pt
Binary file not shown.
Binary file added model/20240604_160152/nn/nn4.pt
Binary file not shown.
Binary file added model/20240604_160152/nn/nn5.pt
Binary file not shown.
Binary file added model/20240604_160152/nn/nn6.pt
Binary file not shown.
Binary file added model/20240604_160152/nn/nn7.pt
Binary file not shown.
Binary file added model/20240604_160152/nn/nn8.pt
Binary file not shown.
Binary file added model/20240604_160152/nn/nn9.pt
Binary file not shown.
Binary file added model/20240604_160152/train/abs.npy
Binary file not shown.
Binary file added model/20240604_160152/train/elm.npy
Binary file not shown.
Binary file added model/20240604_160152/train/grd.npy
Binary file not shown.
Binary file added model/20240604_160152/train/idn.npy
Binary file not shown.
Binary file added model/20240604_160152/train/status.npy
Binary file not shown.
Binary file added model/20240604_160152/train/tot.npy
Binary file not shown.
Binary file added model/20240604_160152/valid/abs.npy
Binary file not shown.
Binary file added model/20240604_160152/valid/elm.npy
Binary file not shown.
Binary file added model/20240604_160152/valid/grd.npy
Binary file not shown.
Binary file added model/20240604_160152/valid/idn.npy
Binary file not shown.
Binary file added model/20240604_160152/valid/status.npy
Binary file not shown.
Binary file added model/20240604_160152/valid/tot.npy
Binary file not shown.
4 changes: 2 additions & 2 deletions src/mace/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ def test_model(model, testpath, meta, specs=[], inpackage = False, printing = Tr
## plotting results for the step test
fig_step = plot_abs(model1D, n, n_hat, specs=specs, step = True)
if save == True:
plt.savefig(model.path+'figs/step_'+id+'.png', dpi=300)
plt.savefig(model.path+'figs/step'+id+'.png', dpi=300)
print('\nStep test plot saved as', model.path+'step'+id+'.png')

## plotting results for the evolution test
fig_evol = plot_abs(model1D, n, n_evol, specs=specs)
if save == True:
plt.savefig(model.path+'figs/evol_'+id+'.png', dpi=300)
plt.savefig(model.path+'figs/evol'+id+'.png', dpi=300)
print('Evolution test plot saved as', model.path+'evol'+id+'.png')

plt.show()
Expand Down
2 changes: 1 addition & 1 deletion src/mace/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def get_specs():
'''

parentpath = str(Path(__file__).parent)[:-15]
parentpath = str(Path(__file__).parent)[:-8]

loc_specs = parentpath+'data/rate16.specs'

Expand Down

0 comments on commit 7f430ed

Please sign in to comment.