-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from JadenFiotto-Kaufman/docs
Status Page and Link Fixes
- Loading branch information
Showing
9 changed files
with
187 additions
and
71 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* .status-container { | ||
background-color: '#F84F31'; | ||
} */ | ||
|
||
.status-body { | ||
color: "white"; | ||
} | ||
|
||
/* Style the buttons that are used to open and close the accordion panel */ | ||
.accordion { | ||
background-color: #eee; | ||
color: #444; | ||
cursor: pointer; | ||
padding: 18px; | ||
width: 100%; | ||
text-align: left; | ||
border: none; | ||
outline: none; | ||
transition: 0.4s; | ||
} | ||
|
||
/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */ | ||
.active, .accordion:hover { | ||
background-color: #ccc; | ||
} | ||
|
||
/* Style the accordion panel. Note: hidden by default */ | ||
.panel { | ||
padding: 0 18px; | ||
background-color: white; | ||
display: none; | ||
overflow: hidden; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,115 @@ | ||
:html_theme.sidebar_secondary.remove: | ||
:sd_hide_title: | ||
|
||
status | ||
.. raw:: html | ||
|
||
<link rel="stylesheet" href="../_static/css/status.css"> | ||
<script> | ||
fetch("https://ndif.dev/ping") | ||
.then((response) => { | ||
if (response.status == 200) { | ||
Array.from(document.getElementsByClassName("status-container")).forEach((elm) => { | ||
elm.style.backgroundColor = "#23C552"; | ||
Array.from(elm.getElementsByClassName('sd-card-text')).forEach((text) => { | ||
text.textContent = "All Systems Are Operational"; | ||
text.style.color = "#FFFFFF"; | ||
}); | ||
}); | ||
console.log('Ping success'); | ||
// Nested fetch to ndif.dev/stats | ||
fetch("https://ndif.dev/stats") | ||
.then((statsResponse) => { | ||
if (statsResponse.status == 200) { | ||
statsResponse.json().then((parsed) => { | ||
// Initialize an empty string to accumulate information | ||
let infoString = ''; | ||
// Iterate through the JSON dictionary and append information | ||
Object.keys(parsed).forEach((key) => { | ||
const value = parsed[key]; | ||
infoString += `Repo ID: <a href="https://huggingface.co/${value.repo_id}" target="_blank">${value.repo_id}</a><br>Config String: ${value.config_json_string}<br><br>`; | ||
}); | ||
// Display the accumulated string | ||
Array.from(document.getElementsByClassName("status-message")).forEach((elm) => { | ||
Array.from(elm.getElementsByClassName('sd-card-text')).forEach((text) => { | ||
text.innerHTML = infoString; | ||
}); | ||
}); | ||
Array.from(document.getElementsByClassName("page-hook")).forEach((elm) => { | ||
elm.innerHTML = `<button class="accordion">Section 1</button><div class="panel"><p>Lorem ipsum...</p></div>`; | ||
}); | ||
console.log('Stats success'); | ||
}).catch((jsonError) => { | ||
console.log('JSON parsing error:', jsonError); | ||
}); | ||
} else { | ||
console.log('Stats error'); | ||
} | ||
}) | ||
.catch((statsError) => { | ||
console.log('Stats error'); | ||
}); | ||
} else { | ||
Array.from(document.getElementsByClassName("status-container")).forEach((elm) => { | ||
elm.style.backgroundColor = "#F84F31"; | ||
Array.from(elm.getElementsByClassName('sd-card-text')).forEach((text) => { | ||
text.textContent = "NDIF Is Unavailable"; | ||
text.style.color = "#FFFFFF"; | ||
}); | ||
}); | ||
console.log('Ping error'); | ||
} | ||
}) | ||
.catch((pingError) => { | ||
Array.from(document.getElementsByClassName("status-container")).forEach((elm) => { | ||
elm.style.backgroundColor = "#F84F31"; | ||
Array.from(elm.getElementsByClassName('sd-card-text')).forEach((text) => { | ||
text.textContent = "NDIF Is Unavailable"; | ||
text.style.color = "#FFFFFF"; | ||
}); | ||
}); | ||
console.error('Ping fetch failed:', pingError); | ||
}); | ||
</script> | ||
|
||
.. raw:: html | ||
|
||
<script> | ||
var acc = document.getElementsByClassName("accordion"); | ||
var i; | ||
for (i = 0; i < acc.length; i++) { | ||
acc[i].addEventListener("click", function() { | ||
/* Toggle between adding and removing the "active" class, | ||
to highlight the button that controls the panel */ | ||
this.classList.toggle("active"); | ||
/* Toggle between hiding and showing the active panel */ | ||
var panel = this.nextElementSibling; | ||
if (panel.style.display === "block") { | ||
panel.style.display = "none"; | ||
} else { | ||
panel.style.display = "block"; | ||
} | ||
}); | ||
} | ||
</script> | ||
|
||
Status | ||
====== | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:hidden: | ||
|
||
|
||
|
||
.. card:: | ||
|
||
All Systems Are Operational | ||
|
||
|
||
|
||
.. div:: sd-fs-1 sd-font-weight-bold sd-text-center sd-text-primary sd-mb-5 | ||
|
||
Key Features | ||
|
||
.. grid:: 1 1 2 2 | ||
:class-container: features | ||
|
||
.. grid-item:: | ||
|
||
.. div:: features-container | ||
|
||
.. image:: _static/images/one.png | ||
:width: 250 | ||
|
||
.. div:: | ||
|
||
**Integration** | ||
|
||
Pass in a ID from any HuggingFace Transformer repo and access its weights with nnsight. | ||
|
||
.. grid-item:: | ||
|
||
.. div:: features-container | ||
|
||
.. image:: _static/images/two.png | ||
:width: 250 | ||
|
||
.. div:: | ||
|
||
**Interpretability** | ||
|
||
Access the internal gradients and activations at any point or module in a model. | ||
:class-card: status-container | ||
|
||
.. grid-item:: | ||
|
||
.. div:: features-container | ||
|
||
.. image:: _static/images/two.png | ||
:width: 250 | ||
|
||
.. div:: | ||
|
||
**Intuitive** | ||
|
||
Set up a context block and manipulate model internals with only a couple lines of code. | ||
|
||
.. grid-item:: | ||
|
||
.. div:: features-container | ||
|
||
.. image:: _static/images/one.png | ||
:width: 250 | ||
|
||
.. div:: | ||
|
||
**Interoperable** | ||
|
||
Enable grad and train interventions like LORA or probes on any point in a model. | ||
All Systems Are Operational | ||
|
||
.. div:: page-hook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters