Skip to content

Commit

Permalink
Add reference to GitHub in documentation examples (#114)
Browse files Browse the repository at this point in the history
* Add final note with GitHub reference

* Replace `WARN` with `WARNING` for correct rendering

* Update GitHub URL note formatting

* Update GitHub URL note formatting

* Use a single line-break before/after `---`
  • Loading branch information
alvarobartt authored Oct 16, 2024
1 parent 26de5cf commit 631b103
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 6 deletions.
10 changes: 10 additions & 0 deletions docs/scripts/auto-generate-examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@ def replacement(match):
else:
print("No relative paths found in the processed file.")

# Calculate the example URL
example_url = (
f"https://github.com/huggingface/Google-Cloud-Containers/tree/main/{root}"
)
if file.__contains__("ipynb"):
example_url += "/vertex-notebook.ipynb"

# Add the final note
content += f"\n---\n<Tip>\n\n📍 Find the complete example on GitHub [here]({example_url})!\n\n</Tip>"

with open(target, "w") as f:
f.write(content)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"> [!WARN]\n",
"> [!WARNING]\n",
"> The Vertex AI endpoint deployment via the `deploy` method may take from 15 to 25 minutes."
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"> [!WARN]\n",
"> [!WARNING]\n",
"> The Vertex AI endpoint deployment via the `deploy` method may take from 15 to 25 minutes."
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"> [!WARN]\n",
"> [!WARNING]\n",
"> The Vertex AI endpoint deployment via the `deploy` method may take from 15 to 25 minutes."
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@
"id": "18dd3890-eeb1-42a5-86f1-471c06194147",
"metadata": {},
"source": [
"> [!WARN]\n",
"> [!WARNING]\n",
"> [`meta-llama/Meta-Llama-3.1-405B-Instruct-FP8`](https://huggingface.co/meta-llama/Meta-Llama-3.1-405B-Instruct-FP8) deployment on Vertex AI will take \\~30 minutes to deploy, as it needs to allocate the resources on Google Cloud, and then download the weights from the Hugging Face Hub (\\~10 minutes) and load those for inference in TGI (\\~3 minutes)."
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"> [!WARN]\n",
"> [!WARNING]\n",
"> Note that the `MESSAGES_API_ENABLED` flag will only work from the TGI 2.3 DLC i.e. `us-docker.pkg.dev/deeplearning-platform-release/gcr.io/huggingface-text-generation-inference-cu124.2-3.ubuntu2204.py311`, onwards.\n",
">\n",
"> For the previous releases the `MESSAGES_API_ENABLED` flag won't work as it was introduced [in the following TGI PR](https://github.com/huggingface/text-generation-inference/pull/2481), the uncompatible releases being:\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"> [!WARN]\n",
"> [!WARNING]\n",
"> The Vertex AI endpoint deployment via the `deploy` method may take from 15 to 25 minutes.\n",
"\n",
"After the model is deployed, we can test our endpoint. We generate a helper `generate` function to send requests to the deployed model. This will be later used to send requests to the deployed model and collect the outputs for evaluation."
Expand Down

0 comments on commit 631b103

Please sign in to comment.