Skip to content

Commit

Permalink
New backend
Browse files Browse the repository at this point in the history
  • Loading branch information
ngrislain committed May 22, 2024
1 parent c4d95fa commit 5dd540b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
![Arena Logo](art/arena-logo.png)

[![Arena Frontend](https://github.com/arena-ai/arena/actions/workflows/publish-frontend-docker-image.yml/badge.svg)](https://github.com/arena-ai/arena/actions)

[![Arena Backend](https://github.com/arena-ai/arena/actions/workflows/publish-backend-docker-image.yml/badge.svg)](https://github.com/arena-ai/arena/actions)

[![Python Client](https://github.com/arena-ai/arena/actions/workflows/publish-client-to-pypi.yml/badge.svg)](https://github.com/arena-ai/arena/actions)

![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/sarus_tech)

# Sarus Arena Framework
Expand Down
1 change: 0 additions & 1 deletion backend/app/lm/api/routes/chat_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ async def process_request(self) -> Resp:
lm_request_event = arena_request_event
# Do the masking
if config.pii_removal:# TODO an IF op could be added to build conditional delayed computations if needed
from rich import print
if config.pii_removal == "masking":
async with create_task_group() as tg:
for message in lm_request.content.messages:
Expand Down
6 changes: 3 additions & 3 deletions client/examples/pii_removal/what.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# Load .env
load_dotenv()

# BASE_URL = "https://arena.sarus.app/api/v1"
BASE_URL = "http://localhost/api/v1"
BASE_URL = "https://arena.sarus.app/api/v1"
# BASE_URL = "http://localhost/api/v1"

class Generator:
def __init__(self) -> None:
Expand Down Expand Up @@ -55,7 +55,7 @@ def chat_completion_request(self) -> dict[str, Any]:
)

print("\n[bold blue]Activate masking")
arena.lm_config(lm_config=LMConfig(pii_removal="masking", judge_evaluation=True))
arena.lm_config(lm_config=LMConfig(pii_removal="masking", judge_evaluation=True, judge_with_pii=True))

print("\n[bold blue]Run experiments with masking")
for i in range(20):
Expand Down
1 change: 1 addition & 0 deletions client/src/arena/models/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
class LMConfig(BaseModel):
pii_removal: Literal["masking", "replace"] | None = None
judge_evaluation: bool = False
judge_with_pii: bool = False

0 comments on commit 5dd540b

Please sign in to comment.