Skip to content

Commit 624b085

Browse files
authored
Add firefox models from Taskcluster Tools (#1035)
1 parent 72b6f0a commit 624b085

File tree

11 files changed

+921
-2
lines changed

11 files changed

+921
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Feel free to ask questions in our Matrix channel [#firefoxtranslations:mozilla.o
5151
- [Lightning Talk on the Training Pipeline Overview](https://www.youtube.com/watch?v=TfDEAYCeF6s)
5252
- [Training and Experiment Dashboard](https://docs.google.com/spreadsheets/d/1Kiz9xUjo2jpeeVGtaL3jA_cLiCiiyz8GvIoQADMyYqo/edit?gid=0#gid=0)
5353
- [moz-fx-translations-data--303e-prod-translations-data](https://console.cloud.google.com/storage/browser/moz-fx-translations-data--303e-prod-translations-data) - Uploaded models
54-
- [Models in released to Firefox](https://gregtatum.github.io/taskcluster-tools/src/models/)
54+
- [Models in released to Firefox](https://mozilla.github.io/translations/firefox-models/)
5555
- [Documentation of the Firefox integration](https://firefox-source-docs.mozilla.org/toolkit/components/translations/index.html)
5656

5757
## Acknowledgements

site/@types/globals.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// Intentionally left blank for future migrated code.

site/assets/noodles2.png

7.97 KB
Loading

site/favicon.ico

15 KB
Binary file not shown.

site/firefox-models/index.html

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>Firefox Translations Models</title>
6+
</head>
7+
<body>
8+
<script src='./models.mjs' type="module"></script>
9+
<link rel="stylesheet" href="../style.css">
10+
<link rel="stylesheet" href="./models.css">
11+
12+
<div class="navbar">
13+
<div class="max-wrap-container">
14+
<a class="navbar-brand" href="..">
15+
<img src="http://localhost:8080/docs//assets/translations.svg" class="navbar-logo">
16+
mozilla/translations
17+
</a>
18+
</div>
19+
</div>
20+
21+
<div class="max-wrap-container">
22+
<h1>Firefox Translations Models</h1>
23+
<p>
24+
This page serves as the source of truth for what is being shipped to what channel for
25+
Firefox translation models. Models are added to Nightly as they are trained. If they
26+
meet our acceptance criteria of being with ~5% of Google Translate's COMET scores then
27+
they are ready to ship. Some models may be held back or shipped at our team's discretion
28+
based on other evaluation metrics.
29+
</p>
30+
<p id="loading">Fetching the models…</p>
31+
<p id="error">Error fetching the models. See the console log.</p>
32+
</div>
33+
34+
<div class='flex-center-container'>
35+
36+
<div class="settings">
37+
<input type='checkbox' id="remoteSettingsPreview" />
38+
<label for="remoteSettingsPreview">Use Remote Settings "Preview"</label>
39+
</div>
40+
41+
<table id="counts">
42+
<thead>
43+
<tr>
44+
<th>Language Counts</th>
45+
<th>xx-en</th>
46+
<th>en-xx</th>
47+
</tr>
48+
</thead>
49+
<tbody id="countTbody">
50+
<tr>
51+
<th>Release</th>
52+
<td id="fromProd"></td>
53+
<td id="toProd"></td>
54+
</tr>
55+
<tr>
56+
<th>Nightly</th>
57+
<td id="fromNightly"></td>
58+
<td id="toNightly"></td>
59+
</tr>
60+
</tbody>
61+
</table>
62+
63+
<div class="table-container">
64+
<div class='noodles'>
65+
<img src="../assets/noodles2.png" class="noodles">
66+
</div>
67+
<div class='table-overflow'>
68+
<table class="models" id="table">
69+
<thead>
70+
<tr>
71+
<th>Language</th>
72+
<th>Model</th>
73+
<th>Version</th>
74+
<th>Size</th>
75+
<th>Release</th>
76+
<th title="The model must be within 5% COMET evaluation score of Google's models to be shippable">
77+
Score
78+
</th>
79+
<th>Model</th>
80+
<th>Version</th>
81+
<th>Size</th>
82+
<th>Release</th>
83+
<th title="The model must be within 5% COMET evaluation score of Google's models to be shippable">
84+
Score
85+
</th>
86+
</tr>
87+
</thead>
88+
<tbody id="tbody">
89+
<!-- dynamically generated -->
90+
</tbody>
91+
</table>
92+
</div>
93+
</div>
94+
</div>
95+
</body>
96+
</html>

site/firefox-models/models.css

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
.settings {
2+
border-radius: 3px;
3+
margin: 10px;
4+
padding: 10px;
5+
border: 1px solid #aaa;
6+
}
7+
8+
.attachments {
9+
display: none;
10+
position: absolute;
11+
background: #fff;
12+
padding: 10px;
13+
border-radius: 7px;
14+
overflow: hidden;
15+
box-shadow: 2px 2px 10px #adadad;
16+
margin-top: 6px;
17+
18+
& a {
19+
display: block;
20+
margin: 6px 0;
21+
}
22+
}
23+
24+
#error {
25+
display: none;
26+
}
27+
28+
#counts {
29+
margin: 10px 0 30px;
30+
}
31+
32+
.models {
33+
margin: 1rem;
34+
35+
td {
36+
white-space: nowrap;
37+
}
38+
39+
/* Language Name */
40+
& :is(th, td):nth-child(1) {
41+
font-weight: bold;
42+
border-right: 2px solid #aaa;
43+
text-align: right;
44+
}
45+
46+
& :is(th, td):nth-child(7) {
47+
border-left: 2px solid #aaa;
48+
}
49+
50+
/* models */
51+
& td:is(:nth-child(2), :nth-child(7)) {
52+
background-color: #0001;
53+
font-family: monospace;
54+
}
55+
56+
& :is(th, td):is(:nth-child(2), :nth-child(7)) {
57+
text-align: right;
58+
}
59+
60+
/* Scores */
61+
& td:is(:nth-child(6), :nth-child(11)) {
62+
font-family: monospace;
63+
text-align: right;
64+
}
65+
}
66+
67+
.noodles {
68+
position: relative;
69+
70+
img {
71+
position: absolute;
72+
z-index: -1;
73+
width: 293px;
74+
top: -94px;
75+
left: -80px;
76+
77+
@media (max-width: 991.98px) {
78+
& {
79+
display: none;
80+
}
81+
}
82+
}
83+
}

0 commit comments

Comments
 (0)