Skip to content

Commit 148f129

Browse files
committed
Test
1 parent 90815ff commit 148f129

2 files changed

Lines changed: 28 additions & 19 deletions

File tree

docs/combine_docs.py

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -106,23 +106,32 @@ def add_subpackage_doc(base_toc: List, subpackage: str):
106106
subpackage (str): subpackage name
107107
"""
108108

109-
section_title = EXTERNAL_DOCUMENTATION[subpackage]
110-
# Update optimum table of contents
111-
base_toc.insert(
112-
SUBPACKAGE_TOC_INSERT_INDEX,
113-
{
114-
"sections": [
115-
{
116-
# Ideally this should directly point at https://huggingface.co/docs/optimum-xxx/index
117-
# Current hacky solution is to have a redirection in _redirects.yml
118-
"local": f"docs/optimum-{subpackage}/index",
119-
"title": f"🤗 Optimum {section_title}",
120-
}
121-
],
122-
"title": TITLE_SECTION.get(section_title, section_title),
123-
"isExpanded": False,
124-
},
125-
)
109+
if subpackage == "habana":
110+
new_section = {
111+
"local": f"docs/optimum-habana/index",
112+
"title": f"🤗 Optimum For Intel Gaudi",
113+
}
114+
for i, toc_element in enumerate(base_toc):
115+
if toc_element["title"] == "Intel":
116+
base_toc[i]["sections"].append(new_section)
117+
else:
118+
section_title = EXTERNAL_DOCUMENTATION[subpackage]
119+
# Update optimum table of contents
120+
base_toc.insert(
121+
SUBPACKAGE_TOC_INSERT_INDEX,
122+
{
123+
"sections": [
124+
{
125+
# Ideally this should directly point at https://huggingface.co/docs/optimum-xxx/index
126+
# Current hacky solution is to have a redirection in _redirects.yml
127+
"local": f"docs/optimum-{subpackage}/index",
128+
"title": f"🤗 Optimum {section_title}",
129+
}
130+
],
131+
"title": TITLE_SECTION.get(section_title, section_title),
132+
"isExpanded": False,
133+
},
134+
)
126135

127136

128137
def main():

docs/source/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ The packages below enable you to get the best of the 🤗 Hugging Face ecosystem
4747
<p class="text-gray-700">Accelerate your training and inference workflows with <span class="underline" onclick="event.preventDefault(); window.open('https://cloud.google.com/tpu', '_blank');">Google TPUs</span></p>
4848
</a>
4949
<a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="https://huggingface.co/docs/optimum-habana/index"
50-
><div class="w-full text-center bg-gradient-to-br from-indigo-400 to-indigo-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">Habana</div>
51-
<p class="text-gray-700">Maximize training throughput and efficiency with <span class="underline" onclick="event.preventDefault(); window.open('https://docs.habana.ai/en/latest/Gaudi_Overview/Gaudi_Architecture.html', '_blank');">Habana's Gaudi processor</span></p>
50+
><div class="w-full text-center bg-gradient-to-br from-indigo-400 to-indigo-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">Intel Gaudi</div>
51+
<p class="text-gray-700">Maximize training throughput and efficiency with <span class="underline" onclick="event.preventDefault(); window.open('https://docs.habana.ai/en/latest/Gaudi_Overview/Gaudi_Architecture.html', '_blank');">Intel's Gaudi processor</span></p>
5252
</a>
5353
<a class="!no-underline border dark:border-gray-700 p-5 rounded-lg shadow hover:shadow-lg" href="./furiosa/index"
5454
><div class="w-full text-center bg-gradient-to-br from-green-400 to-green-500 rounded-lg py-1.5 font-semibold mb-5 text-white text-lg leading-relaxed">FuriosaAI</div>

0 commit comments

Comments
 (0)