Skip to content

Commit

Permalink
Fix bad headers and titles in NBs
Browse files Browse the repository at this point in the history
  • Loading branch information
J2-D2-3PO committed Jan 6, 2025
1 parent ea10431 commit 1e94a1a
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 26 deletions.
17 changes: 13 additions & 4 deletions docs/docs/reference/gen_notebooks/audio_with_weave.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

## title: Log Audio With Weave

---
title: Log Audio With Weave
---


:::tip[This is a notebook]
Expand All @@ -12,7 +12,7 @@
:::


##

<!--- @wandbcode{feedback-colab} -->


Expand Down Expand Up @@ -40,6 +40,15 @@ Start by installing the OpenAI (`openai`) and Weave (`weave`) dependencies, as w
!pip install set-env-colab-kaggle-dotenv -q # for env var
```


```python
%%capture
# Temporary workaround to fix bug in openai:
# TypeError: Client.__init__() got an unexpected keyword argument 'proxies'
# See https://community.openai.com/t/error-with-openai-1-56-0-client-init-got-an-unexpected-keyword-argument-proxies/1040332/15
!pip install "httpx<0.28"
```

Next, load the required API keys for OpenAI and Weave. Here, we use set_env which is compatible with google colab's secret keys manager, and is an alternative to colab's specific `google.colab.userdata`. See: [here](https://pypi.org/project/set-env-colab-kaggle-dotenv/) for usage instructions.


Expand Down
10 changes: 5 additions & 5 deletions docs/docs/reference/gen_notebooks/notdiamond_custom_routing.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

## title: NotDiamond Custom Routing

---
title: NotDiamond Custom Routing
---


:::tip[This is a notebook]
Expand All @@ -12,7 +12,7 @@
:::


##

<!--- @wandbcode{intro-colab} -->


Expand Down Expand Up @@ -202,7 +202,7 @@ best_provider_model, nd_model = evaluate_router(

```python
@weave.op()
def is_correct(score: int, model_output: dict) -> dict:
def is_correct(score: int, output: dict) -> dict:
# We hack score, since we already have model responses
return {"correct": score}

Expand Down
8 changes: 4 additions & 4 deletions docs/docs/reference/gen_notebooks/online_monitoring.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

## title: Integrating with Weave - Production Dashboard

---
title: Integrating with Weave - Production Dashboard
---


:::tip[This is a notebook]
Expand All @@ -12,7 +12,7 @@
:::


##

<!--- @wandbcode{cod-notebook} -->


Expand Down
6 changes: 6 additions & 0 deletions docs/docs/reference/gen_notebooks/weave_via_service_api.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
title: Service API
---


:::tip[This is a notebook]
Expand All @@ -9,6 +12,9 @@
:::



<!--- @wandbcode{cod-notebook} -->

# Use the Service API to Log and Query Traces

In the following guide, you will learn how to use the Weave Service API to log traces. Specifically, you will use the Service API to:
Expand Down
8 changes: 4 additions & 4 deletions docs/notebooks/audio_with_weave.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## <!-- docusaurus_head_meta::start\n",
"\n",
"## title: Log Audio With Weave\n",
"\n",
"<!-- docusaurus_head_meta::start\n",
"---\n",
"title: Log Audio With Weave\n",
"---\n",
"docusaurus_head_meta::end -->\n",
"\n",
"<!--- @wandbcode{feedback-colab} -->\n"
Expand Down
8 changes: 4 additions & 4 deletions docs/notebooks/notdiamond_custom_routing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## <!-- docusaurus_head_meta::start\n",
"\n",
"## title: NotDiamond Custom Routing\n",
"\n",
"<!-- docusaurus_head_meta::start\n",
"---\n",
"title: NotDiamond Custom Routing\n",
"---\n",
"docusaurus_head_meta::end -->\n",
"\n",
"<!--- @wandbcode{intro-colab} -->\n"
Expand Down
8 changes: 4 additions & 4 deletions docs/notebooks/online_monitoring.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## <!-- docusaurus_head_meta::start\n",
"\n",
"## title: Integrating with Weave - Production Dashboard\n",
"\n",
"<!-- docusaurus_head_meta::start\n",
"---\n",
"title: Integrating with Weave - Production Dashboard\n",
"---\n",
"docusaurus_head_meta::end -->\n",
"\n",
"<!--- @wandbcode{cod-notebook} -->\n"
Expand Down
10 changes: 9 additions & 1 deletion docs/notebooks/weave_via_service_api.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@
"metadata": {
"id": "xSqO08zH3qRH"
},
"source": []
"source": [
"<!-- docusaurus_head_meta::start\n",
"---\n",
"title: Service API\n",
"---\n",
"docusaurus_head_meta::end -->\n",
"\n",
"<!--- @wandbcode{cod-notebook} -->"
]
},
{
"cell_type": "markdown",
Expand Down

0 comments on commit 1e94a1a

Please sign in to comment.