File tree 4 files changed +33
-2
lines changed
4 files changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ jobs:
171
171
- name : Combine subpackage documentation
172
172
run : |
173
173
cd optimum
174
- sudo python docs/combine_docs.py --subpackages nvidia amd intel neuron habana furiosa --version ${{ env.VERSION }}
174
+ sudo python docs/combine_docs.py --subpackages nvidia amd intel neuron tpu habana furiosa --version ${{ env.VERSION }}
175
175
cd ..
176
176
177
177
- name : Push to repositories
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ jobs:
101
101
- name : Combine subpackage documentation
102
102
run : |
103
103
cd optimum
104
- sudo python docs/combine_docs.py --subpackages nvidia amd intel neuron habana furiosa --version pr_$PR_NUMBER
104
+ sudo python docs/combine_docs.py --subpackages nvidia amd intel neuron tpu habana furiosa --version pr_$PR_NUMBER
105
105
sudo mv optimum-doc-build ../
106
106
cd ..
107
107
Original file line number Diff line number Diff line change @@ -108,6 +108,31 @@ def add_neuron_doc(base_toc: List):
108
108
)
109
109
110
110
111
+ def add_tpu_doc (base_toc : List ):
112
+ """
113
+ Extends the table of content with a section about Optimum Neuron.
114
+
115
+ Args:
116
+ base_toc (List): table of content for the doc of Optimum.
117
+ """
118
+ # Update optimum table of contents
119
+ base_toc .insert (
120
+ SUBPACKAGE_TOC_INSERT_INDEX ,
121
+ {
122
+ "sections" : [
123
+ {
124
+ # Ideally this should directly point at https://huggingface.co/docs/optimum-tpu/index
125
+ # Current hacky solution is to have a redirection in _redirects.yml
126
+ "local" : "docs/optimum-tpu/index" ,
127
+ "title" : "🤗 Optimum TPU" ,
128
+ }
129
+ ],
130
+ "title" : "TPU" ,
131
+ "isExpanded" : False ,
132
+ },
133
+ )
134
+
135
+
111
136
def main ():
112
137
args = parser .parse_args ()
113
138
optimum_path = Path ("optimum-doc-build" )
@@ -121,6 +146,9 @@ def main():
121
146
if subpackage == "neuron" :
122
147
# Neuron has its own doc so it is managed differently
123
148
add_neuron_doc (base_toc )
149
+ elif subpackage == "tpu" :
150
+ # Optimum TPU has its own doc so it is managed differently
151
+ add_tpu_doc (base_toc )
124
152
elif subpackage == "nvidia" :
125
153
# At the moment, Optimum Nvidia's doc is the README of the GitHub repo
126
154
# It is linked to in optimum/docs/source/nvidia_overview.mdx
Original file line number Diff line number Diff line change @@ -28,3 +28,6 @@ intel_trainer: intel/reference_inc
28
28
29
29
# Optimum Neuron
30
30
docs/optimum-neuron/index : /docs/optimum-neuron/index
31
+
32
+ # Optimum TPU
33
+ docs/optimum-tpu/index : /docs/optimum-tpu/index
You can’t perform that action at this time.
0 commit comments