Skip to content

Commit 5830c0f

Browse files
committed
Try better project
1 parent b78bc41 commit 5830c0f

File tree

2 files changed

+6
-18
lines changed

2 files changed

+6
-18
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"mtxr.sqltools-driver-pg",
3535
"ms-vscode.vscode-node-azure-pack",
3636
"esbenp.prettier-vscode",
37-
"twixes.pypi-assistant"
37+
"twixes.pypi-assistant",
38+
"ms-python.vscode-python-envs"
3839
],
3940
// Set *default* container specific settings.json values on container create.
4041
"settings": {

evals/safety_evaluation.py

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import os
55
import pathlib
66
import sys
7-
from enum import Enum
87

98
import requests
109
from azure.ai.evaluation import AzureAIProject
@@ -21,18 +20,6 @@
2120
root_dir = pathlib.Path(__file__).parent
2221

2322

24-
class HarmSeverityLevel(Enum):
25-
"""Harm severity levels reported by the Azure AI Evaluator service.
26-
These constants have been copied from the azure-ai-evaluation package,
27-
where they're currently in a private module.
28-
"""
29-
30-
VeryLow = "Very low"
31-
Low = "Low"
32-
Medium = "Medium"
33-
High = "High"
34-
35-
3623
def get_azure_credential():
3724
AZURE_TENANT_ID = os.getenv("AZURE_TENANT_ID")
3825
if AZURE_TENANT_ID:
@@ -68,9 +55,9 @@ async def callback(
6855
async def run_simulator(target_url: str, max_simulations: int):
6956
credential = get_azure_credential()
7057
azure_ai_project: AzureAIProject = {
71-
"subscription_id": os.environ["AZURE_SUBSCRIPTION_ID"],
72-
"resource_group_name": os.environ["AZURE_RESOURCE_GROUP"],
73-
"project_name": os.environ["AZURE_AI_PROJECT"],
58+
"subscription_id": os.getenv("AZURE_SUBSCRIPTION_ID"),
59+
"resource_group_name": os.getenv("AZURE_RESOURCE_GROUP"),
60+
"project_name": "pf-testprojforaisaety",
7461
}
7562
model_red_team = RedTeam(
7663
azure_ai_project=azure_ai_project,
@@ -114,7 +101,7 @@ async def run_simulator(target_url: str, max_simulations: int):
114101

115102
# Configure logging to show tracebacks for warnings and above
116103
logging.basicConfig(
117-
level=logging.WARNING,
104+
level=logging.DEBUG,
118105
format="%(message)s",
119106
datefmt="[%X]",
120107
handlers=[RichHandler(rich_tracebacks=False, show_path=True)],

0 commit comments

Comments
 (0)