Skip to content

Commit

Permalink
+layout.svelte add <svelte:head> with <title> and <meta description>
Browse files Browse the repository at this point in the history
fix resetting h3 headings after each h2
more preprint work
  • Loading branch information
janosh committed Jun 20, 2023
1 parent e41ca32 commit 5d38918
Show file tree
Hide file tree
Showing 9 changed files with 127 additions and 12 deletions.
2 changes: 1 addition & 1 deletion matbench_discovery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys
from datetime import datetime

ROOT = os.path.dirname(os.path.dirname(__file__)) # repo root
ROOT = os.path.dirname(os.path.dirname(__file__)) # repo root directory
FIGS = f"{ROOT}/site/src/figs" # directory to store interactive figures
STATIC = f"{ROOT}/site/static/figs" # directory to store static figures, is symlinked
# into site/src/routes/paper/figs dir
Expand Down
3 changes: 2 additions & 1 deletion matbench_discovery/preds.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@
# pick F1 as primary metric to sort by
df_metrics = df_metrics.round(3).sort_values("F1", axis=1)


# dataframe of all models' energy above convex hull (EACH) predictions (eV/atom)
df_each_pred = pd.DataFrame()
for model in df_metrics.T.MAE.sort_values().index:
df_each_pred[model] = df_wbm[each_true_col] + df_wbm[model] - df_wbm[e_form_col]


# dataframe of all models' errors in their EACH predictions (eV/atom)
df_each_err = pd.DataFrame()
for model in df_metrics.T.MAE.sort_values().index:
df_each_err[model] = df_wbm[model] - df_wbm[e_form_col]
5 changes: 0 additions & 5 deletions site/src/app.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Matbench Discovery</title>
<meta name="author" content="Janosh Riebesell" />
<meta
name="keywords"
Expand All @@ -11,10 +10,6 @@
<meta name="og:card" content="summary" />
<meta name="twitter:site" content="@jrib_" />
<meta name="twitter:creator" content="@jrib_" />
<meta
name="description"
content="Benchmarking machine learning energy models for materials discovery."
/>

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
Expand Down
4 changes: 3 additions & 1 deletion site/src/lib/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
<footer>
Questions/feedback?
<a href="{repository}/issues"><Icon icon="octicon:mark-github" inline /></a>
<a href="mailto:janosh@lbl.gov"><Icon icon="mdi:email" inline /></a>
<a href="mailto:janosh@lbl.gov?subject=Matbench Discovery">
<Icon icon="mdi:email" inline />
</a>
</footer>

<style>
Expand Down
18 changes: 18 additions & 0 deletions site/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,26 @@
// get prev/next route with wrap-around
$: next_route = routes[(current_route_idx + 1) % routes.length]
$: prev_route = routes[(current_route_idx - 1 + routes.length) % routes.length]
$: description = {
'/': `Benchmarking machine learning energy models for materials discovery.`,
'/about-the-data': `Details about provenance, chemistry and energies in the benchmark's train and test set.`,
'/about-the-data/tmi': `Too much information on the benchmark's data.`,
'/api': `API docs for the Matbench Discovery PyPI package.`,
'/contribute': `Steps for contributing a new model to the benchmark.`,
'/models': `Details on each model sortable by metrics.`,
'/paper': `The paper released with the Matbench Discovery benchmark.`,
'/paper/iclr-ml4mat': `Extended abstract submitted to the ICLR ML4Materials workshop.`,
'/si': `Supplementary information including interesting but non-essential plots.`,
}[$page.route.id ?? ``]
if (!description) console.warn(`No description for route ${$page.route.id}`)
$: title = $page.route.id == `/` ? `` : `${$page.route.id} • `
</script>

<svelte:head>
<title>{title}Matbench Discovery</title>
<meta name="description" content={description} />
</svelte:head>

<Toc {headingSelector} breakpoint={1250} warnOnEmpty={false} />

{#if $page.url.pathname !== `/`}
Expand Down
3 changes: 2 additions & 1 deletion site/src/routes/api/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
font-size: 25pt;
}
:global(hr) {
display: none;
border: 1px solid gray;
margin: 0 0 2em;
}
</style>
2 changes: 1 addition & 1 deletion site/src/routes/contribute/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ git commit -m 'add <model_name> to Matbench Discovery leaderboard'

And you're done! Once tests pass and the PR is merged, your model will be added to the leaderboard! 🎉

