Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 19 additions & 26 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ Atlas is an evaluation platform that allows you to benchmark AI models against v
## Quick Start

### Install LayerLens python sdk

Install the layerlens python sdk using the following command

```bash
pip install layerlens --index-url https://sdk.layerlens.ai
```
Expand All @@ -31,26 +33,22 @@ Before triggering an evaluation using the sdk, login to your organization at [ap
#### Using synchronous client

```python
from atlas import Atlas
from layerlens import Atlas

# Construct sync client
client = Atlas()

# --- Models replace with the model name you want to run
models = client.models.get(type="public", name="gpt-4o")
# --- Models replace with the model key you want to run
model = client.models.get_by_key("openai/gpt-4o")

if not models:
print("gpt-4o not found on organization, exiting")

model = models[0]
if not model:
print("Model not found")

# --- Benchmarks replace with the benchmark name you want to run
benchmarks = client.benchmarks.get(type="public", name="simpleQA")

if not benchmarks:
print("SimpleQA benchmark not found on organization, exiting")
benchmark = client.benchmarks.get_by_key("aime2024")

benchmark = benchmarks[0]
if not benchmark:
print("benchmark not found")

# --- Create evaluation
evaluation = client.evaluations.create(
Expand All @@ -59,35 +57,30 @@ from atlas import Atlas
)
```


#### Using Async Client

```python
import asyncio
from atlas import AsyncAtlas
from layerlens import AsyncAtlas

async def run_evaluation_async():
# Construct async client
client = AsyncAtlas()

# --- Models replace with the model name you want to run
models = await client.models.get(type="public",name="gpt-4o")
print(f"Models found: {models}")
# --- Model to use
model = await client.models.get_by_key("openai/gpt-4o")

if not models:
print("gpt-4o not found, exiting")
if not model:
print("Model not found")
return

model = models[0]
# --- Benchmarks replace with the benchmark name you want to run
benchmarks = await client.benchmarks.get(type="public", name="simpleQA")
# --- Benchmark to use
benchmark = await client.benchmarks.get_by_key("aime2024")

if not benchmarks:
print("SimpleQA benchmark not found, exiting")
if not benchmark:
print("benchmark not found")
return

benchmark = benchmarks[0]

# --- Create evaluation
evaluation = await client.evaluations.create(
model=model,
Expand Down
8 changes: 4 additions & 4 deletions docs/api-reference/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The `Atlas` (syncronous) and `AsyncAtlas` (asyncronous) classes are the main ent
### Syncronous Client

```python
from atlas import Atlas
from layerlens import Atlas

# Construct syncronous client
# Loads for api key from the "LAYERLENS_ATLAS_API_KEY" enviornment variable
Expand All @@ -21,7 +21,7 @@ client = Atlas(api_key="your_api_key")

```python
import asyncio
from atlas import AsyncAtlas
from layerlens import AsyncAtlas

# Construct async client
# Loads for api key from the "LAYERLENS_ATLAS_API_KEY" enviornment variable
Expand Down Expand Up @@ -56,7 +56,7 @@ LAYERLENS_ATLAS_API_KEY="your_api_key_here"
### Simple Timeout

```python
from atlas import Atlas
from layerlens import Atlas

# 30-second timeout for all requests
client = Atlas(timeout=30.0)
Expand Down Expand Up @@ -88,4 +88,4 @@ evaluation = client.with_options(timeout=120.0).evaluations.create(
model=model,
benchmark=benchmark
)
```
```
Loading
Loading