Skip to content

Commit

Permalink
Merge branch 'main' into andrescrz/OPIK-71-resolve-dataset-name-in-ex…
Browse files Browse the repository at this point in the history
…periments
  • Loading branch information
andrescrz authored Sep 11, 2024
2 parents 2614edc + daf1fa0 commit bc34ec4
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 10 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/documentation_cookbook_tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test-examples
name: Documentation - Test cookbooks
on:
workflow_dispatch:
schedule:
Expand All @@ -14,9 +14,9 @@ jobs:
notebooks:
- apps/opik-documentation/documentation/docs/cookbook/evaluate_hallucination_metric.ipynb
- apps/opik-documentation/documentation/docs/cookbook/evaluate_moderation_metric.ipynb
- apps/opik-documentation/documentation/docs/cookbook/langchain.md
- apps/opik-documentation/documentation/docs/cookbook/llama-index.md
- apps/opik-documentation/documentation/docs/cookbook/openai.md
- apps/opik-documentation/documentation/docs/cookbook/langchain.ipynb
- apps/opik-documentation/documentation/docs/cookbook/llama-index.ipynb
- apps/opik-documentation/documentation/docs/cookbook/openai.ipynb
env:
NOTEBOOK_TO_TEST: ${{ matrix.notebooks }}
steps:
Expand Down Expand Up @@ -50,5 +50,6 @@ jobs:
cd "$TEST_DIRECTORY" || exit
python -X faulthandler $(which ipython) "$TEST_NOTEBOOK"
env:
OPENAI_API_KEY: ${{ secrets.DOCS_OPENAI_API_KEY }}
OPIK_API_KEY: ${{ secrets.COMET_API_KEY }}
OPIK_WORKSPACE: ${{ secrets.COMET_WORKSPACE }}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install pyarrow fsspec huggingface_hub --quiet"
"%pip install opik pyarrow fsspec huggingface_hub --upgrade --quiet "
]
},
{
Expand Down Expand Up @@ -108,7 +108,7 @@
"\n",
" # Insert items into dataset\n",
" df = pd.read_parquet(\"hf://datasets/PatronusAI/HaluBench/data/test-00000-of-00001.parquet\")\n",
" df = df.sample(n=500, random_state=42)\n",
" df = df.sample(n=50, random_state=42)\n",
"\n",
" dataset_records = [\n",
" DatasetItem(\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@
"First, we will install the necessary libraries and configure the OpenAI API key and download a reference moderation dataset."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%pip install opik --upgrade --quiet"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -105,7 +114,7 @@
" response = requests.get(url)\n",
" df = pd.read_json(BytesIO(response.content), lines=True, compression='gzip')\n",
"\n",
" df = df.sample(n=500, random_state=42)\n",
" df = df.sample(n=50, random_state=42)\n",
" \n",
" dataset_records = []\n",
" for x in df.to_dict(orient=\"records\"):\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"metadata": {},
"outputs": [],
"source": [
"%pip install opik llama-index llama-index-agent-openai llama-index-llms-openai --quiet"
"%pip install opik llama-index llama-index-agent-openai llama-index-llms-openai --upgrade --quiet"
]
},
{
Expand Down
12 changes: 10 additions & 2 deletions apps/opik-frontend/src/plugins/comet/UserMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import sortBy from "lodash/sortBy";
import {
Book,
Copy,
GraduationCap,
Grip,
KeyRound,
LogOut,
Expand Down Expand Up @@ -207,7 +208,7 @@ const UserMenu = () => {
<a href={buildUrl("account-settings", workspaceName)}>
<DropdownMenuItem className="cursor-pointer">
<Settings className="mr-2 size-4" />
<span>Account Settings</span>
<span>Account settings</span>
</DropdownMenuItem>
</a>
{isOrganizationAdmin ? (
Expand Down Expand Up @@ -269,13 +270,20 @@ const UserMenu = () => {
</DropdownMenuGroup>
<DropdownMenuSeparator />
<DropdownMenuGroup>
<a href={buildUrl("docs/opik/")}>
<Link to="/$workspaceName/get-started" params={{ workspaceName }}>
<DropdownMenuItem className="cursor-pointer">
<GraduationCap className="mr-2 size-4" />
<span>Get started guide</span>
</DropdownMenuItem>
</Link>
<a href={buildUrl("docs/opik/")} target="_blank" rel="noreferrer">
<DropdownMenuItem className="cursor-pointer">
<Book className="mr-2 size-4" />
<span>Docs</span>
</DropdownMenuItem>
</a>
</DropdownMenuGroup>
<DropdownMenuSeparator />
<DropdownMenuGroup>
<DropdownMenuSub>
<DropdownMenuSubTrigger className="flex cursor-pointer items-center">
Expand Down

0 comments on commit bc34ec4

Please sign in to comment.