### Step 4 (optional): Move WandB runs into our project
### Step 4 (optional): Copy WandB runs into our project

[Weights and Biases](https://wandb.ai) is a great tool for logging training and test runs of ML models. It's free, (partly) [open source](https://github.com/wandb/wandb) and offers a [special plan for academics](https://wandb.ai/site/research). It auto-collects metadata like

Expand Down
4 changes: 2 additions & 2 deletions site/src/routes/paper/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
div :global(sup.ref) {
text-transform: capitalize;
}
/*auto-number HTML headings*/
/* auto-number HTML headings */
div :global(h2) {
counter-increment: h2;
counter-reset: h3, h4;
counter-reset: h3 h4;
}
div :global(h2::before) {
content: counter(h2);
Expand Down
98 changes: 98 additions & 0 deletions site/src/routes/paper/references.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,52 @@
---
references:
- id: allen_crystallographic_1999
abstract: >-
The development of strategies for the design of novel materials is
increasingly a knowledge-based activity and this book highlights a variety
of experimental and computational methods that provide structural knowledge
about individual compounds or groups of related compounds. However,
scientific research and development is an evolutionary process in which the
critical analysis and assessment of all existing information is an essential
component. In the area of chemical structure, such analyses provide
fundamental insights which can lead to the detection of trends and
probabilities, and to the formulation of hypotheses and rules. These
indications, in their turn, can direct the future course of structural
design, synthesis and experiment.
accessed:
- year: 2020
month: 8
day: 31
author:
- family: Allen
given: Frank H.
- family: Shields
given: Gregory P.
citation-key: allen_crystallographic_1999
collection-title: NATO Science Series
container-title: Implications of Molecular and Materials Structure for New Technologies
DOI: 10.1007/978-94-011-4653-1_21
editor:
- family: Howard
given: Judith A. K.
- family: Allen
given: Frank H.
- family: Shields
given: Gregory P.
event-place: Dordrecht
ISBN: 978-94-011-4653-1
issued:
- year: 1999
language: en
note: 'ZSCC: NoCitationData[s0]'
page: 291-302
publisher: Springer Netherlands
publisher-place: Dordrecht
source: Springer Link
title: Crystallographic Databases and Knowledge Bases in Materials Design
type: chapter
URL: https://doi.org/10.1007/978-94-011-4653-1_21

- id: bartel_critical_2020
abstract: >-
Machine learning has emerged as a novel tool for the efficient prediction of
Expand Down Expand Up @@ -1021,6 +1068,57 @@ references:
type: article
URL: http://arxiv.org/abs/2206.08917

- id: vaswani_attention_2017
abstract: >-
The dominant sequence transduction models are based on complex recurrent or
convolutional neural networks in an encoder-decoder configuration. The best
performing models also connect the encoder and decoder through an attention
mechanism. We propose a new simple network architecture, the Transformer,
based solely on attention mechanisms, dispensing with recurrence and
convolutions entirely. Experiments on two machine translation tasks show
these models to be superior in quality while being more parallelizable and
requiring significantly less time to train. Our model achieves 28.4 BLEU on
the WMT 2014 English-to-German translation task, improving over the existing
best results, including ensembles by over 2 BLEU. On the WMT 2014
English-to-French translation task, our model establishes a new single-model
state-of-the-art BLEU score of 41.8 after training for 3.5 days on eight
GPUs, a small fraction of the training costs of the best models from the
literature. We show that the Transformer generalizes well to other tasks by
applying it successfully to English constituency parsing both with large and
limited training data.
accessed:
- year: 2020
month: 8
day: 5
author:
- family: Vaswani
given: Ashish
- family: Shazeer
given: Noam
- family: Parmar
given: Niki
- family: Uszkoreit
given: Jakob
- family: Jones
given: Llion
- family: Gomez
given: Aidan N.
- family: Kaiser
given: Lukasz
- family: Polosukhin
given: Illia
citation-key: vaswani_attention_2017
container-title: arXiv:1706.03762 [cs]
issued:
- year: 2017
month: 12
day: 5
note: 'ZSCC: 0010850'
source: arXiv.org
title: Attention Is All You Need
type: article-journal
URL: http://arxiv.org/abs/1706.03762

- id: wang_predicting_2021
abstract: >-
We propose an efficient high-throughput scheme for the discovery of stable
Expand Down

0 comments on commit 5d38918

Please sign in to comment.