|
1 | 1 | <script lang="ts">
|
2 | 2 | import { repository } from '$site/package.json'
|
3 | 3 | import Icon from '@iconify/svelte'
|
| 4 | + import { pretty_num } from 'sveriodic-table/labels' |
4 | 5 | import type { ModelMetadata } from './types'
|
5 | 6 |
|
6 | 7 | export let key: string
|
7 | 8 | export let data: ModelMetadata
|
8 | 9 |
|
9 | 10 | const { model_name, repo, doi, preprint, url, date_added } = data
|
| 11 | + const { missing_preds, test_set_size } = data |
10 | 12 | </script>
|
11 | 13 |
|
12 | 14 | <h2>{model_name}</h2>
|
|
21 | 23 | <p>
|
22 | 24 | Date added: {new Date(date_added).toISOString().split(`T`)[0]}
|
23 | 25 | • Benchmark version: {data.matbench_discovery_version}
|
| 26 | + • Missing predictions: |
| 27 | + {pretty_num(missing_preds)} |
| 28 | + <small>({((100 * missing_preds) / test_set_size).toFixed(2)}%)</small> |
24 | 29 | </p>
|
25 |
| -<strong>Authors</strong> |
26 |
| -<section> |
27 |
| - <ul> |
28 |
| - {#each data.authors as { name, email, orcid, affiliation, url }} |
29 |
| - <li> |
30 |
| - <span title={affiliation}>{name}</span> |
31 |
| - {#if email} |
32 |
| - [<a href="mailto:{email}">email</a>] |
33 |
| - {/if} |
34 |
| - {#if orcid} |
35 |
| - [<a href={orcid}>Orcid</a>] |
36 |
| - {/if} |
37 |
| - {#if url} |
38 |
| - [<a href={url}>web</a>] |
39 |
| - {/if} |
40 |
| - </li> |
41 |
| - {/each} |
42 |
| - </ul> |
43 |
| - <strong>Package versions</strong> |
44 |
| - <ul> |
45 |
| - {#each Object.entries(data.requirements) as [name, version]} |
46 |
| - <li> |
47 |
| - {#if ![`aviary`].includes(name)} |
48 |
| - {@const href = `https://pypi.org/project/${name}/${version}`} |
49 |
| - {name}: <a {href}>{version}</a> |
50 |
| - {:else} |
51 |
| - {name}: {version} |
52 |
| - {/if} |
53 |
| - </li> |
54 |
| - {/each} |
55 |
| - </ul> |
56 |
| -</section> |
| 30 | +<div> |
| 31 | + <section> |
| 32 | + <h3>Authors</h3> |
| 33 | + <ul> |
| 34 | + {#each data.authors as { name, email, orcid, affiliation, url }} |
| 35 | + <li> |
| 36 | + <span title={affiliation}>{name}</span> |
| 37 | + {#if email} |
| 38 | + [<a href="mailto:{email}">email</a>] |
| 39 | + {/if} |
| 40 | + {#if orcid} |
| 41 | + [<a href={orcid}>Orcid</a>] |
| 42 | + {/if} |
| 43 | + {#if url} |
| 44 | + [<a href={url}>web</a>] |
| 45 | + {/if} |
| 46 | + </li> |
| 47 | + {/each} |
| 48 | + </ul> |
| 49 | + </section> |
| 50 | + <section> |
| 51 | + <h3>Package versions</h3> |
| 52 | + <ul> |
| 53 | + {#each Object.entries(data.requirements) as [name, version]} |
| 54 | + <li> |
| 55 | + {#if ![`aviary`].includes(name)} |
| 56 | + {@const href = `https://pypi.org/project/${name}/${version}`} |
| 57 | + {name}: <a {href}>{version}</a> |
| 58 | + {:else} |
| 59 | + {name}: {version} |
| 60 | + {/if} |
| 61 | + </li> |
| 62 | + {/each} |
| 63 | + </ul> |
| 64 | + </section> |
| 65 | +</div> |
57 | 66 |
|
58 | 67 | <!-- TODO add table with performance metrics (F1, Acc, Recall, Precision) for each model -->
|
59 | 68 | <style>
|
60 | 69 | h2 {
|
61 | 70 | margin: 5pt 0 1ex;
|
62 | 71 | }
|
| 72 | + h3 { |
| 73 | + margin: 0; |
| 74 | + } |
63 | 75 | ul {
|
64 | 76 | list-style-type: disc;
|
65 | 77 | }
|
|
71 | 83 | }
|
72 | 84 | nav > span {
|
73 | 85 | display: flex;
|
74 |
| - gap: 0.5em; |
| 86 | + gap: 6pt; |
75 | 87 | place-items: center;
|
76 | 88 | }
|
77 |
| - strong { |
78 |
| - display: block; |
79 |
| - margin: 1em 0 5pt; |
| 89 | + div { |
| 90 | + display: flex; |
| 91 | + gap: 15pt; |
| 92 | + margin: 1em 0; |
| 93 | + justify-content: space-between; |
| 94 | + } |
| 95 | + small { |
| 96 | + font-weight: lighter; |
80 | 97 | }
|
81 | 98 | </style>
|
0 commit comments