Skip to content

Commit

Permalink
fix wrong MPtrj training_set URL in chgnet, mace, alignn_ff metadata.yml
Browse files Browse the repository at this point in the history
hide ToC on /models page
delete pre_cmd `module load pytorch/2.0.1`, wasn't used, was using torch from venv
  • Loading branch information
janosh committed Sep 23, 2023
1 parent 71d77f4 commit 5697156
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 23 deletions.
7 changes: 3 additions & 4 deletions matbench_discovery/slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ def slurm_submit(
array (str, optional): Slurm array specifier. Defaults to None. Example:
'9' (for SLURM_ARRAY_TASK_ID from 0-9 inclusive), '1-10' or '1-10%2', etc.
pre_cmd (str, optional): Things like `module load` commands and environment
variables to set when running the python script go here. Example:
pre_cmd='ENV_VAR=42' or 'module load rhel8/default-amp;'. Defaults to "".
If running on CPU, pre_cmd="unset OMP_NUM_THREADS" allows PyTorch to use
all cores https://docs.hpc.cam.ac.uk/hpc/software-packages/pytorch.html
variables to set before running the python script go here. Example:
pre_cmd='ENV_VAR=42' or 'module load pytorch;'. Defaults to "". If running
on CPU, pre_cmd="unset OMP_NUM_THREADS" allows PyTorch to use all cores.
Raises:
SystemExit: Exit code will be subprocess.run(['sbatch', ...]).returncode.
Expand Down
2 changes: 2 additions & 0 deletions models/alignn/test_alignn.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
time="12:0:0",
out_dir=out_dir,
slurm_flags="--nodes 1 --gpus-per-node 1",
# pre_cmd is platform specific, remove when running on other systems
# just left here for reference
pre_cmd=". /etc/profile.d/modules.sh; module load rhel8/default-amp;"
"module load cuda/11.8",
)
Expand Down
1 change: 0 additions & 1 deletion models/alignn/train_alignn.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
time="4:0:0",
out_dir=out_dir,
slurm_flags="--qos regular --constraint gpu --gpus 1",
pre_cmd="module load pytorch/2.0.1;",
)


Expand Down
2 changes: 1 addition & 1 deletion models/alignn_ff/metadata_aborted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ trained_for_benchmark: true

training_set:
title: MPTrj
url: https://figshare.com/articles/dataset/19470599
url: https://figshare.com/articles/dataset/23713842
size: 1_580_395
# hyperparams: see align-config.json
2 changes: 1 addition & 1 deletion models/chgnet/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ trained_for_benchmark: false

training_set:
title: MPTrj
url: https://figshare.com/articles/dataset/19470599
url: https://figshare.com/articles/dataset/23713842
size: 1_580_395

hyperparams:
Expand Down
2 changes: 1 addition & 1 deletion models/mace/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ trained_for_benchmark: true

training_set:
title: MPTrj
url: https://figshare.com/articles/dataset/19470599
url: https://figshare.com/articles/dataset/23713842
size: 1_580_395

hyperparams:
Expand Down
1 change: 0 additions & 1 deletion models/mace/test_mace.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
time="12:0:0",
array=f"1-{slurm_array_task_count}",
slurm_flags="--qos regular --constraint gpu --gpus 1",
pre_cmd="module load pytorch/2.0.1; . ~/.venv/py311/bin/activate;",
)


Expand Down
4 changes: 2 additions & 2 deletions site/src/lib/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
<dialog bind:this={dialog} open={show_tips}>
<h3>{tips_title}</h3>
<p title="For keyboard-only site navigation">
Use <kbd>cmd+k</kbd> to bring up a nav palette.
<kbd>cmd+k</kbd> to bring up a nav palette.
</p>
<p title="For keyboard-only site navigation">
Use <kbd>cmd+j</kbd> to bring up these site options.
<kbd>cmd+j</kbd> to bring up these site options.
</p>
</dialog>

