Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtruong committed Jan 15, 2025
1 parent bb1b5ce commit 21ef61e
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion docs/docs/guides/core-types/datasets.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This guide will show you how to:
- Download the latest version
- Iterate over examples

## Sample code
## Quickstart

<Tabs groupId="programming-language" queryString>
<TabItem value="python" label="Python" default>
Expand Down Expand Up @@ -68,3 +68,30 @@ This guide will show you how to:

</TabItem>
</Tabs>

## Alternate constructors

<Tabs groupId="programming-language" queryString>
<TabItem value="python" label="Python" default>
Datasets can also be constructed from common Weave objects like `list[Call]`, which is useful if you want to run an evaluation on a handful of examples.

```python
@weave.op
def model(task: str) -> str:
return f"Now working on {task}"

res1, call1 = model.call(task="fetch")
res2, call2 = model.call(task="parse")

dataset = Dataset.from_calls([call1, call2])
# Now you can use the dataset to evaluate the model, etc.
```

</TabItem>
<TabItem value="typescript" label="TypeScript">

```typescript
This feature is not available in TypeScript yet. Stay tuned!
```
</TabItem>
</Tabs>

0 comments on commit 21ef61e

Please sign in to comment.