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
2 changes: 2 additions & 0 deletions tests_end_to_end/test-helper-service/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ def authenticate_if_needed():
# Skip authentication for local environment
if base_url.startswith("http://localhost"):
print("🏠 Local environment detected, skipping authentication")
os.environ["OPIK_URL_OVERRIDE"] = f"{base_url}/api"
os.environ.setdefault("OPIK_WORKSPACE", "default")
return

# Check if API key already exists
Expand Down
16 changes: 13 additions & 3 deletions tests_end_to_end/test-helper-service/routes/traces.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from flask import Blueprint, request, abort
from werkzeug.exceptions import HTTPException
import datetime
import io
import logging
import os
Expand Down Expand Up @@ -83,10 +84,12 @@ def create_traces_client():
project_name=project_name,
input={"input": "test input"},
output={"output": "test output"},
end_time=datetime.datetime.now(datetime.timezone.utc),
)
_ = client_trace.span(
span = client_trace.span(
name="span", input={"input": "test input"}, output={"output": "test output"}
)
span.end()

return success_response({"traces_created": traces_number})

Expand All @@ -110,11 +113,12 @@ def create_traces_and_get_url():
try:
client = get_opik_client()
for i in range(traces_number):
client.trace(
trace = client.trace(
name=f"{prefix}{i}",
project_name=project_name,
input={"input": "test input"},
output={"output": "test output"},
end_time=datetime.datetime.now(datetime.timezone.utc),
)
capture_handler.flush()
terminal_output = log_capture.getvalue()
Expand Down Expand Up @@ -155,6 +159,7 @@ def create_traces_with_spans_client():
metadata=trace_config.get("metadata", {}),
feedback_scores=trace_config.get("feedback_scores", []),
project_name=project_name,
end_time=datetime.datetime.now(datetime.timezone.utc),
)

for span_index in range(span_config["count"]):
Comment thread
AndreiCautisanu marked this conversation as resolved.
Expand All @@ -169,6 +174,8 @@ def create_traces_with_spans_client():
for score in span_config.get("feedback_scores", []):
client_span.log_feedback_score(name=score["name"], value=score["value"])

client_span.end()

return success_response({"traces_created": trace_config["count"]})


Expand Down Expand Up @@ -226,6 +233,7 @@ def create_trace_with_attachment_client():
input={"instruction": "Analyze the document, ..."},
project_name=project_name,
attachments=[Attachment(data=attachment_path)],
end_time=datetime.datetime.now(datetime.timezone.utc),
)

return success_response({"attachment_name": os.path.basename(attachment_path)})
Expand Down Expand Up @@ -264,10 +272,11 @@ def create_trace_with_span_attachment():
project_name=project_name,
input={"user_question": "Hello, how are you?"},
output={"response": "Comment ça va?"},
end_time=datetime.datetime.now(datetime.timezone.utc),
)

span_name = "Add prompt template"
trace.span(
span = trace.span(
name=span_name,
input={
"text": "Hello, how are you?",
Expand All @@ -276,6 +285,7 @@ def create_trace_with_span_attachment():
output={"text": "Translate the following text to French: hello, how are you?"},
attachments=[Attachment(data=attachment_path)],
)
span.end()

return success_response(
{"attachment_name": os.path.basename(attachment_path), "span_name": span_name}
Expand Down
8 changes: 4 additions & 4 deletions tests_end_to_end/typescript-tests/models_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ providers:
display_name: "Anthropic"
api_key_env_var: "ANTHROPIC_API_KEY"
models:
- name: "Claude Opus 4.5"
ui_selector: "Claude Opus 4.5"
- name: "Claude Opus 4.6"
ui_selector: "Claude Opus 4.6"
enabled: true
test_playground: true
test_online_scoring: true
- name: "Claude Sonnet 4.5"
ui_selector: "Claude Sonnet 4.5"
- name: "Claude Sonnet 4.6"
ui_selector: "Claude Sonnet 4.6"
enabled: true
test_playground: true
test_online_scoring: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class ExperimentItemsPage {
}

private get paginationButton(): Locator {
return this.page.getByRole('button', { name: 'Showing' });
return this.page.locator('text=/Showing \\d+-\\d+ of \\d+/');
}
Comment thread
AndreiCautisanu marked this conversation as resolved.

// Ensure the "Dataset item ID" column is visible and resolve its index.
Expand Down
Loading