Skip to content

Commit

Permalink
Merge branch 'main' into mp/aggregation-benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
micpst committed Sep 23, 2024
2 parents e69fc07 + 417f5ef commit f351b29
Show file tree
Hide file tree
Showing 14 changed files with 467 additions and 356 deletions.
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,43 @@
# Changelog

## v0.7.0 (2024-09-04)

### Feature

* feat(gradio): enhance gradio interface (#90) ([`8692637`](https://github.com/deepsense-ai/db-ally/commit/8692637d491385a2e6fe18bd0476c70dbd3997e5))

### Fix

* fix: pin griffe dependency ([`c562c01`](https://github.com/deepsense-ai/db-ally/commit/c562c014a38ed02f0a1df6f5bee2223610be5d5d))

## v0.6.0 (2024-09-02)

### Feature

* feat: aggregations in structured views (#62) ([`139ab9b`](https://github.com/deepsense-ai/db-ally/commit/139ab9be6514cb0777251efafc3e272cac00e6cd))

* feat(extra): prompt tuning (#79) ([`2714e7c`](https://github.com/deepsense-ai/db-ally/commit/2714e7c839137a9fc617270c086167d273a16f1a))

* feat(views): optional filtering for structured views (#78) ([`11a7b21`](https://github.com/deepsense-ai/db-ally/commit/11a7b21956ab33f47c1a9986deb6a5c154988579))

### Documentation

* docs(aggregations): structured view aggregations (#87) ([`9f6b5df`](https://github.com/deepsense-ai/db-ally/commit/9f6b5df380fe7a48a36eb3810a6712bc46d9b728))

* docs(quickstart): update quickstart (#88) ([`9a1e9d8`](https://github.com/deepsense-ai/db-ally/commit/9a1e9d8bcad5e124f3faa9a5798e8b2daefeee1a))

* docs: update logo (#86) ([`23e50ff`](https://github.com/deepsense-ai/db-ally/commit/23e50ff7159112dea3c1988eacbe85de3696628e))

### Refactor

* refactor(benchmarks): evaluation pipeline (#71) ([`cd2cece`](https://github.com/deepsense-ai/db-ally/commit/cd2cece73cb3ae2d4d5efe61cbfbec03c4968543))

* refactor(iql): add iql gen exception (#77) ([`90b0e66`](https://github.com/deepsense-ai/db-ally/commit/90b0e669394655c28e3256e24321cbeaea2a91c6))

### Chore

* chore: update changelog ([`0a22942`](https://github.com/deepsense-ai/db-ally/commit/0a22942451c80ee5d572805ac67981b6e96d96ae))

## v0.5.0 (2024-07-23)

### Feature
Expand Down
30 changes: 30 additions & 0 deletions docs/how-to/visualize-collection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# How-To: Visualize Collection

db-ally provides simple way to visualize your collection with [Gradio](https://gradio.app){target="_blank"}. The app allows you to debug your views and query data using different LLMs.

## Installation

Install `dbally` with `gradio` extra.

```bash
pip install dbally["gradio"]
```

## Run the app

Pick the collection created using [`create_collection`][dbally.create_collection] and lunch the gradio interface.

```python
from dbally.gradio import create_gradio_interface

gradio_interface = create_gradio_interface(collection)
gradio_interface.launch()
```
Visit <http://127.0.0.1:7860>{target="_blank"} to test the collection.

!!! note
By default, the app will use LLM API key defined in environment variable depending on the LLM provider used. You can override the key in the app.

## Full Example

Access the full example on [GitHub](https://github.com/deepsense-ai/db-ally/tree/main/examples/visualize_collection.py){target="_blank"}.
44 changes: 0 additions & 44 deletions docs/how-to/visualize_views.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@
from dbally.llms.litellm import LiteLLM


async def main():
async def main() -> None:
await country_similarity.update()

llm = LiteLLM(model_name="gpt-3.5-turbo")
dbally.event_handlers = [CLIEventHandler(), BufferEventHandler()]

collection = dbally.create_collection("candidates", llm)
collection.add(CandidateView, lambda: CandidateView(engine))
collection.add(SampleText2SQLViewCyphers, lambda: SampleText2SQLViewCyphers(create_freeform_memory_engine()))
gradio_interface = await create_gradio_interface(user_collection=collection)

gradio_interface = create_gradio_interface(collection)
gradio_interface.launch()


Expand Down
2 changes: 1 addition & 1 deletion examples/visualize_fallback_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def main():

user_collection.set_fallback(fallback_collection).set_fallback(second_fallback_collection)

gradio_interface = await create_gradio_interface(user_collection=user_collection)
gradio_interface = create_gradio_interface(user_collection)
gradio_interface.launch()


Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ nav:
- how-to/use_elastic_store.md
- how-to/use_custom_similarity_store.md
- how-to/update_similarity_indexes.md
- how-to/visualize_views.md
- how-to/visualize-collection.md
- how-to/log_runs_to_langsmith.md
- how-to/trace_runs_with_otel.md
- how-to/create_custom_event_handler.md
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ pip-licenses>=4.0.0,<5.0.0
bump2version>=1.0.1,<2.0.0
mypy==1.8.0
# for building docs
griffe==0.44.0
griffe-typingdoc==0.2.5
mkdocs==1.5.3
mkdocs-autorefs==1.0.1
Expand Down
2 changes: 1 addition & 1 deletion src/dbally/__version__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Version information."""

__version__ = "0.5.0"
__version__ = "0.7.1"
2 changes: 1 addition & 1 deletion src/dbally/gradio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from dbally.gradio.gradio_interface import create_gradio_interface
from dbally.gradio.interface import create_gradio_interface

__all__ = ["create_gradio_interface"]
Loading

0 comments on commit f351b29

Please sign in to comment.