Expand Down
10 changes: 5 additions & 5 deletions site/src/lib/ModelCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
{#if show_details}
<div transition:fade|fly={{ duration: 200 }}>
<section transition:slide={{ duration: 200 }}>
<h3 class="toc-exclude">Authors</h3>
<h3>Authors</h3>
<ul>
{#each data.authors as { name, email, orcid, affiliation, url }}
<li>
Expand All @@ -93,7 +93,7 @@
</ul>
</section>
<section transition:slide={{ duration: 200 }}>
<h3 class="toc-exclude">Package versions</h3>
<h3>Package versions</h3>
<ul>
{#each Object.entries(data.requirements ?? {}) as [name, version]}
<li>
Expand All @@ -110,7 +110,7 @@
</div>
{/if}
<section class="metrics" style={metrics_style}>
<h3 class="toc-exclude">Metrics</h3>
<h3>Metrics</h3>
<ul>
{#each stats as { key, label, unit }}
<li class:active={sort_by == key}>
Expand All @@ -122,7 +122,7 @@
</section>
{#if hyperparams && show_details}
<section>
<h3 class="toc-exclude">Hyperparameters</h3>
<h3>Hyperparameters</h3>
<ul>
{#each Object.entries(hyperparams) as [key, value]}
<li>
Expand All @@ -143,7 +143,7 @@
{/if}
{#if notes && show_details}
<section>
<h3 class="toc-exclude">Notes</h3>
<h3>Notes</h3>
<ul>
{#each [`description`, `training`].filter((key) => key in (notes ?? {})) as key}
<li>{@html notes[key]}</li>
Expand Down
4 changes: 2 additions & 2 deletions site/src/lib/Nav.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { page } from '$app/stores'
export let routes: string[]
export let routes: (string | [string, string])[]
export let style: string | null = null
$: is_current = (path: string) => {
Expand All @@ -24,7 +24,7 @@
display: flex;
gap: 1em 1ex;
place-content: center;
margin: 1em auto 3em;
margin: 2em auto 3em;
max-width: 45em;
flex-wrap: wrap;
font-size: 1.1em;
Expand Down
6 changes: 4 additions & 2 deletions site/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
$: url = $page.url.pathname
$: headingSelector = `main :is(${
url === `/api` ? `h1, ` : ``
{ '/api': `h1, ` }[url] ?? ``
}h2, h3, h4):not(.toc-exclude)`
$: description = {
Expand Down Expand Up @@ -68,7 +68,9 @@
<meta name="description" content={description} />
</svelte:head>

<Toc {headingSelector} breakpoint={1250} minItems={3} />
{#if url !== `/models`}
<Toc {headingSelector} breakpoint={1250} minItems={3} />
{/if}

<GitHubCorner href={repository} />

Expand Down
13 changes: 10 additions & 3 deletions site/src/routes/models/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@
</script>

<div style="margin: 3vw;">
<h1>Models</h1>
<h1>Interactive Leaderboard</h1>

<p style="text-align: center;">
Sort models by stability classification metrics, by their tun time or regressions
metrics for predicted convex hull distance.
</p>

<span>
Sort
Expand All @@ -70,7 +75,9 @@
<ul>
{#each [{ key: `model_name`, label: `Model Name` }, ...stats] as { key, label, tooltip }}
<li class:active={key == sort_by}>
<button id={key} on:click={() => (sort_by = key)}>{@html label ?? key}</button>
<button id={key} on:click={() => (sort_by = key)} style="font-size: large;">
{@html label ?? key}
</button>
{#if tooltip}
<Tooltip
text={tooltip}
Expand Down Expand Up @@ -142,7 +149,7 @@
display: flex;
flex-wrap: wrap;
gap: 9pt;
margin: 1em auto 2em;
margin: 2.5ex auto 3ex;
place-content: center;
}
ul > li button {
Expand Down

0 comments on commit 5697156

Please sign in to comment.